aboutsummaryrefslogtreecommitdiff
path: root/modules/pam_namespace/pam_namespace_helper.in
diff options
context:
space:
mode:
authorSteve Langasek <vorlon@debian.org>2020-12-27 22:05:13 -0800
committerSteve Langasek <vorlon@debian.org>2020-12-27 22:05:13 -0800
commitea04efa24985743014da9dd22c0581cbaef82ede (patch)
treedcbd0efb229b17f696f7195671f05b354b4f70fc /modules/pam_namespace/pam_namespace_helper.in
downloadpam-ea04efa24985743014da9dd22c0581cbaef82ede.tar.gz
pam-ea04efa24985743014da9dd22c0581cbaef82ede.tar.bz2
pam-ea04efa24985743014da9dd22c0581cbaef82ede.zip
Import pam_1.4.0.orig.tar.xz
[dgit import orig pam_1.4.0.orig.tar.xz]
Diffstat (limited to 'modules/pam_namespace/pam_namespace_helper.in')
-rw-r--r--modules/pam_namespace/pam_namespace_helper.in15
1 files changed, 15 insertions, 0 deletions
diff --git a/modules/pam_namespace/pam_namespace_helper.in b/modules/pam_namespace/pam_namespace_helper.in
new file mode 100644
index 00000000..b9c361fb
--- /dev/null
+++ b/modules/pam_namespace/pam_namespace_helper.in
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+CONF=@SCONFIGDIR@/namespace.conf
+
+# Match logic of process_line(), except lines with $HOME are ignored
+# skip the leading white space, rip off the comments, ignore empty lines
+sed -e 's/^[ ]*//g' -e 's/#.*//g' -e '/.*\$HOME.*/d' -e '/^$/d' < $CONF | \
+ while read polydir instance_prefix method uids; do
+ if [ ! -e "$instance_prefix" ]; then
+ echo "mkdir $instance_prefix"
+ mkdir --parents --mode=0 -Z "$instance_prefix"
+ fi
+ done
+
+exit 0