projects
/
platform
/
upstream
/
systemd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6f8a8b8
)
machine: ignore containers which disable private user namespace in MapToMachine{User...
author
Yu Watanabe
<watanabe.yu+github@gmail.com>
Wed, 13 Jun 2018 14:59:35 +0000
(23:59 +0900)
committer
Lennart Poettering
<lennart@poettering.net>
Wed, 13 Jun 2018 17:05:32 +0000
(19:05 +0200)
Fixes #9286.
src/machine/machined-dbus.c
patch
|
blob
|
history
diff --git
a/src/machine/machined-dbus.c
b/src/machine/machined-dbus.c
index
cb46718
..
f45e592
100644
(file)
--- a/
src/machine/machined-dbus.c
+++ b/
src/machine/machined-dbus.c
@@
-1010,6
+1010,10
@@
static int method_map_to_machine_user(sd_bus_message *message, void *userdata, s
return -EIO;
}
+ /* The private user namespace is disabled, ignoring. */
+ if (uid_shift == 0)
+ continue;
+
if (uid < uid_shift || uid >= uid_shift + uid_range)
continue;
@@
-1128,6
+1132,10
@@
static int method_map_to_machine_group(sd_bus_message *message, void *groupdata,
return -EIO;
}
+ /* The private user namespace is disabled, ignoring. */
+ if (gid_shift == 0)
+ continue;
+
if (gid < gid_shift || gid >= gid_shift + gid_range)
continue;