aboutsummaryrefslogtreecommitdiffstats
path: root/fix_pamd
diff options
context:
space:
mode:
Diffstat (limited to 'fix_pamd')
-rwxr-xr-xfix_pamd10
1 files changed, 10 insertions, 0 deletions
diff --git a/fix_pamd b/fix_pamd
index 895c44e..c87cb7d 100755
--- a/fix_pamd
+++ b/fix_pamd
@@ -1,5 +1,15 @@
#!/bin/sh
+if [ -z "$RPM_BUILD_ROOT" ]; then
+ echo "No build root defined" >&2
+ exit 1
+fi
+
+if [ ! -d "$RPM_BUILD_ROOT" ]; then
+ echo "Invalid build root" >&2
+ exit 1
+fi
+
configs=`find $RPM_BUILD_ROOT/etc/pam.d/ -type f ! -type l 2> /dev/null`
if [ -n "$configs" ]; then
echo -n "Fixing pam.d config files..."