summaryrefslogtreecommitdiff
path: root/system-preset/Makefile
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@lukeshu.com>2017-06-13 18:06:09 -0400
committerLuke Shumaker <lukeshu@lukeshu.com>2017-06-16 17:06:55 -0400
commit81e05d379eb65c8b5ee2106ea140e4cba7fbc6f0 (patch)
tree401cd42135f8d1281ab480d98d0ad90f68378100 /system-preset/Makefile
parent2fbe69d3ffd1be92eda13ea782337349d63af14b (diff)
nspawn: Simplify tmpfs_patch_options() usage, and trickle that up
One of the things that tmpfs_patch_options does is take an (optional) UID, and insert "uid=${UID},gid=${UID}" into the options string. So we need a uid_t argument, and a way of telling if we should use it. Fortunately, that is built in to the uid_t value by having UID_INVALID as a possible value. So this is really a feature that requires one argument. Yet, it is somehow taking 4! That is absurd. Simplify it to only take one argument, and have that trickle all the way up to mount_all()'s usage. Now, in may of the uses, the argument becomes uid_shift == 0 ? UID_INVALID : uid_shift because it used to treat uid_shift=0 as invalid unless the patch_ids flag was also set. This keeps the behavior the same. Note that in all cases where it is invoked, if !userns, then uid_shift is 0; we don't have to add any checks for that. That said, I'm pretty sure that "uid=0" and not setting "uid=" are the same, but Christian Brauner seemed to not think so when implementing the cgns support. https://github.com/systemd/systemd/pull/3589
Diffstat (limited to 'system-preset/Makefile')
0 files changed, 0 insertions, 0 deletions