From 4c374e507d3bffdc79b6e34fb524b032b28fff6e Mon Sep 17 00:00:00 2001 From: "Cameron (Kamran) Mashayekhi" Date: Mon, 13 Feb 2006 16:52:25 +0000 Subject: [PATCH] scripts modified with -fstack-protect option, and micasad was updated to support try-restart and status commands. --- CASA.changes | 20 +++++++++++++++ c_micasad/startup/micasad | 44 +++++++++++++++++++++++++++----- shsrc/lshsrc/CASA.spec | 25 +++++++++++------- shsrc/lshsrc/mk-authkrb5token-ol | 2 +- shsrc/lshsrc/mk-authtoken-ol | 2 +- shsrc/lshsrc/mk-clientlogin-ol | 2 +- shsrc/lshsrc/mk-jmicasa-ol | 2 +- shsrc/lshsrc/mk-loginpam-ol | 2 +- shsrc/lshsrc/mk-micasa_gk-ol | 2 +- shsrc/lshsrc/mk-micasa_kw-ol | 2 +- shsrc/lshsrc/mk-micasacache-ol | 2 +- shsrc/lshsrc/mk-micasadk-ol | 2 +- shsrc/lshsrc/mk-pamauthtoken-ol | 2 +- 13 files changed, 84 insertions(+), 25 deletions(-) diff --git a/CASA.changes b/CASA.changes index 98fdfc75..2a8090cc 100644 --- a/CASA.changes +++ b/CASA.changes @@ -1,3 +1,23 @@ +------------------------------------------------------------------- +Mon Feb 13 8:50:22 MST 2006 - cmashayekhi@novell.com + +- compiler option -fstack-protector was added to the build scripts +- buffer overflow in pam-sscs.c was fixed. +- try-restart and status command line options were added to the + micad script and CASA.spec was updated + +------------------------------------------------------------------- +Thu Feb 9 13:57:41 CET 2006 - meissner@suse.de + +- disabled CASA by default again. #147934 +- fixed file lists +- actually builds on all Mono supporting platforms now. + +------------------------------------------------------------------- +Thu Feb 9 02:19:05 CET 2006 - mls@suse.de + +- converted neededforbuild to BuildRequires + ------------------------------------------------------------------- Wed Feb 8 17:45:50 MST 2006 - cmashayekhi@novell.com diff --git a/c_micasad/startup/micasad b/c_micasad/startup/micasad index ca624bc1..beb93073 100644 --- a/c_micasad/startup/micasad +++ b/c_micasad/startup/micasad @@ -30,34 +30,66 @@ rc_reset case "$1" in start) - echo -n "Starting miCASA daemon" + echo "Starting miCASA daemon" startproc -f $MICASAD_BIN # Remember status and be verbose rc_status -v ;; stop) - echo -n "Shutting miCASA daemon down" + echo "Shutting miCASA daemon down" #killproc -TERM $MICASAD_BIN - pid=`cat /var/run/micasad.pid` - kill -s TERM $pid + pid=`cat /var/run/micasad.pid` > /dev/null 2>&1 + kill -s TERM $pid > /dev/null 2>&1 # Remember status and be verbose rc_status -v ;; + try-restart|condrestart) +# $0 status >/dev/null && $0 restart + $0 restart + rc_status + ;; + restart) ## Stop the service and regardless of whether it was ## running or not, start it again. - echo -n "Restarting miCASA daemon" + echo "Restarting miCASA daemon" $0 stop $0 start # Remember status and be quiet rc_status ;; + + status) + echo "Checking for service micasad ..." + checkproc micasad + if [ $? == 0 ] + then + echo -n "0 - service up and running" + elif [ $? == 1 ] + then + echo -n "1 - service dead, but /var/run/pid file exists" + elif [ $? == 2 ] + then + echo -n "2 - service dead, but /var/lock/lock file exists" + elif [ $? == 3 ] + then + echo -n "3 - service not running (unused)" + elif [ $? == 4 ] + then + echo -n "4 - service status unknown" + else + echo -n "5--199 reserved (5--99 LSB, 100--149 distro, 150--199 appl.)" + fi + + rc_status -v + ;; + *) - echo "Usage: $0 {start|stop|restart}" + echo "Usage: $0 {start|stop|restart|try-restart|status}" exit 1 ;; esac diff --git a/shsrc/lshsrc/CASA.spec b/shsrc/lshsrc/CASA.spec index fcbcd7bc..579db08b 100644 --- a/shsrc/lshsrc/CASA.spec +++ b/shsrc/lshsrc/CASA.spec @@ -12,6 +12,7 @@ # neededforbuild glade-sharp gnome-filesystem mono mono-core gtk2-devel gtk2 gtk-sharp gtk-sharp-gapi glib-sharp glib2 glib2-devel qt3-devel gcc-c++ kdeutils3 kdelibs3-devel kdelibs3 qt3 qt3-devel kdesdk3 libstdc++-devel pkgconfig gnome-keyring gnome-keyring-devel glib-devel glib pam pam-devel java2 krb5-devel libgssapi Name: CASA +# Provo auto build does not hav the BuildRequires option yet... next line is for Germany. #BuildRequires: glade-sharp gnome-filesystem mono mono-core gtk2-devel gtk2 gtk-sharp gtk-sharp-gapi glib-sharp glib2 glib2-devel qt3-devel gcc-c++ kdeutils3 kdelibs3-devel kdelibs3 qt3 qt3-devel kdesdk3 libstdc++-devel pkgconfig gnome-keyring gnome-keyring-devel glib-devel glib pam pam-devel java2 krb5-devel libgssapi URL: http://www.novell.com/products %define prefix /usr/share/doc/packages @@ -149,18 +150,24 @@ echo "/usr/%{_lib}/" >> %{buildroot}/etc/ld.so.conf.d/CASA.conf %post +if [ $1 -eq 1 ] && [ $1 -eq 2 ] +then + insserv /etc/init.d/micasad + casacfgpam +# /etc/init.d/micasad start +fi + if [ $1 -eq 1 ] then - 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 + +#if [ $1 -eq 2 ] +#then +# insserv /etc/init.d/micasad +# casacfgpam +# /etc/init.d/micasad restart +#fi /sbin/ldconfig %post gui @@ -174,7 +181,7 @@ fi %postun -# %restart_on_update micasad *** This macro is not working *** +%restart_on_update %insserv_cleanup /sbin/ldconfig diff --git a/shsrc/lshsrc/mk-authkrb5token-ol b/shsrc/lshsrc/mk-authkrb5token-ol index d2a6fd8d..976e0ed2 100755 --- a/shsrc/lshsrc/mk-authkrb5token-ol +++ b/shsrc/lshsrc/mk-authkrb5token-ol @@ -20,7 +20,7 @@ fi cd $PR/auth_token/krb5_token/linux -(make -I $PR/make -f Makefile ROOT=$PR PLAT=lux MIN_NUM=\"$MIN_SSS_NO\" PROD_NUM=\"$MAJ_SSS_NO\" BLD_VER=\"$BLD_NO\" ARC=\"$ARCH_LIB\" XTRA=ndbg XTRA_CFLAGS="-I\".\" -I\"../..\" -DSSCS_LINUX_PLAT_F -02 -fmessage-length=0 -Wall -Wno-format-extra-args -fno-strict-aliasing " $2 $3 $4 $5) +(make -I $PR/make -f Makefile ROOT=$PR PLAT=lux MIN_NUM=\"$MIN_SSS_NO\" PROD_NUM=\"$MAJ_SSS_NO\" BLD_VER=\"$BLD_NO\" ARC=\"$ARCH_LIB\" XTRA=ndbg XTRA_CFLAGS="-I\".\" -I\"../..\" -DSSCS_LINUX_PLAT_F -02 -fmessage-length=0 -Wall -fstack-protector -Wno-format-extra-args -fno-strict-aliasing " $2 $3 $4 $5) RCODE=$? rm -f $COMMON_FILES if(test $RCODE != 0) diff --git a/shsrc/lshsrc/mk-authtoken-ol b/shsrc/lshsrc/mk-authtoken-ol index 2686ebdf..99039173 100755 --- a/shsrc/lshsrc/mk-authtoken-ol +++ b/shsrc/lshsrc/mk-authtoken-ol @@ -20,7 +20,7 @@ fi cd $PR/auth_token/linux -(make -I $PR/make -f Makefile ROOT=$PR PLAT=lux MIN_NUM=\"$MIN_SSS_NO\" PROD_NUM=\"$MAJ_SSS_NO\" BLD_VER=\"$BLD_NO\" ARC=\"$ARCH_LIB\" XTRA=ndbg XTRA_CFLAGS="-I\".\" -I\"..\" -DSSCS_LINUX_PLAT_F -02 -fmessage-length=0 -Wall -Wno-format-extra-args -fno-strict-aliasing " $2 $3 $4 $5) +(make -I $PR/make -f Makefile ROOT=$PR PLAT=lux MIN_NUM=\"$MIN_SSS_NO\" PROD_NUM=\"$MAJ_SSS_NO\" BLD_VER=\"$BLD_NO\" ARC=\"$ARCH_LIB\" XTRA=ndbg XTRA_CFLAGS="-I\".\" -I\"..\" -DSSCS_LINUX_PLAT_F -02 -fmessage-length=0 -Wall -fstack-protector -Wno-format-extra-args -fno-strict-aliasing " $2 $3 $4 $5) RCODE=$? rm -f $COMMON_FILES if(test $RCODE != 0) diff --git a/shsrc/lshsrc/mk-clientlogin-ol b/shsrc/lshsrc/mk-clientlogin-ol index 016ba416..8169e260 100644 --- a/shsrc/lshsrc/mk-clientlogin-ol +++ b/shsrc/lshsrc/mk-clientlogin-ol @@ -19,7 +19,7 @@ ARCH_LIB= fi cd $PR/c_clientlogin -(make -I $PR/make -f Makefile ROOT=$PR PLAT=lux MODULE=lib XTRA=ndbg MIN_NUM=\"$MIN_SSS_NO\" PROD_NUM=\"$MAJ_SSS_NO\" BLD_VER=\"$BLD_NO\" ARC=\"$ARCH_LIB\" XTRA_CFLAGS="-DSSCS_LINUX_PLAT_F -O2 -fmessage-length=0 -Wall " $2 $3 $5) +(make -I $PR/make -f Makefile ROOT=$PR PLAT=lux MODULE=lib XTRA=ndbg MIN_NUM=\"$MIN_SSS_NO\" PROD_NUM=\"$MAJ_SSS_NO\" BLD_VER=\"$BLD_NO\" ARC=\"$ARCH_LIB\" XTRA_CFLAGS="-DSSCS_LINUX_PLAT_F -O2 -fmessage-length=0 -Wall -fstack-protector" $2 $3 $5) RCODE=$? cp ./Release/nwautologin ../bin/lux/ndbg/. diff --git a/shsrc/lshsrc/mk-jmicasa-ol b/shsrc/lshsrc/mk-jmicasa-ol index 0f789ccc..a67eb4e1 100644 --- a/shsrc/lshsrc/mk-jmicasa-ol +++ b/shsrc/lshsrc/mk-jmicasa-ol @@ -42,7 +42,7 @@ exit $RCODE fi cd ../jnsscs -(make -I $PR/make -f Makefile ROOT=$PR PLAT=lux MODULE=lib XTRA=ndbg MIN_NUM=\"$MIN_SSS_NO\" PROD_NUM=\"$MAJ_SSS_NO\" BLD_VER=\"$BLD_NO\" ARC=\"$ARCH_LIB\" XTRA_CFLAGS="-I\"$JAVA_HOME/include\" -I\"$JAVA_HOME/include/linux\" -DDEBUG -g -DSSCS_LINUX_PLAT_F -O2 -fmessage-length=0 -Wall" $2 $3 $4 $5) +(make -I $PR/make -f Makefile ROOT=$PR PLAT=lux MODULE=lib XTRA=ndbg MIN_NUM=\"$MIN_SSS_NO\" PROD_NUM=\"$MAJ_SSS_NO\" BLD_VER=\"$BLD_NO\" ARC=\"$ARCH_LIB\" XTRA_CFLAGS="-I\"$JAVA_HOME/include\" -I\"$JAVA_HOME/include/linux\" -DDEBUG -g -DSSCS_LINUX_PLAT_F -O2 -fmessage-length=0 -Wall -fstack-protector" $2 $3 $4 $5) RCODE=$? rm -f $COMMON_FILES if(test $RCODE != 0) diff --git a/shsrc/lshsrc/mk-loginpam-ol b/shsrc/lshsrc/mk-loginpam-ol index 28db2578..5682bd86 100644 --- a/shsrc/lshsrc/mk-loginpam-ol +++ b/shsrc/lshsrc/mk-loginpam-ol @@ -20,7 +20,7 @@ fi cd $PR/login_capture/PAM -(make -I $PR/make -f Makefile ROOT=$PR PLAT=lux MIN_NUM=\"$MIN_SSS_NO\" PROD_NUM=\"$MAJ_SSS_NO\" BLD_VER=\"$BLD_NO\" ARC=\"$ARCH_LIB\" XTRA=ndbg XTRA_CFLAGS="-DSSCS_LINUX_PLAT_F -O2 -fmessage-length=0 -Wall -fno-strict-aliasing " $2 $3 $4 $5) +(make -I $PR/make -f Makefile ROOT=$PR PLAT=lux MIN_NUM=\"$MIN_SSS_NO\" PROD_NUM=\"$MAJ_SSS_NO\" BLD_VER=\"$BLD_NO\" ARC=\"$ARCH_LIB\" XTRA=ndbg XTRA_CFLAGS="-DSSCS_LINUX_PLAT_F -O2 -fmessage-length=0 -Wall -fno-strict-aliasing -fstack-protector" $2 $3 $4 $5) RCODE=$? rm -f $COMMON_FILES if(test $RCODE != 0) diff --git a/shsrc/lshsrc/mk-micasa_gk-ol b/shsrc/lshsrc/mk-micasa_gk-ol index ca24d31f..55aaa154 100644 --- a/shsrc/lshsrc/mk-micasa_gk-ol +++ b/shsrc/lshsrc/mk-micasa_gk-ol @@ -22,7 +22,7 @@ fi export PKG_CONFIG_PATH=/usr/lib$ARCH_LIB/pkgconfig:/opt/gnome/lib$ARCH_LIB/pkgconfig:/usr/local/lib$ARCH_LIB/pkgconfig cd $PR/c_adlib/ad_gk/native -(make -I $PR/make -f Makefile ROOT=$PR PLAT=lux MODULE=shared MIN_NUM=\"$MIN_SSS_NO\" PROD_NUM=\"$MAJ_SSS_NO\" BLD_VER=\"$BLD_NO\" ARC=\"$ARCH_LIB\" XTRA=ndbg XTRA_CFLAGS="`pkg-config --cflags gnome-keyring-1` `pkg-config --libs gnome-keyring-1` `pkg-config --cflags glib-2.0` `pkg-config --libs glib-2.0` -O2 -fmessage-length=0 -Wall" $2 $3 $4 $5) +(make -I $PR/make -f Makefile ROOT=$PR PLAT=lux MODULE=shared MIN_NUM=\"$MIN_SSS_NO\" PROD_NUM=\"$MAJ_SSS_NO\" BLD_VER=\"$BLD_NO\" ARC=\"$ARCH_LIB\" XTRA=ndbg XTRA_CFLAGS="`pkg-config --cflags gnome-keyring-1` `pkg-config --libs gnome-keyring-1` `pkg-config --cflags glib-2.0` `pkg-config --libs glib-2.0` -O2 -fmessage-length=0 -Wall -fstack-protector" $2 $3 $4 $5) RCODE=$? rm -f $COMMON_FILES if(test $RCODE != 0) diff --git a/shsrc/lshsrc/mk-micasa_kw-ol b/shsrc/lshsrc/mk-micasa_kw-ol index f561c2a4..1ae76c4a 100644 --- a/shsrc/lshsrc/mk-micasa_kw-ol +++ b/shsrc/lshsrc/mk-micasa_kw-ol @@ -24,7 +24,7 @@ fi #(ln -f $COMMON_FILES $PR/c_micasadk) cd $PR/c_adlib/ad_kw/native moc kwallets_rw.h -o kwallets_rw.moc -(make -I $PR/make -f Makefile ROOT=$PR PLAT=lux MODULE=shared MIN_NUM=\"$MIN_SSS_NO\" PROD_NUM=\"$MAJ_SSS_NO\" BLD_VER=\"$BLD_NO\" ARC=\"$ARCH_LIB\" XTRA=ndbg XTRA_CFLAGS="-I/opt/kde3/include -I/usr/lib/qt3/include -I/usr/X11R6/include -DSSCS_LINUX_PLAT_F -DQT_THREAD_SUPPORT -DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAS -O2 -fmessage-length=0 -Wall -g" $2 $3 $4 $5) +(make -I $PR/make -f Makefile ROOT=$PR PLAT=lux MODULE=shared MIN_NUM=\"$MIN_SSS_NO\" PROD_NUM=\"$MAJ_SSS_NO\" BLD_VER=\"$BLD_NO\" ARC=\"$ARCH_LIB\" XTRA=ndbg XTRA_CFLAGS="-I/opt/kde3/include -I/usr/lib/qt3/include -I/usr/X11R6/include -DSSCS_LINUX_PLAT_F -DQT_THREAD_SUPPORT -DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAS -O2 -fmessage-length=0 -Wall -fstack-protector -g" $2 $3 $4 $5) RCODE=$? rm -f $COMMON_FILES rm kwallets_rw.moc diff --git a/shsrc/lshsrc/mk-micasacache-ol b/shsrc/lshsrc/mk-micasacache-ol index 20be23c4..9fb30bd6 100644 --- a/shsrc/lshsrc/mk-micasacache-ol +++ b/shsrc/lshsrc/mk-micasacache-ol @@ -20,7 +20,7 @@ fi cd $PR/c_micasacache -(make -I $PR/make -f Makefile ROOT=$PR PLAT=lux MODULE=lib XTRA=ndbg MIN_NUM=\"$MIN_SSS_NO\" PROD_NUM=\"$MAJ_SSS_NO\" BLD_VER=\"$BLD_NO\" ARC=\"$ARCH_LIB\" XTRA_CFLAGS="-DSSCS_LINUX_PLAT_F -O2 -fmessage-length=0 -Wall" $2 $3 $5) +(make -I $PR/make -f Makefile ROOT=$PR PLAT=lux MODULE=lib XTRA=ndbg MIN_NUM=\"$MIN_SSS_NO\" PROD_NUM=\"$MAJ_SSS_NO\" BLD_VER=\"$BLD_NO\" ARC=\"$ARCH_LIB\" XTRA_CFLAGS="-DSSCS_LINUX_PLAT_F -O2 -fmessage-length=0 -Wall -fstack-protector" $2 $3 $5) RCODE=$? rm -f $COMMON_FILES if(test $RCODE != 0) diff --git a/shsrc/lshsrc/mk-micasadk-ol b/shsrc/lshsrc/mk-micasadk-ol index 435518bf..5b3b5a45 100644 --- a/shsrc/lshsrc/mk-micasadk-ol +++ b/shsrc/lshsrc/mk-micasadk-ol @@ -23,7 +23,7 @@ cd $PR/c_common COMMON_FILES=$(ls) (ln -f $COMMON_FILES $PR/c_micasadk) cd $PR/c_micasadk -(make -I $PR/make -f Makefile ROOT=$PR PLAT=lux MODULE=shared MIN_NUM=\"$MIN_SSS_NO\" PROD_NUM=\"$MAJ_SSS_NO\" BLD_VER=\"$BLD_NO\" ARC=\"$ARCH_LIB\" XTRA=ndbg XTRA_CFLAGS="-DSSCS_LINUX_PLAT_F -O2 -fmessage-length=0 -Wall" $2 $3 $4 $5) +(make -I $PR/make -f Makefile ROOT=$PR PLAT=lux MODULE=shared MIN_NUM=\"$MIN_SSS_NO\" PROD_NUM=\"$MAJ_SSS_NO\" BLD_VER=\"$BLD_NO\" ARC=\"$ARCH_LIB\" XTRA=ndbg XTRA_CFLAGS="-DSSCS_LINUX_PLAT_F -O2 -fmessage-length=0 -Wall -fstack-protector" $2 $3 $4 $5) RCODE=$? rm -f $COMMON_FILES if(test $RCODE != 0) diff --git a/shsrc/lshsrc/mk-pamauthtoken-ol b/shsrc/lshsrc/mk-pamauthtoken-ol index 5de2eb34..d60f611f 100755 --- a/shsrc/lshsrc/mk-pamauthtoken-ol +++ b/shsrc/lshsrc/mk-pamauthtoken-ol @@ -20,7 +20,7 @@ fi cd $PR/auth_token/PAM -(make -I $PR/make -f Makefile ROOT=$PR PLAT=lux MIN_NUM=\"$MIN_SSS_NO\" PROD_NUM=\"$MAJ_SSS_NO\" BLD_VER=\"$BLD_NO\" ARC=\"$ARCH_LIB\" XTRA=ndbg XTRA_CFLAGS="-I\".\" -I\"..\" -DSSCS_LINUX_PLAT_F -02 -fmessage-length=0 -Wall -Wno-format-extra-args -fno-strict-aliasing " $2 $3 $4 $5) +(make -I $PR/make -f Makefile ROOT=$PR PLAT=lux MIN_NUM=\"$MIN_SSS_NO\" PROD_NUM=\"$MAJ_SSS_NO\" BLD_VER=\"$BLD_NO\" ARC=\"$ARCH_LIB\" XTRA=ndbg XTRA_CFLAGS="-I\".\" -I\"..\" -DSSCS_LINUX_PLAT_F -02 -fmessage-length=0 -Wall -fstack-protector -Wno-format-extra-args -fno-strict-aliasing " $2 $3 $4 $5) RCODE=$? rm -f $COMMON_FILES if(test $RCODE != 0)