rpms/nessus-core/devel nessus-core-2.2.4.Makefile.patch, NONE, 1.1 nessus-core-2.2.4.config.h.in.patch, NONE, 1.1 nessus-core-2.2.4.configure.in.patch, NONE, 1.1 nessus-core-2.2.4.configure.patch, NONE, 1.1 nessus-core-2.2.4.gd.patch, NONE, 1.1 nessus-core-2.2.4.nessus-adduser.in.patch, NONE, 1.1 nessus-core-2.2.4.nessus-mkcert.patch, NONE, 1.1 nessus-core-2.2.4.nessus-rmuser.in.patch, NONE, 1.1 nessus-core-2.2.4.nessus.tmpl.in.patch, NONE, 1.1 nessus-core-2.2.4.pid.patch, NONE, 1.1 nessus-core-2.2.4.pki.patch, NONE, 1.1 nessus-core.spec, NONE, 1.1 nessus.desktop, NONE, 1.1 nessusd.init, NONE, 1.1 nessusd.log, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2

Andreas Bierfert (awjb) fedora-extras-commits at redhat.com
Fri Apr 7 06:21:26 UTC 2006


Author: awjb

Update of /cvs/extras/rpms/nessus-core/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv4819/devel

Modified Files:
	.cvsignore sources 
Added Files:
	nessus-core-2.2.4.Makefile.patch 
	nessus-core-2.2.4.config.h.in.patch 
	nessus-core-2.2.4.configure.in.patch 
	nessus-core-2.2.4.configure.patch nessus-core-2.2.4.gd.patch 
	nessus-core-2.2.4.nessus-adduser.in.patch 
	nessus-core-2.2.4.nessus-mkcert.patch 
	nessus-core-2.2.4.nessus-rmuser.in.patch 
	nessus-core-2.2.4.nessus.tmpl.in.patch 
	nessus-core-2.2.4.pid.patch nessus-core-2.2.4.pki.patch 
	nessus-core.spec nessus.desktop nessusd.init nessusd.log 
Log Message:
auto-import nessus-core-2.2.6-3 on branch devel from nessus-core-2.2.6-3.src.rpm

nessus-core-2.2.4.Makefile.patch:

--- NEW FILE nessus-core-2.2.4.Makefile.patch ---
diff -Nrup nessus-core.orig/Makefile nessus-core/Makefile
--- nessus-core.orig/Makefile	2005-03-14 23:33:13.000000000 +0100
+++ nessus-core/Makefile	2005-07-05 19:40:57.000000000 +0200
@@ -34,7 +34,7 @@ install-bin:
 	test -d $(DESTDIR)${localstatedir} || $(INSTALL_DIR) -m 755 $(DESTDIR)${localstatedir}
 	test -d $(DESTDIR)${NESSUSD_STATEDIR} || $(INSTALL_DIR) -m 755 $(DESTDIR)${NESSUSD_STATEDIR}
 	test -d $(DESTDIR)${NESSUSD_STATEDIR}/users || $(INSTALL_DIR) -m 755 $(DESTDIR)${NESSUSD_STATEDIR}/users
-	test -d $(DESTDIR)${NESSUSD_STATEDIR}/logs  || $(INSTALL_DIR) -m 755 $(DESTDIR)${NESSUSD_STATEDIR}/logs
+	test -d $(DESTDIR)${NESSUSD_LOGDIR}  || $(INSTALL_DIR) -m 755 $(DESTDIR)${NESSUSD_LOGDIR}
 	test -d $(DESTDIR)${NESSUSD_STATEDIR}/tmp || $(INSTALL_DIR) -m 755 $(DESTDIR)${NESSUSD_STATEDIR}/tmp
 	test -d $(DESTDIR)${NESSUSD_STATEDIR}/jobs  || $(INSTALL_DIR) -m 755 $(DESTDIR)${NESSUSD_STATEDIR}/jobs
 	test -d $(DESTDIR)${NESSUSD_LOGDIR} || $(INSTALL_DIR) -m 755 $(DESTDIR)${NESSUSD_LOGDIR}

nessus-core-2.2.4.config.h.in.patch:

--- NEW FILE nessus-core-2.2.4.config.h.in.patch ---
--- nessus-core.orig/include/config.h.in	2004-10-07 16:46:32.000000000 +0200
+++ nessus-core/include/config.h.in	2005-07-03 13:10:59.000000000 +0200
@@ -74,9 +74,9 @@
 #define NESSUSD_LOGS     NESSUSD_LOGDIR
 #define NESSUSD_LOGINS   NESSUSD_STATEDIR "/users"
 #define NESSUSD_JOBS	NESSUSD_STATEDIR  "/jobs"
-#define NESSUSD_CERTS	NESSUSD_STATEDIR "/certs"
+#define NESSUSD_CERTS	NESSUSD_PKIDIR "/certs"
 
-#define NESSUSD_CA	NESSUSD_SHAREDSTATEDIR "/CA"
+#define NESSUSD_CA	NESSUSD_PKIDIR "/CA"
 
 
 

nessus-core-2.2.4.configure.in.patch:

--- NEW FILE nessus-core-2.2.4.configure.in.patch ---
--- nessus-core.orig/configure.in	2005-02-08 02:40:42.000000000 +0100
+++ nessus-core/configure.in	2005-07-03 16:43:12.000000000 +0200
@@ -705,14 +705,16 @@
 dnl Final step : substitute what we want to
 
 NESSUSD_CONFDIR='${sysconfdir}'
-NESSUSD_STATEDIR='${localstatedir}/nessus'
+NESSUSD_STATEDIR='${localstatedir}/lib/nessus'
 NESSUSD_SHAREDSTATEDIR='${sharedstatedir}/nessus'
+NESSUSD_PIDDIR='${localstatedir}/run'
+NESSUSD_PKIDIR='${sysconfdir}/pki/nessus'
 NESSUSD_DATADIR='${sysconfdir}/nessus'
 NESSUSD_LIBDIR='${libdir}/nessus'
-NESSUSD_LOGDIR='${localstatedir}/nessus/logs'
+NESSUSD_LOGDIR='${localstatedir}/log/nessus'
 
 NESSUSD_PLUGINS='${NESSUSD_LIBDIR}/plugins'
-NESSUSD_REPORTS='${NESSUSD_LIBDIR}/reports'
+NESSUSD_REPORTS='${NESSUSD_LOGDIR}/reports'
 
  
 # The following directories are now passed into the compile
@@ -721,11 +723,11 @@
 # everything works okay.
 #
 #AC_DEFINE_UNQUOTED(NESSUSD_CONFDIR,   "${sysconfdir}")
-#AC_DEFINE(NESSUSD_STATEDIR,  "${localstatedir}/nessus'")
+#AC_DEFINE(NESSUSD_STATEDIR,  "${localstatedir}/lib/nessus'")
 #AC_DEFINE(NESSUSD_DATADIR,   "'${sysconfdir}/nessus")
 #AC_DEFINE(NESSUSD_LIBDIR,    "${libdir}/nessus")
 #AC_DEFINE(NESSUSD_PLUGINS,   "${libdir}/nessus/plugins")
-#AC_DEFINE(NESSUSD_REPORTS,   "${libdir}/nessus/reports")
+#AC_DEFINE(NESSUSD_REPORTS,   "${localstatedir}/log/nessus/reports")
 man_nessus_1=doc/nessus.1
 man_nessusd_8=doc/nessusd.8
 
@@ -751,6 +753,8 @@
 AC_SUBST(NESSUSD_CONFDIR)
 AC_SUBST(NESSUSD_STATEDIR)
 AC_SUBST(NESSUSD_SHAREDSTATEDIR)
+AC_SUBST(NESSUSD_PIDDIR)
+AC_SUBST(NESSUSD_PKIDIR)
 AC_SUBST(NESSUSD_DATADIR)
 AC_SUBST(NESSUSD_LIBDIR)
 AC_SUBST(NESSUSD_PLUGINS)

nessus-core-2.2.4.configure.patch:

--- NEW FILE nessus-core-2.2.4.configure.patch ---
--- nessus-core.orig/configure	2005-02-08 02:40:42.000000000 +0100
+++ nessus-core/configure	2005-07-03 16:41:03.000000000 +0200
@@ -5671,14 +5671,16 @@
 
 
 NESSUSD_CONFDIR='${sysconfdir}'
-NESSUSD_STATEDIR='${localstatedir}/nessus'
+NESSUSD_STATEDIR='${localstatedir}/lib/nessus'
 NESSUSD_SHAREDSTATEDIR='${sharedstatedir}/nessus'
+NESSUSD_PIDDIR='${localstatedir}/run'
+NESSUSD_PKIDIR='${sysconfdir}/pki/nessus'
 NESSUSD_DATADIR='${sysconfdir}/nessus'
 NESSUSD_LIBDIR='${libdir}/nessus'
-NESSUSD_LOGDIR='${localstatedir}/nessus/logs'
+NESSUSD_LOGDIR='${localstatedir}/log/nessus'
 
 NESSUSD_PLUGINS='${NESSUSD_LIBDIR}/plugins'
-NESSUSD_REPORTS='${NESSUSD_LIBDIR}/reports'
+NESSUSD_REPORTS='${NESSUSD_LOGDIR}/reports'
 
  
 # The following directories are now passed into the compile
@@ -5687,11 +5689,11 @@
 # everything works okay.
 #
 #AC_DEFINE_UNQUOTED(NESSUSD_CONFDIR,   "${sysconfdir}")
-#AC_DEFINE(NESSUSD_STATEDIR,  "${localstatedir}/nessus'")
+#AC_DEFINE(NESSUSD_STATEDIR,  "${localstatedir}/lib/nessus'")
 #AC_DEFINE(NESSUSD_DATADIR,   "'${sysconfdir}/nessus")
 #AC_DEFINE(NESSUSD_LIBDIR,    "${libdir}/nessus")
 #AC_DEFINE(NESSUSD_PLUGINS,   "${libdir}/nessus/plugins")
-#AC_DEFINE(NESSUSD_REPORTS,   "${libdir}/nessus/reports")
+#AC_DEFINE(NESSUSD_REPORTS,   "${localstatedir}/log/nessus/reports")
 man_nessus_1=doc/nessus.1
 man_nessusd_8=doc/nessusd.8
 
@@ -5967,6 +5969,8 @@
 s%@NESSUSD_CONFDIR@%$NESSUSD_CONFDIR%g
 s%@NESSUSD_STATEDIR@%$NESSUSD_STATEDIR%g
 s%@NESSUSD_SHAREDSTATEDIR@%$NESSUSD_SHAREDSTATEDIR%g
+s%@NESSUSD_PIDDIR@%$NESSUSD_PIDDIR%g
+s%@NESSUSD_PKIDIR@%$NESSUSD_PKIDIR%g
 s%@NESSUSD_DATADIR@%$NESSUSD_DATADIR%g
 s%@NESSUSD_LIBDIR@%$NESSUSD_LIBDIR%g
 s%@NESSUSD_PLUGINS@%$NESSUSD_PLUGINS%g

nessus-core-2.2.4.gd.patch:

--- NEW FILE nessus-core-2.2.4.gd.patch ---
diff -ur nessus-core.orig/nessus/gdchart0.94b/makefile nessus-core/nessus/gdchart0.94b/makefile
--- nessus-core.orig/nessus/gdchart0.94b/makefile	2002-09-10 09:32:55.000000000 +0200
+++ nessus-core/nessus/gdchart0.94b/makefile	2005-07-03 16:04:50.000000000 +0200
@@ -1,27 +1,27 @@
 include ../../nessus.tmpl
 GDC_INCL = .
-GD_INCL  = gd1.3
-GD_LIB   = gd1.3
+GD_INCL  = /usr/include
+GD_LIB   = /usr/lib
 IINCL    = $(CFLAGS) `sh ../cflags`
 
 
 
-all: gdc.o gdchart.o price_conv.o gdc_pie.o $(GD_LIB)/libgd.a
+all: gdc.o gdchart.o price_conv.o gdc_pie.o
 
 # compile the samples
-gdc_samp1: gdc.o gdchart.o price_conv.o gdc_samp1.o $(GD_LIB)/libgd.a
+gdc_samp1: gdc.o gdchart.o price_conv.o gdc_samp1.o
 	$(CC) -o gdc_samp1 gdc.o gdchart.o price_conv.o gdc_samp1.o -L$(GD_LIB) -lgd -lm
 
 gdc_samp1.o: $(GDC_INCL)/gdc.h $(GDC_INCL)/gdchart.h gdc_samp1.c
 	$(CC) $(IINCL) -I$(GDC_INCL) -c gdc_samp1.c
 
-gdc_samp2: gdc.o gdchart.o price_conv.o gdc_samp2.o $(GD_LIB)/libgd.a
+gdc_samp2: gdc.o gdchart.o price_conv.o gdc_samp2.o
 	$(CC) $(IINCL) -o gdc_samp2 gdc.o gdchart.o price_conv.o gdc_samp2.o -L$(GD_LIB) -lgd -lm
 
 gdc_samp2.o: $(GDC_INCL)/gdc.h $(GDC_INCL)/gdchart.h gdc_samp2.c
 	$(CC) $(IINCL) -I$(GDC_INCL) -c gdc_samp2.c
 
-gdc_pie_samp: gdc.o gdc_pie.o price_conv.o gdc_pie_samp.o $(GD_LIB)/libgd.a
+gdc_pie_samp: gdc.o gdc_pie.o price_conv.o gdc_pie_samp.o
 	$(CC) $(IINCL) -o gdc_pie_samp gdc.o gdc_pie.o price_conv.o gdc_pie_samp.o -L$(GD_LIB) -lgd -lm
 
 gdc_pie_samp.o: $(GDC_INCL)/gdc.h $(GDC_INCL)/gdcpie.h gdc_pie_samp.c
@@ -40,11 +40,7 @@
 gdchart.o: $(GDC_INCL)/gdc.h $(GDC_INCL)/gdchart.h gdchart.c
 	$(CC) $(IINCL) -I$(GD_INCL) -I$(GDC_INCL) -c gdchart.c
 
-$(GD_LIB)/libgd.a:
-	cd $(GD_LIB) ; $(MAKE) -f Makefile libgd.a
-
 # --- clean ---
 clean:
 	rm -f *.o gdc_samp1 gdc_samp2 gdc_pie_samp
-	cd $(GD_LIB) ; $(MAKE) -f Makefile clean
 
diff -ur nessus-core.orig/nessus/Makefile nessus-core/nessus/Makefile
--- nessus-core.orig/nessus/Makefile	2003-02-22 14:47:43.000000000 +0100
+++ nessus-core/nessus/Makefile	2005-07-03 16:18:55.000000000 +0200
@@ -1,9 +1,9 @@
 include ../nessus.tmpl
 
 GTKLIBS= $(GTKCONFIG_LIBS) $(GLIBCONFIG_LIBS)
-INCLUDE = ${include} $(GTKCONFIG_CFLAGS) $(GLIBCONFIG_CFLAGS) -Igdchart0.94b -Igdchart0.94b/gd1.3
+INCLUDE = ${include} $(GTKCONFIG_CFLAGS) $(GLIBCONFIG_CFLAGS) -Igdchart0.94b
 LIBS = `$(NESSUSCONFIG) --libs` $(X_LIBS) $(X_CFLAGS) $(GTKLIBS) \
-	$(RUN_LIBS) $(C_R_LIB) gdchart0.94b/gd1.3/libgd.a -lm 
+	$(RUN_LIBS) $(C_R_LIB) -lgd -lm 
 
 NESSUS_INCLUDE=`sh ./cflags`	
 

nessus-core-2.2.4.nessus-adduser.in.patch:

--- NEW FILE nessus-core-2.2.4.nessus-adduser.in.patch ---
--- nessus-core.orig/nessus-adduser.in	2004-12-10 20:40:20.000000000 +0100
+++ nessus-core/nessus-adduser.in	2005-07-03 15:13:23.000000000 +0200
@@ -124,7 +124,7 @@
 do
  echo $Xn "Login : $Xc"
  read login
- if [ -d $localstatedir/nessus/users/$login ];
+ if [ -d $localstatedir/lib/nessus/users/$login ];
  then
    echo "This login already exists. Choose another one"
  else
@@ -250,9 +250,7 @@
 #echo "$login:$password" > $TMPDIR/adduser.$$
 	
 
-chmod 0700 "$localstatedir/nessus/"
-mkdir -p "$localstatedir/nessus/users/$login"
-chmod 0700 "$localstatedir/nessus/users/$login"
+mkdir -m 0700 -p "$localstatedir/lib/nessus/users/$login"
 
 
 
@@ -263,14 +261,12 @@
 # Create the auth. dir, which contains the user rules,
 # password, and plugin acl
 #
-mkdir -p "$localstatedir/nessus/users/$login/auth"
-chmod 0700 "$localstatedir/nessus/users/$login/auth"
+mkdir -m 0700 -p "$localstatedir/lib/nessus/users/$login/auth"
 
 #
 # Create the plugins dir, which contains the user plugins
 #
-mkdir -p "$localstatedir/nessus/users/$login/plugins"
-chmod 0700 "$localstatedir/nessus/users/$login/plugins"
+mkdir -m 0700 -p "$localstatedir/lib/nessus/users/$login/plugins"
 
 
 
@@ -282,17 +278,17 @@
 	}
 	SEED=`(echo $SEED; date; df; ls -l; echo $URANDOM) | $MD5CMD | awk '{print $1}'`
 	H=`echo $Xn $SEED$password$Xc | $MD5CMD | awk '{print $1}'`
-	echo $H $SEED > "$localstatedir/nessus/users/$login/auth/hash"
+	echo $H $SEED > "$localstatedir/lib/nessus/users/$login/auth/hash"
     else
-	echo "$password" > "$localstatedir/nessus/users/$login/auth/password"
+	echo "$password" > "$localstatedir/lib/nessus/users/$login/auth/password"
     fi
 elif [ "$auth" = "cert" ]; then
-	echo "$dn" > "$localstatedir/nessus/users/$login/auth/dname"
+	echo "$dn" > "$localstatedir/lib/nessus/users/$login/auth/dname"
 fi
 
 
 
-cp $TMPDIR/nessus-adduser.$$/rules.$$ "$localstatedir/nessus/users/$login/auth/rules"
+cp $TMPDIR/nessus-adduser.$$/rules.$$ "$localstatedir/lib/nessus/users/$login/auth/rules"
 
 
 

nessus-core-2.2.4.nessus-mkcert.patch:

--- NEW FILE nessus-core-2.2.4.nessus-mkcert.patch ---
--- nessus-core.orig/nessus-mkcert-client.in	2004-12-10 20:40:20.000000000 +0100
+++ nessus-core/nessus-mkcert-client.in	2005-07-03 14:31:27.000000000 +0200
@@ -84,8 +84,8 @@
 
 
 
-NESSUSPRIV="$localstatedir/nessus/CA"
-NESSUSPUB="$sharedstatedir/nessus/CA"
+NESSUSPRIV="@NESSUSD_PKIDIR@/private/CA"
+NESSUSPUB="@NESSUSD_PKIDIR@/CA"
 
 while [ ! -d "$NESSUSPRIV" ]; do
     echo_no_nl "Nessus server 'private' directory: "
@@ -126,7 +126,7 @@
 done
 
 if [ "$R" = "y" ]; then
-    USERSDIR=$localstatedir/nessus/users
+    USERSDIR=$localstatedir/lib/nessus/users
     while [ ! -d "$USERSDIR" ]; do
 	echo "$USERSDIR: not a directory"
 	echo_no_nl "Users directory? "
--- nessus-core.orig/nessus-mkcert.in	2004-12-10 20:40:22.000000000 +0100
+++ nessus-core/nessus-mkcert.in	2005-07-03 15:01:34.000000000 +0200
@@ -92,8 +92,8 @@
    exit 1
 esac
      
-NESSUSPRIV="$localstatedir/nessus/CA"
-NESSUSPUB="$sharedstatedir/nessus/CA"
+NESSUSPRIV="@NESSUSD_PKIDIR@/private/CA"
+NESSUSPUB="@NESSUSD_PKIDIR@/CA"
 if [ ! -d "$NESSUSPRIV" ]; then
     mkdir -p "$NESSUSPRIV"
     chmod 0700 "$NESSUSPRIV"

nessus-core-2.2.4.nessus-rmuser.in.patch:

--- NEW FILE nessus-core-2.2.4.nessus-rmuser.in.patch ---
--- nessus-core.orig/nessus-rmuser.in	2005-03-17 23:09:39.000000000 +0100
+++ nessus-core/nessus-rmuser.in	2005-07-03 14:57:03.000000000 +0200
@@ -55,9 +55,9 @@
 	exit 1
 	}
 
-if [ -d "$localstatedir/nessus/users/$login" ];
+if [ -d "$localstatedir/lib/nessus/users/$login" ];
 then
- rm -rf "$localstatedir/nessus/users/$login"
+ rm -rf "$localstatedir/lib/nessus/users/$login"
  echo "user removed."
 else
  echo "This user does not exist"

nessus-core-2.2.4.nessus.tmpl.in.patch:

--- NEW FILE nessus-core-2.2.4.nessus.tmpl.in.patch ---
--- nessus-core.orig/nessus.tmpl.in	2003-01-21 11:52:47.000000000 +0100
+++ nessus-core/nessus.tmpl.in	2005-07-03 13:37:06.000000000 +0200
@@ -46,6 +46,8 @@
 NESSUSD_CONFDIR=@NESSUSD_CONFDIR@
 NESSUSD_STATEDIR=@NESSUSD_STATEDIR@
 NESSUSD_SHAREDSTATEDIR=@NESSUSD_SHAREDSTATEDIR@
+NESSUSD_PIDDIR=@NESSUSD_PIDDIR@
+NESSUSD_PKIDIR=@NESSUSD_PKIDIR@
 NESSUSD_DATADIR=@NESSUSD_DATADIR@
 NESSUSD_LIBDIR=@NESSUSD_LIBDIR@
 NESSUSD_LOGDIR=@NESSUSD_LOGDIR@
@@ -54,7 +56,7 @@
 NESSUSD_PLUGINS=@NESSUSD_PLUGINS@
 NESSUSD_REPORTS=@NESSUSD_REPORTS@
 
-NESSUS_DIRECTORIES="-DNESSUSD_CONFDIR=\"$(NESSUSD_CONFDIR)\"" "-DNESSUSD_STATEDIR=\"$(NESSUSD_STATEDIR)\"" "-DNESSUSD_DATADIR=\"$(NESSUSD_DATADIR)\"" "-DNESSUSD_LIBDIR=\"${NESSUSD_LIBDIR}\"" "-DNESSUSD_PLUGINS=\"${NESSUSD_PLUGINS}\"" "-DNESSUSD_REPORTS=\"${NESSUSD_REPORTS}\"" -DNESSUSD_SHAREDSTATEDIR=\"${NESSUSD_SHAREDSTATEDIR}\" -DNESSUSD_LOGDIR=\"${NESSUSD_LOGDIR}\"
+NESSUS_DIRECTORIES="-DNESSUSD_CONFDIR=\"$(NESSUSD_CONFDIR)\"" "-DNESSUSD_STATEDIR=\"$(NESSUSD_STATEDIR)\"" "-DNESSUSD_DATADIR=\"$(NESSUSD_DATADIR)\"" "-DNESSUSD_LIBDIR=\"${NESSUSD_LIBDIR}\"" "-DNESSUSD_PLUGINS=\"${NESSUSD_PLUGINS}\"" "-DNESSUSD_REPORTS=\"${NESSUSD_REPORTS}\"" -DNESSUSD_SHAREDSTATEDIR=\"${NESSUSD_SHAREDSTATEDIR}\" -DNESSUSD_LOGDIR=\"${NESSUSD_LOGDIR}\" -DNESSUSD_PIDDIR=\"${NESSUSD_PIDDIR}\" -DNESSUSD_PKIDIR=\"${NESSUSD_PKIDIR}\"
 
 #
 # The server / client modes do not make a lot of sense

nessus-core-2.2.4.pid.patch:

--- NEW FILE nessus-core-2.2.4.pid.patch ---
diff -ur nessus-core.orig/nessusd/utils.c nessus-core/nessusd/utils.c
--- nessus-core.orig/nessusd/utils.c	2005-03-21 23:55:19.000000000 +0100
+++ nessus-core/nessusd/utils.c	2005-07-03 16:30:53.000000000 +0200
@@ -322,8 +322,8 @@
 create_pid_file()
 {
  FILE * f;
- char * fname = malloc(strlen(NESSUSD_STATEDIR) + strlen("/nessusd.pid") + 1);
- strcpy(fname, NESSUSD_STATEDIR);
+ char * fname = malloc(strlen(NESSUSD_PIDDIR) + strlen("/nessusd.pid") + 1);
+ strcpy(fname, NESSUSD_PIDDIR);
  strcat(fname, "/nessusd.pid");
  
  f = fopen(fname, "w");
@@ -341,8 +341,8 @@
 void
 delete_pid_file()
 {
- char * fname = malloc(strlen(NESSUSD_STATEDIR) + strlen("/nessusd.pid") + 1);
- strcpy(fname, NESSUSD_STATEDIR);
+ char * fname = malloc(strlen(NESSUSD_PIDDIR) + strlen("/nessusd.pid") + 1);
+ strcpy(fname, NESSUSD_PIDDIR);
  strcat(fname, "/nessusd.pid");
  unlink(fname);
  free(fname);

nessus-core-2.2.4.pki.patch:

--- NEW FILE nessus-core-2.2.4.pki.patch ---
diff -Naurp nessus-core.orig/nessusd/nessus-check-signature.c nessus-core/nessusd/nessus-check-signature.c
--- nessus-core.orig/nessusd/nessus-check-signature.c	2005-03-16 19:50:43.000000000 +0100
+++ nessus-core/nessusd/nessus-check-signature.c	2005-07-06 15:45:42.000000000 +0200
@@ -36,7 +36,7 @@
 int generate_signature(char * filename)
 {
  RSA * rsa = NULL;
- FILE * fp = fopen(NESSUSD_STATEDIR "/nessus_org.priv.pem", "r");
+ FILE * fp = fopen(NESSUSD_PKIDIR "/nessus_org.priv.pem", "r");
  unsigned char  * result;
  int len;
  int i;
@@ -116,7 +116,7 @@ int verify_signature(char * filename, ch
 {
  unsigned char md[SHA_DIGEST_LENGTH+1];
  RSA * rsa = NULL;
- FILE * fp = fopen(NESSUSD_STATEDIR "/nessus_org.pem", "r");
+ FILE * fp = fopen(NESSUSD_PKIDIR "/nessus_org.pem", "r");
 
  char sig[16384];
  unsigned char bin_sig[8192];
@@ -134,7 +134,7 @@ int verify_signature(char * filename, ch
 
  if ( fp == NULL )
  {
-  fprintf(stderr, "Open %s/nessus_org.pem : %s\n", NESSUSD_STATEDIR, strerror(errno));
+  fprintf(stderr, "Open %s/nessus_org.pem : %s\n", NESSUSD_PKIDIR, strerror(errno));
   return -1;
  }
 


--- NEW FILE nessus-core.spec ---
Name:           nessus-core
Version:        2.2.6
Release:        3%{?dist}
Summary:        Network vulnerability scanner

Group:          Applications/System
License:        GPL
URL:            http://www.nessus.org
Source0:        ftp://ftp.nessus.org/pub/nessus/nessus-2.2.6/src/nessus-core-2.2.6.tar.gz
Source1:        nessusd.init
Source2:        nessusd.log
Source3:        nessus.desktop
# force nessus into fedora dir structure
# and use system gd
# Thanks to Dawid Gajownik for providing these patches =)
Patch0:         nessus-core-2.2.4.Makefile.patch
Patch1:         nessus-core-2.2.4.config.h.in.patch
Patch2:         nessus-core-2.2.4.configure.in.patch
Patch3:         nessus-core-2.2.4.configure.patch
Patch4:         nessus-core-2.2.4.gd.patch
Patch5:         nessus-core-2.2.4.nessus-adduser.in.patch
Patch6:         nessus-core-2.2.4.nessus-mkcert.patch
Patch7:         nessus-core-2.2.4.nessus-rmuser.in.patch
Patch8:         nessus-core-2.2.4.nessus.tmpl.in.patch
Patch9:         nessus-core-2.2.4.pid.patch
Patch10:        nessus-core-2.2.4.pki.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires:  nessus-libraries-devel
BuildRequires:  libnasl-devel
BuildRequires:  gtk2-devel
BuildRequires:  glib2-devel
BuildRequires:  libICE-devel
BuildRequires:  gd-devel
BuildRequires:  tcp_wrappers
BuildRequires:  desktop-file-utils


%define pkidir %{_sysconfdir}/pki/nessus

%description
Nessus is the world's most popular vulnerability scanner used in over 75,000
organizations world-wide. Many of the world's largest organizations are
realizing significant cost savings by using Nessus to audit business-critical
enterprise devices and applications.

The "Nessus" Project was started by Renaud Deraison in 1998 to provide to the
internet community a free, powerful, up-to-date and easy to use remote
security scanner. Nessus is currently rated among the top products of its type
throughout the security industry and is endorsed by professional information
security organizations such as the SANS Institute.

%package devel
Summary: Header files for plugin development
Group: Development/Libraries

%description devel
%{summary}

%package -n nessus-server
Summary: nessusd is the server part of the nessus client-server model
Group: System Environment/Daemons
Requires(post): /sbin/chkconfig
Requires(preun): /sbin/chkconfig
Requires(preun): /sbin/service
Requires: nessus-core = %{version}-%{release}

%description -n nessus-server
%{summary}

%package -n nessus-client
Summary: Text client interface for nessusd
Group: Applications/Internet
Requires: nessus-core = %{version}-%{release}

%description -n nessus-client
%{summary}

%package -n nessus-gui
Summary: GTK client interface for nessusd
Group: Applications/Internet
Requires: nessus-core = %{version}-%{release}

%description -n nessus-gui
%{summary}

%prep
%setup -q -n %{name}

%patch0  -p1
%patch1  -p1
%patch2  -p1
# You cannot compile against system gd, because nessus-text client
# will require X.org X11
%patch3  -p1
%patch4  -p1
%patch5  -p1
%patch6  -p1
%patch7  -p1
%patch8  -p1
%patch9  -p1
%patch10 -p1

%build
# libdir is used by plugins
# smpflags will break builds sometime...
%configure \
	--libdir=%{_localstatedir}/lib \
	--disable-gtk \
	--enable-syslog \
	--enable-tcpwrappers \
	--without-x
make -C nessus

mv -f nessus/nessus nessus-text
make distclean

%configure \
	--libdir=%{_localstatedir}/lib \
	--enable-gtk \
	--enable-syslog \
	--enable-tcpwrappers \
	--with-x
make

%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT

install -p -m 0755 nessus-text $RPM_BUILD_ROOT/%{_bindir}

install -D -p -m 755 %{SOURCE1} $RPM_BUILD_ROOT/%{_initrddir}/nessusd

install -D -p -m 0644 %{SOURCE2} $RPM_BUILD_ROOT/%{_sysconfdir}/logrotate.d/nessusd
install -D -p -m 644 nessus/xpm/nessus.xpm \
	$RPM_BUILD_ROOT/%{_datadir}/pixmaps/nessus.xpm

desktop-file-install --vendor fedora \
	--dir $RPM_BUILD_ROOT/%{_datadir}/applications\
	%{SOURCE3}

# generate ghost .pem files
mkdir -m 0755 -p $RPM_BUILD_ROOT/%{pkidir}/{private,}/CA
chmod 700 $RPM_BUILD_ROOT/%{pkidir}/private/CA
touch $RPM_BUILD_ROOT/%{pkidir}/private/CA/{cakey,serverkey}.pem
chmod 600 $RPM_BUILD_ROOT/%{pkidir}/private/CA/{cakey,serverkey}.pem
touch $RPM_BUILD_ROOT/%{pkidir}/CA/{cacert,servercert}.pem
chmod 644 $RPM_BUILD_ROOT/%{pkidir}/CA/{cacert,servercert}.pem

# generate ghost config files
touch $RPM_BUILD_ROOT/%{_sysconfdir}/nessus/nessusd.{conf,rules}
chmod 600 $RPM_BUILD_ROOT/%{_sysconfdir}/nessus/nessusd.conf

mkdir -m 0755 $RPM_BUILD_ROOT/%{_localstatedir}/lib/nessus/plugins/.desc

%clean
rm -rf $RPM_BUILD_ROOT

%post -n nessus-server
# This adds the proper /etc/rc*.d links for the script
if [ $1 = 1 ]; then
/sbin/chkconfig --add nessusd
fi

%preun -n nessus-server
if [ $1 = 0 ]; then
        /sbin/service nessusd stop >/dev/null 2>&1
        /sbin/chkconfig --del nessusd
fi

%postun -n nessus-server
if [ "$1" -ge "1" ]; then
        /sbin/service nessusd condrestart >/dev/null 2>&1
fi

%files
%defattr(-,root,root,-)
%doc TODO CHANGES README_SSL doc/*txt doc/WARNING.* nessus/COPYING
%{_bindir}/nessus-mkrand
%{_bindir}/nessus-mkcert-client
%{_mandir}/man1/nessus.1*
%{_mandir}/man1/nessus-mkcert-client.1*
%{_mandir}/man1/nessus-mkrand.1*

%files devel
%defattr(-,root,root,-)
%doc doc/ntp/*
%{_includedir}/nessus/*
%exclude %{_includedir}/nessus/includes.h

%files -n nessus-client
%defattr(-,root,root,-)
%{_bindir}/nessus-text

%files -n nessus-gui
%defattr(-,root,root,-)
%{_bindir}/nessus
%{_datadir}/pixmaps/nessus.xpm
%{_datadir}/applications/*

%files -n nessus-server
%defattr(-,root,root,-)
%{_bindir}/nessus-fetch
%{_sbindir}/nessusd
%{_sbindir}/nessus-mkcert
%{_sbindir}/nessus-adduser
%{_sbindir}/nessus-rmuser
%{_sbindir}/nessus-check-signature
%{_mandir}/man1/nessus-fetch.1*
%{_mandir}/man8/*
%{_initrddir}/nessusd
%dir %{_localstatedir}/log/nessus
%dir %{_sysconfdir}/nessus
%dir %{_sysconfdir}/pki/nessus
%config(noreplace) %{_sysconfdir}/logrotate.d/nessusd
%ghost %config(missingok,noreplace) %verify(not md5 size mtime) %{pkidir}/CA/*
%ghost %config(missingok,noreplace) %verify(not md5 size mtime) %{pkidir}/private/CA/*
%ghost %config(missingok,noreplace) %verify(not md5 size mtime) %{_sysconfdir}/nessus/*

%changelog
* Mon Apr 03 2006 Andreas Bierfert <andreas.bierfert[AT]lowlatency.de>
2.2.6-3
- fix description
- create and own log dir
- include copying

* Sun Feb 26 2006 Andreas Bierfert <andreas.bierfert[AT]lowlatency.de>
2.2.6-2
- fix buildroot
- add source0 url

* Fri Feb 24 2006 Andreas Bierfert <andreas.bierfert[AT]lowlatency.de>
2.2.6-1
- initial version


--- NEW FILE nessus.desktop ---
[Desktop Entry]
Categories=Application;Security;System;X-Fedora;
Name=Nessus
GenericName=Security scanner
Comment=Nessus client
Exec=nessus
Icon=nessus.xpm
StartupNotify=true
Terminal=false
Type=Application
Encoding=UTF-8


--- NEW FILE nessusd.init ---
#!/bin/sh
#
# nessusd      Starts and stops the Nessus daemon
#
# chkconfig:   - 93 12
# description: Nessus is a security auditing tool
#
# processname: nessusd
# config:      /etc/nessus/nessusd.conf
# pidfile:     /var/run/nessusd.pid

# Source function library.
. /etc/rc.d/init.d/functions

# Source networking configuration.
. /etc/sysconfig/network

# Check that networking is up.
[ "$NETWORKING" = "no" ] && exit 0

exec="/usr/sbin/nessusd"
prog=nessusd

[ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog

lockfile=/var/lock/subsys/$prog

start() {
    echo -n $"Starting $prog: "
    daemon $exec -D
    retval=$?
    echo
    [ $retval -eq 0 ] && touch $lockfile
    return $retval
}

stop() {
    echo -n $"Stopping $prog: "
    killproc $prog
    retval=$?
    echo
    [ $retval -eq 0 ] && rm -f $lockfile
    return $retval
}

restart() {
    stop
    start
}

reload() {
    restart
}

force_reload() {
    restart
}

fdr_status() {
    status $prog
}

case "$1" in
    start|stop|restart|reload)
        $1
        ;;
    force-reload)
        force_reload
        ;;
    status)
        fdr_status
        ;;
    condrestart|try-restart)
  	[ ! -f $lockfile ] || restart
	;;
    *)
        echo $"Usage: $0 {start|stop|status|restart|try-restart|reload|force-reload}"
        exit 2
esac


--- NEW FILE nessusd.log ---
/var/log/nessus/nessusd.messages {
  missingok
  notifempty
  create 0600 root root
  postrotate
      /sbin/service nessusd condrestart 2> /dev/null > /dev/null || true
  endscript
}


Index: .cvsignore
===================================================================
RCS file: /cvs/extras/rpms/nessus-core/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore	7 Apr 2006 06:19:30 -0000	1.1
+++ .cvsignore	7 Apr 2006 06:21:26 -0000	1.2
@@ -0,0 +1 @@
+nessus-core-2.2.6.tar.gz


Index: sources
===================================================================
RCS file: /cvs/extras/rpms/nessus-core/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources	7 Apr 2006 06:19:30 -0000	1.1
+++ sources	7 Apr 2006 06:21:26 -0000	1.2
@@ -0,0 +1 @@
+616dd7727b90df1ac978b5e736c0a960  nessus-core-2.2.6.tar.gz




More information about the fedora-extras-commits mailing list