blob: 976c937330bad7e49cbb0a12cb28844e0450042c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
Patch for Debian bug #518908
The default namespace.init depends on GNU awk extensions. Make this portable
to POSIX awk.
Authors: Steve Langasek <vorlon@debian.org>
Upstream status: committed to CVS
Index: pam.deb/modules/pam_namespace/namespace.init
===================================================================
--- pam.deb.orig/modules/pam_namespace/namespace.init
+++ pam.deb/modules/pam_namespace/namespace.init
@@ -15,7 +15,8 @@
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
|