Skip to content

Commit 6b89f27

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) (cherry picked from commit 39f5e42) (cherry picked from commit 460b17e)
1 parent d764298 commit 6b89f27

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
@@ -878,7 +878,8 @@ static const char *const user_namespace_ownership_table[_USER_NAMESPACE_OWNERSHI
878878
[USER_NAMESPACE_OWNERSHIP_AUTO] = "auto",
879879
};
880880

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

883884
int config_parse_userns_chown(
884885
const char *unit,

0 commit comments

Comments
 (0)