]> git.ipfire.org Git - thirdparty/shadow.git/commitdiff
Fix code comment
authored neville <ed@s5h.net>
Sat, 12 Mar 2022 08:22:31 +0000 (08:22 +0000)
committerSerge Hallyn <serge@hallyn.com>
Sun, 13 Mar 2022 14:06:36 +0000 (09:06 -0500)
Improving check around pw_dir which may be NULL

src/pwck.c

index 28209131d2413805a7c6575dd31ade22d8067be9..22b1fdcd8e680a472c6ccde0b52a89fdd9c43bbd 100644 (file)
@@ -498,9 +498,9 @@ static void check_pw_file (int *errors, bool *changed)
                }
 
                /*
-                * If uid is system and has a home directory, then check
+                * If uid is not system and has a home directory, then check
                 */
-               if (!(pwd->pw_uid >= min_sys_id && pwd->pw_uid <= max_sys_id && pwd->pw_dir && pwd->pw_dir[0])) {
+               if (!(pwd->pw_uid >= min_sys_id && pwd->pw_uid <= max_sys_id ) && pwd->pw_dir && pwd->pw_dir[0]) {
                        /*
                         * Make sure the home directory exists
                         */