diff options
author | Balint Reczey <balint.reczey@canonical.com> | 2020-03-18 18:29:02 +0100 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2020-03-27 19:06:36 +0100 |
commit | 93c23c9297e48e594785e0bb9c51504aae5fbe3e (patch) | |
tree | 9cf5619d8bfbbcfa525b8d40d8cd09652c552005 /src/test | |
parent | core/unit: print info when unit_add_name failed (diff) | |
download | systemd-93c23c9297e48e594785e0bb9c51504aae5fbe3e.tar.xz systemd-93c23c9297e48e594785e0bb9c51504aae5fbe3e.zip |
user-util: Allow names starting with a digit
In 1a29610f5fa1bcb2eeb37d2c6b79d8d1a6dbb865 the change inadvertedly
disabled names with digit as the first character. This follow-up change
allows a digit as the first character in compat mode.
Fixes: #15141
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/test-user-util.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/test-user-util.c b/src/test/test-user-util.c index 084a584876..11c01e5189 100644 --- a/src/test/test-user-util.c +++ b/src/test/test-user-util.c @@ -96,7 +96,7 @@ static void test_valid_user_group_name_compat(void) { assert_se(valid_user_group_name_compat("eff.")); assert_se(valid_user_group_name_compat("some5")); - assert_se(!valid_user_group_name_compat("5some")); + assert_se(valid_user_group_name_compat("5some")); assert_se(valid_user_group_name_compat("INNER5NUMBER")); } @@ -166,7 +166,7 @@ static void test_valid_user_group_name_or_id_compat(void) { assert_se(valid_user_group_name_or_id_compat("kk-k")); assert_se(valid_user_group_name_or_id_compat("some5")); - assert_se(!valid_user_group_name_or_id_compat("5some")); + assert_se(valid_user_group_name_or_id_compat("5some")); assert_se(valid_user_group_name_or_id_compat("INNER5NUMBER")); } |