aboutsummaryrefslogtreecommitdiffstats
path: root/fix_pamd
blob: 0f3e360e8271ca59196266cbcc490ab95ea14338 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/sh
# $Id: fix_pamd 257534 2009-05-23 12:45:44Z guillomovitch $

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