Patch for Debian bug #518908 The default namespace.init depends on GNU awk extensions. Make this portable to POSIX awk. Authors: Steve Langasek 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