1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-09 01:18:19 +03:00

nspawn: trivial improvements

This commit is contained in:
Lennart Poettering 2024-11-13 12:15:08 +01:00
parent b83358b87f
commit 009a02b263

View File

@ -1251,7 +1251,7 @@ static int parse_argv(int argc, char *argv[]) {
arg_uid_range = UINT32_C(0x10000); arg_uid_range = UINT32_C(0x10000);
} else if (streq(optarg, "identity")) { } else if (streq(optarg, "identity")) {
/* identity: User namespaces on, UID range is map the 0…0xFFFF range to /* identity: User namespaces on, UID range is map of the 0…0xFFFF range to
* itself, i.e. we don't actually map anything, but do take benefit of * itself, i.e. we don't actually map anything, but do take benefit of
* isolation of capability sets. */ * isolation of capability sets. */
arg_userns_mode = USER_NAMESPACE_FIXED; arg_userns_mode = USER_NAMESPACE_FIXED;
@ -3255,6 +3255,7 @@ static int chase_and_update(char **p, unsigned flags) {
} }
static int determine_uid_shift(const char *directory) { static int determine_uid_shift(const char *directory) {
assert(directory);
if (arg_userns_mode == USER_NAMESPACE_NO) { if (arg_userns_mode == USER_NAMESPACE_NO) {
arg_uid_shift = 0; arg_uid_shift = 0;