diff options
author | dd <dd@FreeBSD.org> | 2001-08-20 01:20:05 +0000 |
---|---|---|
committer | dd <dd@FreeBSD.org> | 2001-08-20 01:20:05 +0000 |
commit | b18f165e4023416faa4a667a93aba33a232ca733 (patch) | |
tree | 84ea5ea776633d89e053c4b90a04a2d4eac540ad /usr.sbin/adduser | |
parent | 0b3018edbb61412f108db1b8f2a351cbf913c4ce (diff) | |
download | FreeBSD-src-b18f165e4023416faa4a667a93aba33a232ca733.zip FreeBSD-src-b18f165e4023416faa4a667a93aba33a232ca733.tar.gz |
Pass the username we just made to pwd_mkdb so that the latter doesn't
have to regenerate the entire database.
PR: 25798
Submitted by: Domas Mituzas <domas.mituzas@delfi.lt>
Diffstat (limited to 'usr.sbin/adduser')
-rw-r--r-- | usr.sbin/adduser/adduser.perl | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.sbin/adduser/adduser.perl b/usr.sbin/adduser/adduser.perl index 58cffec..b0dc174 100644 --- a/usr.sbin/adduser/adduser.perl +++ b/usr.sbin/adduser/adduser.perl @@ -559,9 +559,10 @@ EOF # make password database sub new_users_pwdmkdb { - local($last) = @_; + local($last) = shift; + local($name) = shift; - system("$pwd_mkdb $etc_passwd"); + system("$pwd_mkdb -u $name $etc_passwd"); if ($?) { warn "$last\n"; warn "``$pwd_mkdb'' failed\n"; @@ -793,7 +794,7 @@ sub new_users { $new_entry = "$name\:" . "$cryptpwd" . "\:$u_id\:$g_id\:$class\:0:0:$fullname:$userhome:$sh"; &append_file($etc_passwd, "$new_entry"); - &new_users_pwdmkdb("$new_entry"); + &new_users_pwdmkdb("$new_entry", $name); &new_users_group_update; &new_users_passwd_update; print "Added user ``$name''\n"; &new_users_sendmessage; |