From: <smi...@us...> - 2004-03-12 03:03:36
|
Update of /cvsroot/devil-linux/build/scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28658/scripts Modified Files: Tag: rel-1-0-patches functions Added Files: Tag: rel-1-0-patches super-freeswan Removed Files: Tag: rel-1-0-patches freeswan Log Message: - updated linux-wlan-ng to v0.2.1-pre20 - added Super-FreeS/WAN v1.99.8 - removed the standard FreeS/WAN + Patches - added Kernel patch to fix new mremap vulnerability - added Kernel patch for "Rusty's broken brain" error/failure. --- NEW FILE: super-freeswan --- #!/bin/bash # $Source: /cvsroot/devil-linux/build/scripts/super-freeswan,v $ # $Revision: 1.8.2.1 $ # $Date: 2004/03/12 02:36:31 $ # # http://www.devil-linux.org # you need the next line, otherwise script won't be executed !!! # DL-build-system v3 ### BEGIN INIT INFO # Provides: super-freeswan # Required-Start: $basebuildtools $libs # Required-Stop: # Default-Start: 1 2 # Default-Stop: # Description: description ### END INIT INFO # get the directoryname of the script MYDIR=${0%/*} # source functions and config source $MYDIR/settings source $MYDIR/functions MYNAME=FREESWAN KERNELDIR=$(find_src_dir linux) case $1 in build ) if [ "$CONFIG_SUPER_FREESWAN" = "y" ]; then # update kernel config DIRS="klips/net/ipsec/Config.in klips/net/ipsec/alg/Confi*" for DIR in $DIRS do echo $DIR for CFG in $( grep tristate $DIR | cut -d "'" -f 3 | cut -d " " -f 2 ); do set_kernel_option $CFG m done for CFG in $( grep bool $DIR | cut -d "'" -f 3 | cut -d " " -f 2 ); do if [ ! "$CFG" = "CONFIG_IPSEC_DEBUG" ] \ && [ ! "$CFG" = "CONFIG_IPSEC_ALG_NON_LIBRE" ] \ && [ ! "$CFG" = "CONFIG_IPSEC_ALG_CRYPTOAPI" ]; then set_kernel_option $CFG y fi done done set_kernel_option CONFIG_IPSEC m set_kernel_option CONFIG_IPSEC_DEBUG n set_kernel_option CONFIG_IPSEC_ALG_NON_LIBRE n set_kernel_option CONFIG_IPSEC_ALG_CRYPTOAPI n replace_str Makefile.inc /usr/local /usr replace_str Makefile.inc /usr/src/linux $KERNELDIR replace_str ./fswcert/Makefile /usr/local /usr KERNELSRC=$KERNELDIR # compile freeswan # parallel build fails - do not use $PMAKE FLAGS="" if [ "$CONFIG_GCC_STACK_PROTECTOR" = "y" ]; then FLAGS="CFLAGS_EXTRA=-fno-stack-protector" fi # parallel build files - do not use $PMAKE yes "" | make $FLAGS oldmod || exit 1 make programs || exit 1 strip_debug fi ;; install ) if [ "$CONFIG_SUPER_FREESWAN" = "y" ]; then rm -rf $WORKDIR/tmp mkdir -p $WORKDIR/tmp || exit 1 make install DESTDIR=$WORKDIR/tmp || exit 1 copy_docs $WORKDIR/tmp mkdir -p $DOCDIR/freeswan || exit 1 cp -dpR doc/* $DOCDIR/freeswan || exit 1 cp -dpR CHANGES* $DOCDIR/freeswan || exit 1 cp -dpR README* $DOCDIR/freeswan || exit 1 rm -rf $WORKDIR/tmp/usr/local || exit 1 cp -dpR $WORKDIR/tmp/usr $CDDIR || exit 1 cp -dpR $WORKDIR/tmp/etc/ipsec.* $ETCDIR/etc/ || exit 1 cp -p $MYDIR/scripts/ipsec $ETCDIR/etc/init.d || exit 1 rm -rf $WORKDIR/tmp || exit 1 mkdir -pm 700 $ETCDIR/etc/ipsec.d/cacerts || exit 1 mkdir -pm 700 $ETCDIR/etc/ipsec.d/crls || exit 1 # fix a problem with the read-only modules.dep replace_str $CDDIR/usr/lib/ipsec/_startklips "depmod -a >" "depmod -an >" rm $CDDIR/usr/lib/ipsec/_startklips.old echo "# Start $MYNAME?" >> $CONFIGFILE echo "START_IPSEC=no" >> $CONFIGFILE echo >> $CONFIGFILE echo "HELP_IPSEC=\"IPSEC is the $MYNAME VPN using the IPSEC protocol\"" >> $SOFTWAREHELP fi ;; * ) echo "ERROR ($0)" echo "please add parameter so I know what to do" exit 1 ;; esac Index: functions =================================================================== RCS file: /cvsroot/devil-linux/build/scripts/functions,v retrieving revision 1.41.2.1 retrieving revision 1.41.2.2 diff -u -d -r1.41.2.1 -r1.41.2.2 --- functions 12 Jan 2004 15:56:26 -0000 1.41.2.1 +++ functions 12 Mar 2004 02:36:31 -0000 1.41.2.2 @@ -373,3 +373,25 @@ return 1 fi } + +function add_kernel_options() { + marker="# file added $1" + c=`grep -c "$marker" $KERNELDIR/.config` + if [ $c -eq 1 ]; then + return + fi + echo "$marker" >>$KERNELDIR/.config + cat $1 >>$KERNELDIR/.config +} + +function set_kernel_option () { + c=`grep -c "$1=" $KERNELDIR/.config` + if [ $c -ne 0 ]; then + sed "s/^$1=.*/$1=$2/" $KERNELDIR/.config >/tmp/.config + mv /tmp/.config $KERNELDIR/.config + else + echo "$1=$2" >>$KERNELDIR/.config + fi + +} + --- freeswan DELETED --- |