casacfgpam was corrected to install casa in the right place after common-auth, common-session, pam_unix2.so or the end of the section.
This commit is contained in:
parent
7d1f7c9ed7
commit
78997d2777
11
CASA.changes
11
CASA.changes
@ -1,3 +1,14 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Feb 8 17:45:50 MST 2006 - cmashayekhi@novell.com
|
||||||
|
|
||||||
|
- startup and shutdown script was modified to not
|
||||||
|
edit pam files.
|
||||||
|
- script to modify pam files for install, upgradeand
|
||||||
|
remove were created and spec file was modified to
|
||||||
|
call them.
|
||||||
|
- startup and shut down of the service during install
|
||||||
|
and upgrade was fixed.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Feb 7 14:00:59 MST 2006 - cmashayekhi@novell.com
|
Tue Feb 7 14:00:59 MST 2006 - cmashayekhi@novell.com
|
||||||
|
|
||||||
|
@ -1,25 +1,45 @@
|
|||||||
# Adding CASA pam entries to pam files.
|
# Adding CASA pam entries to pam files.
|
||||||
for pam_file in "/etc/pam.d/login" "/etc/pam.d/sshd" "/etc/pam.d/xdm" "/etc/pam.d/gdm" "/etc/pam.d/kdm"
|
for file in "/etc/pam.d/login" "/etc/pam.d/sshd" "/etc/pam.d/xdm" "/etc/pam.d/gdm" "/etc/pam.d/kdm"
|
||||||
do
|
do
|
||||||
if [ -f $pam_file ]
|
if [ -f $file ]
|
||||||
then
|
then
|
||||||
MICASA_D=`grep -i pam_micasa $pam_file`
|
sed -i '/pam_micasa/d' $file
|
||||||
if [ -z "$MICASA_D" ]
|
var=`grep pam_unix2.so $file`
|
||||||
|
entry=`echo -e "auth\t required\tpam_micasa.so"`
|
||||||
|
entry2=`echo -e "session\t required\tpam_micasa.so"`
|
||||||
|
cnt=0
|
||||||
|
if [ "$var" != "" ]
|
||||||
then
|
then
|
||||||
awk '
|
sed -i "/^auth.*required.*pam_unix2.so/a$entry" $file
|
||||||
/auth/ { authSeen++; }
|
sed -i "/^session.*required.*pam_unix2.so/a$entry2" $file
|
||||||
/account/ {
|
|
||||||
if (!acctSeen && authSeen)
|
else
|
||||||
{
|
let ' cnt = cnt + 1'
|
||||||
print "auth\trequired\tpam_micasa.so\n";}
|
fi
|
||||||
acctSeen++;
|
var2=`grep common-auth $file`
|
||||||
}
|
if [ "$var2" != "" ]
|
||||||
/session/ { sesSeen++; }
|
then
|
||||||
// {print $0; }
|
sed -i "/^auth.*include.*common-auth/a$entry" $file
|
||||||
END { if (sesSeen)
|
sed -i "/^session.*include.*common-session/a$entry2" $file
|
||||||
print "session\trequired\tpam_micasa.so\n"; }
|
else
|
||||||
' $pam_file > $pam_file.sav
|
let ' cnt = cnt + 1'
|
||||||
mv $pam_file.sav $pam_file
|
fi
|
||||||
|
if [ $cnt -eq 2 ]
|
||||||
|
then
|
||||||
|
awk '
|
||||||
|
/auth/ { authSeen++; }
|
||||||
|
/account/ {
|
||||||
|
if (!acctSeen && authSeen)
|
||||||
|
{
|
||||||
|
print "auth\trequired\tpam_micasa.so\n";}
|
||||||
|
acctSeen++;
|
||||||
|
}
|
||||||
|
/session/ { sesSeen++; }
|
||||||
|
// {print $0; }
|
||||||
|
END { if (sesSeen)
|
||||||
|
print "session\trequired\tpam_micasa.so\n"; }
|
||||||
|
' $file > $file.sav
|
||||||
|
mv $file.sav $file
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
done
|
done
|
Loading…
Reference in New Issue
Block a user