From 3012345ebdb37609dcb8c3486acf2ac9a631e891 Mon Sep 17 00:00:00 2001 From: "Cameron (Kamran) Mashayekhi" Date: Thu, 27 Oct 2005 22:17:29 +0000 Subject: [PATCH] nomsg --- c_micasad/startup/micasad | 32 ++++++++++++++++- shsrc/lshsrc/CASA.spec | 75 ++++++++++++++++++--------------------- 2 files changed, 65 insertions(+), 42 deletions(-) diff --git a/c_micasad/startup/micasad b/c_micasad/startup/micasad index fbe0b016..606e05e0 100644 --- a/c_micasad/startup/micasad +++ b/c_micasad/startup/micasad @@ -24,6 +24,28 @@ case "$1" in start) echo -n "Starting miCASA daemon" + for file in "/etc/pam.d/login" "/etc/pam.d/sshd" "/etc/pam.d/xdm" "/etc/pam.d/gdm" "/etc/pam.d/kdm" + do + + if [ -f $name ] + 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 + startproc -f $MICASAD_BIN # Remember status and be verbose @@ -36,7 +58,15 @@ case "$1" in pid=`cat /var/run/micasad.pid` kill -s TERM $pid - + for file in "/etc/pam.d/login" "/etc/pam.d/sshd" "/etc/pam.d/xdm" "/etc/pam.d/gdm" "/etc/pam.d/kdm" + do + if [ -f $name ] + then + sed '/pam_micasa/d' $file > $file.sav + mv $file.sav $file + fi + done + # Remember status and be verbose rc_status -v ;; diff --git a/shsrc/lshsrc/CASA.spec b/shsrc/lshsrc/CASA.spec index 624ba6e4..e0d03310 100644 --- a/shsrc/lshsrc/CASA.spec +++ b/shsrc/lshsrc/CASA.spec @@ -182,57 +182,50 @@ cp %{buildroot}%{prefix}/CASA/bin/micasad %{buildroot}/etc/init.d if [ $1 -eq 1 ] then insserv /etc/init.d/micasad - %ifarch x86_64 - echo "/opt/novell/CASA/lib64/" >> /etc/ld.so.conf.d/CASA.conf + echo "/opt/novell/CASA/%{_lib}/" >> /etc/ld.so.conf.d/CASA.conf /sbin/ldconfig - %else - echo "/opt/novell/CASA/lib/" >> /etc/ld.so.conf.d/CASA.conf - /sbin/ldconfig - %endif - for 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" # for file in "/etc/security/pam_unix2.conf" - do - - if [ -f $name ] - 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 - done +# do +# +# if [ -f $name ] +# 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 +# done fi %preun if [ $1 -eq 0 ] then - for 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" # for file in "/etc/security/pam_unix2.conf" - do - if [ -f $name ] - then - sed '/pam_micasa/d' $file > $file.sav - mv $file.sav $file - fi - done - - sed '/CASA/d' "/etc/ld.so.conf" > "/etc/ld.so.conf.sav" - mv /etc/ld.so.conf.sav /etc/ld.so.conf - -/sbin/ldconfig -insserv -r /etc/init.d/micasad +# do +# if [ -f $name ] +# then +# sed '/pam_micasa/d' $file > $file.sav +# mv $file.sav $file +# fi +# done +# + rm -f /etc/ld.so.conf.d/CASA.conf + /sbin/ldconfig + insserv -r /etc/init.d/micasad fi %clean