Skip to content

Commit 460b17e

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)
1 parent 3c58556 commit 460b17e

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

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

882883
int config_parse_userns_chown(
883884
const char *unit,

0 commit comments

Comments
 (0)