mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-23 11:18:54 +00:00
Do not treat empty name as an uid 0
Reported by: Robert Bonomi <bonomi@mail.r-bonomi.com>
This commit is contained in:
parent
e6e9c14bdf
commit
e7e5ec8773
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=241108
@ -314,7 +314,8 @@ pw_user(struct userconf * cnf, int mode, struct cargs * args)
|
||||
* know.
|
||||
*/
|
||||
if (mode != M_ADD && pwd == NULL
|
||||
&& strspn(a_name->val, "0123456789") == strlen(a_name->val)) {
|
||||
&& strspn(a_name->val, "0123456789") == strlen(a_name->val)
|
||||
&& *a_name->val) {
|
||||
(a_uid = a_name)->ch = 'u';
|
||||
a_name = NULL;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user