diff --git a/c_doc/SSCSLLD.doc b/c_doc/SSCSLLD.doc index 6c910483..60a20524 100644 Binary files a/c_doc/SSCSLLD.doc and b/c_doc/SSCSLLD.doc differ diff --git a/c_micasad/startup/casacfgpam b/c_micasad/startup/casacfgpam new file mode 100755 index 00000000..bb60fa55 --- /dev/null +++ b/c_micasad/startup/casacfgpam @@ -0,0 +1,25 @@ +# 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" +do + if [ -f $pam_file ] + then + MICASA_D=`grep -i pam_micasa $pam_file` + if [ -z "$MICASA_D" ] + 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"; } + ' $pam_file > $pam_file.sav + mv $pam_file.sav $pam_file + fi + fi +done diff --git a/c_micasad/startup/casaucfgpam b/c_micasad/startup/casaucfgpam new file mode 100644 index 00000000..0281b3fa --- /dev/null +++ b/c_micasad/startup/casaucfgpam @@ -0,0 +1,9 @@ +# Remove the CASA pam entries from 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" +do + if [ -f $pam_file ] + then + sed -i '/pam_micasa/d' $pam_file + fi +done + diff --git a/c_micasad/startup/micasad b/c_micasad/startup/micasad index 7c036c15..ca624bc1 100644 --- a/c_micasad/startup/micasad +++ b/c_micasad/startup/micasad @@ -30,51 +30,22 @@ rc_reset case "$1" in start) - echo -n "Starting miCASA daemon" - for pam_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 $pam_file ] - then - MICASA_D=`grep -i micasad $pam_file` - if [ -z "$MICASA_D"] - then - awk ' - /auth/ { authSeen++; } - /account/ { - if (!acctSeen && authSeen) - { - print "auth\trequired\tpam_micasa.so";} - acctSeen++; - } - /session/ { sesSeen++; } - // {print $0; } - END { if (sesSeen) - print "session\trequired\tpam_micasa.so"; } - ' $pam_file > $pam_file.sav - mv $pam_file.sav $pam_file - fi - fi - done - startproc -f $MICASAD_BIN - # Remember status and be verbose - rc_status -v - ;; + echo -n "Starting miCASA daemon" + startproc -f $MICASAD_BIN + # Remember status and be verbose + rc_status -v + ;; + stop) - echo -n "Shutting miCASA daemon down" - #killproc -TERM $MICASAD_BIN + echo -n "Shutting miCASA daemon down" + #killproc -TERM $MICASAD_BIN pid=`cat /var/run/micasad.pid` kill -s TERM $pid - for pam_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 $pam_file ] - then - sed -i '/pam_micasa/d' $pam_file - fi - done - # Remember status and be verbose - rc_status -v - ;; + # Remember status and be verbose + rc_status -v + ;; + restart) ## Stop the service and regardless of whether it was ## running or not, start it again. diff --git a/shsrc/lshsrc/CASA.spec b/shsrc/lshsrc/CASA.spec index 81edaf13..fcbcd7bc 100644 --- a/shsrc/lshsrc/CASA.spec +++ b/shsrc/lshsrc/CASA.spec @@ -109,6 +109,8 @@ install -m 755 c_gui/images/* %{buildroot}%{prefix}/CASA/images install -m 755 c_gui/help/en/* %{buildroot}%{prefix}/CASA/help/en install -m 755 c_micasad/startup/micasad %{buildroot}%{bin_prefix}/bin install -m 755 c_micasad/startup/micasad.sh %{buildroot}%{bin_prefix}/bin +install -m 755 c_micasad/startup/casacfgpam %{buildroot}%{bin_prefix}/bin +install -m 755 c_micasad/startup/casaucfgpam %{buildroot}%{bin_prefix}/bin install -m 755 %{_lib}/lux/ndbg/pam_micasa.so %{buildroot}/%{_lib}/security @@ -127,7 +129,6 @@ install -m 644 doc/License.txt %{buildroot}%{prefix}/CASA/doc install -m 644 doc/Readme.txt %{buildroot}%{prefix}/CASA/doc install -m 644 include/micasa_mgmd.h %{buildroot}%{bin_prefix}/include install -m 644 include/micasa_types.h %{buildroot}%{bin_prefix}/include -install -m 644 include/micasa.h %{buildroot}%{bin_prefix}/include ln -s libmicasa.so.%{bldno} %{buildroot}%{bin_prefix}/%{_lib}/libmicasa.so ln -s libmicasa.so.%{bldno} %{buildroot}%{bin_prefix}/%{_lib}/libmicasa.so.1 @@ -150,19 +151,31 @@ echo "/usr/%{_lib}/" >> %{buildroot}/etc/ld.so.conf.d/CASA.conf %post if [ $1 -eq 1 ] then - insserv /etc/init.d/micasad + insserv /etc/init.d/micasad + casacfgpam + /etc/init.d/micasad start fi +if [ $1 -eq 2 ] +then + insserv /etc/init.d/micasad + casacfgpam + /etc/init.d/micasad restart +fi /sbin/ldconfig %post gui /sbin/ldconfig %preun - - %stop_on_removal micasad +if [ $1 -eq 0 ] +then + casaucfgpam +fi + %postun -%restart_on_update micasad +# %restart_on_update micasad *** This macro is not working *** + %insserv_cleanup /sbin/ldconfig @@ -186,17 +199,11 @@ rm -rf $RPM_BUILD_ROOT %dir %{bin_prefix}/%{_lib}/Novell.CASA.miCASAWrapper.dll %dir %{bin_prefix}/%{_lib}/Novell.CASA.Common.dll -%dir %{bin_prefix}/%{_lib}/libmicasa.so -%dir %{bin_prefix}/%{_lib}/libmicasa.so.1 -%dir %{bin_prefix}/%{_lib}/libjmicasa.so -%dir %{bin_prefix}/%{_lib}/libjmicasa.so.1 - -%dir %{bin_prefix}/%{_lib}/Novell.CASA.miCASAWrapper.dll -%dir %{bin_prefix}/%{_lib}/Novell.CASA.Common.dll - %dir %{bin_prefix}/bin %{bin_prefix}/bin/micasad %{bin_prefix}/bin/micasad.sh +%{bin_prefix}/bin/casacfgpam +%{bin_prefix}/bin/casaucfgpam %{bin_prefix}/bin/micasad.exe %{prefix}/CASA/doc/CASA_Reference_Guide.pdf