summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustus Winter <justus@gnupg.org>2016-04-30 00:01:47 +0200
committerJustus Winter <justus@gnupg.org>2016-04-30 00:01:47 +0200
commit8af64c48985432f81682710f8be998f30b22300e (patch)
tree5b9956ccfd6b827942ead1c85855b6923e744aaf
parent518ba7a742374f9695f9e8659ce3b1628bb8a1b0 (diff)
add patch series
-rw-r--r--debian/patches/fix-getroot0001-Fix-privileged-operations-on-trivfs-translated-nodes.patch36
-rw-r--r--debian/patches/series1
2 files changed, 37 insertions, 0 deletions
diff --git a/debian/patches/fix-getroot0001-Fix-privileged-operations-on-trivfs-translated-nodes.patch b/debian/patches/fix-getroot0001-Fix-privileged-operations-on-trivfs-translated-nodes.patch
new file mode 100644
index 00000000..f8c274f3
--- /dev/null
+++ b/debian/patches/fix-getroot0001-Fix-privileged-operations-on-trivfs-translated-nodes.patch
@@ -0,0 +1,36 @@
+From 53a1382f8af4f95644e51dfd970ade0288b050e1 Mon Sep 17 00:00:00 2001
+From: Justus Winter <justus@gnupg.org>
+Date: Fri, 29 Apr 2016 23:36:47 +0200
+Subject: [PATCH hurd] Fix privileged operations on trivfs-translated nodes
+
+Amends d18ea50e.
+
+* libtrivfs/fsys-getroot.c: When the user is privileged, make a
+verbatim copy of the real node instead of making an auth-restricted
+copy.
+---
+ libtrivfs/fsys-getroot.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/libtrivfs/fsys-getroot.c b/libtrivfs/fsys-getroot.c
+index c44e535..c9b8261 100644
+--- a/libtrivfs/fsys-getroot.c
++++ b/libtrivfs/fsys-getroot.c
+@@ -75,11 +75,11 @@ trivfs_S_fsys_getroot (struct trivfs_control *cntl,
+ .alloced = nuids,
+ };
+
+- if (idvec_contains (&idvec, 0))
+- /* Root should be given all our rights. */
++ if (_is_privileged (&idvec))
++ /* Privileged users should be given all our rights. */
+ err = io_duplicate (cntl->underlying, &new_realnode);
+ else
+- /* Non-root, restrict rights. */
++ /* Non-privileged, restrict rights. */
+ err = io_restrict_auth (cntl->underlying,
+ &new_realnode, uids, nuids, gids, ngids);
+
+--
+2.1.4
+
diff --git a/debian/patches/series b/debian/patches/series
index a1aad4fd..77b7d8c3 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -45,3 +45,4 @@ crash0001-xxx-crash-logging-works.patch
fixes0001-utils-settrans-implement-active-translator-stacking.patch
fixes0002-Avoid-superfluous-locking-of-node.patch
fixes0003-fstests-new-micro-benchmark.patch
+fix-getroot0001-Fix-privileged-operations-on-trivfs-translated-nodes.patch