Do not treat empty name as an uid 0

Reported by:	Robert Bonomi <bonomi@mail.r-bonomi.com>
This commit is contained in:
Baptiste Daroussin 2012-10-01 17:00:33 +00:00
parent e6e9c14bdf
commit e7e5ec8773

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