summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2008-11-22 23:27:33 +0000
committerScott Ullrich <sullrich@pfsense.org>2008-11-22 23:27:33 +0000
commitd87218810db6631a054026a5452c39cb8b2c3740 (patch)
treecd911bf82b5fb06dfd699098789dd37af30e18d7 /etc
parenta18a5e6106089e19def8f5ad87579d9110b6def8 (diff)
downloadpfsense-d87218810db6631a054026a5452c39cb8b2c3740.zip
pfsense-d87218810db6631a054026a5452c39cb8b2c3740.tar.gz
When a new user home directory is created, copy the . (dot) root files.
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/auth.inc8
1 files changed, 5 insertions, 3 deletions
diff --git a/etc/inc/auth.inc b/etc/inc/auth.inc
index 58376cf..7f1e527 100644
--- a/etc/inc/auth.inc
+++ b/etc/inc/auth.inc
@@ -184,9 +184,9 @@ function local_user_set(& $user) {
$home_base = "/home/";
- if (!is_dir($home_base))
+ if (!is_dir($home_base))
mkdir($home_base, 0755);
-
+
$user_uid = $user['uid'];
$user_name = $user['name'];
$user_home = "{$home_base}/$user_name";
@@ -235,8 +235,10 @@ function local_user_set(& $user) {
pclose($fd);
/* create user directory if required */
- if (!is_dir($user_home))
+ if (!is_dir($user_home)) {
mkdir($user_home, 0700);
+ exec("cp /root/.* {$home_base}");
+ }
chown($user_home, $user_name);
chgrp($user_home, $user_group);
OpenPOWER on IntegriCloud