1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
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
|