From: ed neville Date: Sat, 12 Mar 2022 08:22:31 +0000 (+0000) Subject: Fix code comment X-Git-Tag: 4.12~55 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b7bbf1beb8ca2cc746230a55ad027773f0ec424a;p=thirdparty%2Fshadow.git Fix code comment Improving check around pw_dir which may be NULL --- diff --git a/src/pwck.c b/src/pwck.c index 28209131d..22b1fdcd8 100644 --- a/src/pwck.c +++ b/src/pwck.c @@ -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 */