aboutsummaryrefslogtreecommitdiffstats
path: root/fix_pamd
blob: c54e4ca5b31e5d92459e294e98efc2e36efdb459 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/sh
# $Id$

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..."
    perl -pi -e "s,/(lib|lib64)/security/,," $configs
    echo "done"
fi