diff options
author | Wolfram Schneider <wosch@FreeBSD.org> | 1996-02-10 17:15:47 +0000 |
---|---|---|
committer | Wolfram Schneider <wosch@FreeBSD.org> | 1996-02-10 17:15:47 +0000 |
commit | 5038dc1abd9160d5fcfd91d75b1e45e735b3e2ae (patch) | |
tree | f396de3f2efe688de9262487339ff10537459d5a /usr.sbin/adduser/adduser.perl | |
parent | 537c20ded74ced7903e72e3d36302af27c692413 (diff) | |
download | src-5038dc1abd9160d5fcfd91d75b1e45e735b3e2ae.tar.gz src-5038dc1abd9160d5fcfd91d75b1e45e735b3e2ae.zip |
Submitted by: Masafumi NAKANE <masafumi@tky007.tth.expo96.ad.jp>
bugfix: chown home directory if don't copy dotfiles
Notes
Notes:
svn path=/head/; revision=14013
Diffstat (limited to 'usr.sbin/adduser/adduser.perl')
-rw-r--r-- | usr.sbin/adduser/adduser.perl | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/usr.sbin/adduser/adduser.perl b/usr.sbin/adduser/adduser.perl index 5b548e61edda..00556a12d621 100644 --- a/usr.sbin/adduser/adduser.perl +++ b/usr.sbin/adduser/adduser.perl @@ -32,7 +32,7 @@ # # Email: Wolfram Schneider <wosch@cs.tu-berlin.de> # -# $Id: adduser.perl,v 1.8 1995/10/19 06:26:49 jkh Exp $ +# $Id: adduser.perl,v 1.9 1995/10/22 11:44:16 jkh Exp $ # # read variables @@ -938,7 +938,13 @@ sub home_create { return 0; } - return mkdir("$homedir",0755) if $dotdir eq "no"; + if ($dotdir eq 'no') { + if (!mkdir("$homedir",0755)) { + warn "mkdir $homedir: $!\n"; return 0; + } + system 'chown', "$name:$group", $homedir; + return !$?; + } # copy files from $dotdir to $homedir # rename 'dot.foo' files to '.foo' |