]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
sysusers: use "!*" instead of "!!" as an invalid group password
authornl6720 <nl6720@gmail.com>
Wed, 30 Sep 2020 05:09:25 +0000 (08:09 +0300)
committerLennart Poettering <lennart@poettering.net>
Wed, 30 Sep 2020 08:21:40 +0000 (10:21 +0200)
This basically implements fc58c0c7bf7e4f525b916e3e5be0de2307fef04e for gshadow.
gpasswd may not have a lock/unlock that behaves the same as passwd, but
according to gshadow(5) the logic of the password field is the same.

src/sysusers/sysusers.c

index 7349e9fcb9ca535b205fd0969d4407e113188478..cb94358a3a2ca9c0d34388734b6cf1216090800d 100644 (file)
@@ -693,7 +693,7 @@ static int write_temporary_gshadow(const char * gshadow_path, FILE **tmpfile, ch
         ORDERED_HASHMAP_FOREACH(i, todo_gids) {
                 struct sgrp n = {
                         .sg_namp = i->name,
-                        .sg_passwd = (char*) "!!",
+                        .sg_passwd = (char*) "!*",
                 };
 
                 r = putsgent_with_members(&n, gshadow);