diff options
Diffstat (limited to 'debian/patches-applied/namespace_with_awk_not_gawk')
-rw-r--r-- | debian/patches-applied/namespace_with_awk_not_gawk | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/debian/patches-applied/namespace_with_awk_not_gawk b/debian/patches-applied/namespace_with_awk_not_gawk new file mode 100644 index 00000000..a5e8a994 --- /dev/null +++ b/debian/patches-applied/namespace_with_awk_not_gawk @@ -0,0 +1,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: submitted in <20090827064459.GK15373@dario.dodds.net> + +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 |