Do not treat empty name as an uid 0

Reported by:	Robert Bonomi <bonomi@mail.r-bonomi.com>
This commit is contained in:
bapt 2012-10-01 17:00:33 +00:00
parent 750731b250
commit d80e087677

View File

@ -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;
}