summaryrefslogtreecommitdiff
path: root/usr.sbin/adduser
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2001-10-01 15:26:34 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2001-10-01 15:26:34 +0000
commit5063984e00c109195f43c36af80972041dca52b2 (patch)
tree289b0692ace445cc025b7dee5aa0c6e05813d111 /usr.sbin/adduser
parent4758099a0ffe9540d4e992bb78e6e0372bc362b5 (diff)
Do proper initialization of hashes and lists. Use "cp -R" not "cp -r"
since the latter form is discouraged. From raj@cerias.purdue.edu
Diffstat (limited to 'usr.sbin/adduser')
-rw-r--r--usr.sbin/adduser/adduser.perl18
1 files changed, 9 insertions, 9 deletions
diff --git a/usr.sbin/adduser/adduser.perl b/usr.sbin/adduser/adduser.perl
index aa2e6908ce7..ff271c53585 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.32 2001/09/07 20:34:11 millert Exp $
+# $OpenBSD: adduser.perl,v 1.33 2001/10/01 15:26:33 millert Exp $
#
# Copyright (c) 1995-1996 Wolfram Schneider <wosch@FreeBSD.org>. Berlin.
# All rights reserved.
@@ -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.32 2001/09/07 20:34:11 millert Exp $';
+ $rcsid = '$OpenBSD: adduser.perl,v 1.33 2001/10/01 15:26:33 millert Exp $';
# List of directories where shells located
@path = ('/bin', '/usr/bin', '/usr/local/bin');
@@ -116,10 +116,10 @@ sub variables {
# group
%groupname = (); # $groupname{groupname} = gid
%groupmembers = (); # $groupmembers{gid} = members of group/kommalist
- %gid = ''; # $gid{gid} = groupname; gid form group db
+ %gid = (); # $gid{gid} = groupname; gid form group db
# shell
- %shell = ''; # $shell{`basename sh`} = sh
+ %shell = (); # $shell{`basename sh`} = sh
# only for me (=Wolfram)
if ($test) {
@@ -136,10 +136,10 @@ sub variables {
umask 022; # don't give login group write access
$ENV{'PATH'} = "/sbin:/bin:/usr/sbin:/usr/bin";
- @passwd_backup = '';
- @group_backup = '';
- @message_buffer = '';
- @user_variable_list = ''; # user variables in /etc/adduser.conf
+ @passwd_backup = ();
+ @group_backup = ();
+ @message_buffer = ();
+ @user_variable_list = (); # user variables in /etc/adduser.conf
$do_not_delete = '## DO NOT DELETE THIS LINE!';
}
@@ -1096,7 +1096,7 @@ sub home_create {
# copy files from $dotdir to $homedir
# rename 'dot.foo' files to '.foo'
print "Copy files from $dotdir to $homedir\n" if $verbose;
- system("cp", "-r", $dotdir, $homedir);
+ system("cp", "-R", $dotdir, $homedir);
system("chmod", "-R", "u+wrX,go-w", $homedir);
system("chown", "-R", "$name:$group", $homedir);