summaryrefslogtreecommitdiff
path: root/debian/patches-applied
diff options
context:
space:
mode:
authorSteve Langasek <vorlon@debian.org>2009-08-26 23:46:36 -0700
committerSteve Langasek <vorlon@debian.org>2019-01-08 21:25:58 -0800
commit02b41ab3244de44cbd8d374843375aaa9005bfa6 (patch)
treedc451360eb80679cd578c0d2f7c473e2e547c4f2 /debian/patches-applied
parentf53297b89ffe1cac19cbaf7339492a760f45bb5a (diff)
debian/patches/namespace_with_awk_not_gawk: fix the sample
namespace.init script's dependency on non-POSIX features of gawk, since we don't use gawk by default. Closes; #518908.
Diffstat (limited to 'debian/patches-applied')
-rw-r--r--debian/patches-applied/namespace_with_awk_not_gawk23
-rw-r--r--debian/patches-applied/series1
2 files changed, 24 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
diff --git a/debian/patches-applied/series b/debian/patches-applied/series
index 621868ef..e7f8120c 100644
--- a/debian/patches-applied/series
+++ b/debian/patches-applied/series
@@ -20,3 +20,4 @@ pam.d-manpage-section
autoconf.patch
update-motd
fix-man-crud
+namespace_with_awk_not_gawk