summaryrefslogtreecommitdiffstats
path: root/usr.sbin/adduser
diff options
context:
space:
mode:
authormillert <millert@openbsd.org>2003-06-08 21:05:29 +0000
committermillert <millert@openbsd.org>2003-06-08 21:05:29 +0000
commit8725aaba6cb141b18514f337fa7daee893dcf77d (patch)
treea8d70464129e4e9a50d6f79a838a758d8de88299 /usr.sbin/adduser
parentAdd check for group too long and made an invalid group a fatal error (diff)
downloadwireguard-openbsd-8725aaba6cb141b18514f337fa7daee893dcf77d.tar.xz
wireguard-openbsd-8725aaba6cb141b18514f337fa7daee893dcf77d.zip
Instead of splitting a flat string into a list for system(), just
pass it a list in the first place. Also fix up some spacing.
Diffstat (limited to 'usr.sbin/adduser')
-rw-r--r--usr.sbin/adduser/adduser.perl12
1 files changed, 6 insertions, 6 deletions
diff --git a/usr.sbin/adduser/adduser.perl b/usr.sbin/adduser/adduser.perl
index f50487136cd..3d05d905647 100644
--- a/usr.sbin/adduser/adduser.perl
+++ b/usr.sbin/adduser/adduser.perl
@@ -1,6 +1,6 @@
#!/usr/bin/perl
#
-# $OpenBSD: adduser.perl,v 1.42 2003/05/13 01:23:10 millert Exp $
+# $OpenBSD: adduser.perl,v 1.43 2003/06/08 21:05:29 millert Exp $
#
# Copyright (c) 1995-1996 Wolfram Schneider <wosch@FreeBSD.org>. Berlin.
# All rights reserved.
@@ -47,7 +47,7 @@ $SIG{'TERM'} = 'cleanup';
&config_read(@ARGV); # read variables from config-file
&parse_arguments(@ARGV); # parse arguments
-if (!$check_only && $#batch < 0) {
+if (!$check_only && $#batch < 0) {
&hints;
}
@@ -89,7 +89,7 @@ sub variables {
$group = "/etc/group";
$pwd_mkdb = "pwd_mkdb -p"; # program for building passwd database
$encryptionmethod = "blowfish";
- $rcsid = '$OpenBSD: adduser.perl,v 1.42 2003/05/13 01:23:10 millert Exp $';
+ $rcsid = '$OpenBSD: adduser.perl,v 1.43 2003/06/08 21:05:29 millert Exp $';
# List of directories where shells located
@path = ('/bin', '/usr/bin', '/usr/local/bin');
@@ -285,7 +285,7 @@ sub home_partition_valid {
# check for valid passwddb
sub passwd_check {
- system(split(/\s+/, "$pwd_mkdb -c $etc_passwd"));
+ system($pwd_mkdb, "-c", $etc_passwd);
die "\nInvalid $etc_passwd - cannot add any users!\n" if $?;
}
@@ -605,7 +605,7 @@ sub new_users_pwdmkdb {
local($user);
$user = (split(/:/, $last))[0];
- system(split(/\s+/, "$pwd_mkdb -u $user $etc_passwd"));
+ system($pwd_mkdb, "-u", $user, $etc_passwd);
if ($?) {
warn "$last\n";
warn "``$pwd_mkdb'' failed\n";
@@ -1085,7 +1085,7 @@ sub home_create {
}
if ($dotdir eq 'no') {
- if (!mkdir("$homedir",0755)) {
+ if (!mkdir("$homedir", 0755)) {
warn "mkdir $homedir: $!\n"; return 0;
}
system 'chown', "$name:$group", $homedir;