Skip to content

Commit 39f5e42

Browse files
poetteringbluca
authored andcommitted
nspawn: make sure --private-users-ownership=no and =off work the same way
We usually want to use "extended booleans" for cases like this, i.e. that "off", "no" and "0" can be used interchangably for turning something off. (cherry picked from commit 62f3e2f) (cherry picked from commit 7a307c5) (cherry picked from commit 4b384a3)
1 parent b576d9f commit 39f5e42

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/nspawn/nspawn-settings.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -936,7 +936,8 @@ static const char *const user_namespace_ownership_table[_USER_NAMESPACE_OWNERSHI
936936
[USER_NAMESPACE_OWNERSHIP_AUTO] = "auto",
937937
};
938938

939-
DEFINE_STRING_TABLE_LOOKUP(user_namespace_ownership, UserNamespaceOwnership);
939+
/* Note: while "yes" maps to "auto" here, we don't really document that, in order to make things clearer and less confusing to users. */
940+
DEFINE_STRING_TABLE_LOOKUP_WITH_BOOLEAN(user_namespace_ownership, UserNamespaceOwnership, USER_NAMESPACE_OWNERSHIP_AUTO);
940941

941942
int config_parse_userns_chown(
942943
const char *unit,

0 commit comments

Comments
 (0)