The -F flag should bypass the -r flag and UID checks.
Closes: <shadow-maint#1255>
Signed-off-by: ndostert <crawax@cwxlab.fr>
Co-authored-by: Alejandro Colomar <alx@kernel.org>
Fixes: 3f7a72e9677b (2022-08-01; "useradd: add -F option for updating /etc/sub[ig]id for system accounts")
return false;
if (!sub_uid_file_present())
return false;
- if (rflg && !Fflg)
+ if (Fflg)
+ return true;
+ if (rflg)
return false;
if (user_id == 0)
return false;
return false;
if (!sub_gid_file_present())
return false;
- if (rflg && !Fflg)
+ if (Fflg)
+ return true;
+ if (rflg)
return false;
if (user_id == 0)
return false;