diff options
author | Steve Langasek <vorlon@debian.org> | 2010-07-29 20:16:39 -0700 |
---|---|---|
committer | Steve Langasek <vorlon@debian.org> | 2019-01-08 21:32:38 -0800 |
commit | 655c7a8843261079fecf0b6e15de77972a0eb708 (patch) | |
tree | 167aeb717538bdc9f685a652009038d586530779 /modules/pam_namespace/namespace.init | |
parent | 6ce511785e4b9751ef184236c2cf8f63bc25f512 (diff) | |
parent | 8645d4f5131d25692dfd78d3e1c46b03f33febf3 (diff) | |
download | pam-655c7a8843261079fecf0b6e15de77972a0eb708.tar.gz pam-655c7a8843261079fecf0b6e15de77972a0eb708.tar.bz2 pam-655c7a8843261079fecf0b6e15de77972a0eb708.zip |
merge from trunk
Diffstat (limited to 'modules/pam_namespace/namespace.init')
-rwxr-xr-x | modules/pam_namespace/namespace.init | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/pam_namespace/namespace.init b/modules/pam_namespace/namespace.init index 424c6d0c..9898bf3a 100755 --- a/modules/pam_namespace/namespace.init +++ b/modules/pam_namespace/namespace.init @@ -15,7 +15,8 @@ if [ "$3" = 1 ]; then gid=$(echo "$passwd" | cut -f4 -d":") cp -rT /etc/skel "$homedir" chown -R "$user":"$gid" "$homedir" - mode=$(awk '/^UMASK/{gsub("#.*$", "", $2); printf "%o", and(0777,compl(strtonum("0" $2))); exit}' /etc/login.defs) + mask=$(awk '/^UMASK/{gsub("#.*$", "", $2); print $2; exit}' /etc/login.defs) + mode=$(printf "%o" $((0777 & ~$mask))) chmod ${mode:-700} "$homedir" [ -x /sbin/restorecon ] && /sbin/restorecon -R "$homedir" fi |