mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-11-17 16:10:46 +01:00
Submitted by: Masafumi NAKANE <masafumi@tky007.tth.expo96.ad.jp>
bugfix: chown home directory if don't copy dotfiles
This commit is contained in:
parent
537c20ded7
commit
5038dc1abd
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=14013
@ -32,7 +32,7 @@
|
|||||||
#
|
#
|
||||||
# Email: Wolfram Schneider <wosch@cs.tu-berlin.de>
|
# 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
|
# read variables
|
||||||
@ -938,7 +938,13 @@ sub home_create {
|
|||||||
return 0;
|
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
|
# copy files from $dotdir to $homedir
|
||||||
# rename 'dot.foo' files to '.foo'
|
# rename 'dot.foo' files to '.foo'
|
||||||
|
Loading…
Reference in New Issue
Block a user