mirror of
https://git.FreeBSD.org/src.git
synced 2025-02-01 17:00:36 +00:00
Remove useless atoi(3), previous strspn(3) makes sure that a_name->val is a
number. This also allow pw user show to work as expected. PR: bin/172112 Submitted by: "Ilya A. Arkhipov" <rum1cro@yandex.ru> MFC after: 1 month
This commit is contained in:
parent
79823ad281
commit
e6e9c14bdf
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=241107
@ -314,8 +314,7 @@ 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)
|
||||
&& atoi(a_name->val) > 0) { /* Assume uid */
|
||||
&& strspn(a_name->val, "0123456789") == strlen(a_name->val)) {
|
||||
(a_uid = a_name)->ch = 'u';
|
||||
a_name = NULL;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user