rpms/openvas-scanner/F-13 import.log, NONE, 1.1 openvas-initd.sh, NONE, 1.1 openvas-nvt-sync-cron, NONE, 1.1 openvas-nvt-sync-cronjob, NONE, 1.1 openvas-scanner.spec, NONE, 1.1 openvas-scanner.sysconfig, NONE, 1.1 openvas.logrotate, NONE, 1.1 openvassd.conf, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2

Stjepan Gros sgros at fedoraproject.org
Sun Apr 18 08:37:37 UTC 2010


Author: sgros

Update of /cvs/pkgs/rpms/openvas-scanner/F-13
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv6014/F-13

Modified Files:
	.cvsignore sources 
Added Files:
	import.log openvas-initd.sh openvas-nvt-sync-cron 
	openvas-nvt-sync-cronjob openvas-scanner.spec 
	openvas-scanner.sysconfig openvas.logrotate openvassd.conf 
Log Message:
Initial import of the package



--- NEW FILE import.log ---
openvas-scanner-3_0_2-3_fc12:F-13:openvas-scanner-3.0.2-3.fc12.src.rpm:1271579789


--- NEW FILE openvas-initd.sh ---
#!/bin/bash

# This is an implementation of a start-script for OpenVAS Scanner.

# Make RedHat happy:
#
# chkconfig: - 91 9
# Description: OpenVAS is a vulnerability Scanner
#

### BEGIN INIT INFO
# Provides: openvas-scanner
# Required-Start: $local_fs $network $syslog
# Required-Stop: $local_fs $network $syslog
# Default-Start:
# Default-Stop: 0 1 2 3 4 5 6
# Short-Description: start|stop|status|restart|condrestart|reloadplugins OpenVAS Scanner
# Description: control OpenVAS Scanner
### END INIT INFO

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

exec="/usr/sbin/openvassd"
prog="openvassd"
progname="openvas-scanner"
config=/etc/openvas/openvassd.conf
lockfile=/var/lock/subsys/openvas-scanner

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

rh_status() {
	# run checks to determine if the service is running or use generic status
	status -p /var/run/$prog.pid -l $lockfile $progname
}

rh_status_q() {
	rh_status >/dev/null 2>&1
}

start() {
	grep -q ca_file /etc/openvas/openvassd.conf >& /dev/null
	if [ $? -ne 0 ]; then
		echo "No certificate specified in configuration file. Did you run openvas-mkcert tool?"
		exit 6
	fi

	CACERT=`grep ca_file /etc/openvas/openvassd.conf | cut -d= -f2`
	if [ \! -z "$CACERT" -a \! -f "$CACERT" ]; then
		echo "Certificate specified in the configuration file not found. Did you run openvas-mkcert tool?"
		exit 6
	fi

	echo "Starting $progname:"
	daemon --pidfile=/var/run/$prog.pid $prog
	RETVAL=$?
	echo
	[ $RETVAL -eq 0 ] && touch $lockfile
	return $RETVAL
}

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

restart() {
	stop
	start
}

reloadplugins() {
	echo -n "Reloading OpenVAS plugins: "
	killproc $prog -HUP
	echo
}

case "$1" in
	start)
		rh_status_q && exit 0
		$1
		;;

	stop)
		rh_status_q || exit 0
		$1
                ;;

	restart)
		$1
		;;

	condrestart|try-restart)
		rh_status_q || exit 0
		$1
		;;

	reload)
		;;

	reloadplugins)
		rh_status_q || exit 0
		$1
		;;

	status)
		status -p /var/run/$prog.pid -l $lockfile $progname
                ;;

	*)
		echo "Usage: $0 {start|stop|status|restart|condrestart|reload|reloadplugins}"
		exit 1
esac

exit 0


--- NEW FILE openvas-nvt-sync-cron ---
#!/bin/sh

if [ -f /etc/sysconfig/openvas-scanner ]; then
	. /etc/sysconfig/openvas-scanner
fi

if [ "$auto_plugin_update" != "yes" ]; then
	exit 0
fi

opts=""
case "$update_method" in
	rsync)
		opts = "$opts --rsync"
		;;
	wget)
		opts = "$opts --wget"
		;;
	curl)
		opts = "$opts --curl"
		;;
esac

# Export openvas-nvt-sync's environment variables if they are defined
[ \! -z "$NVT_DIR" ] && export NVT_DIR
[ \! -z "$OV_RSYNC_FEED" ] && export OV_RSYNC_FEED
[ \! -z "$OV_HTTP_FEED" ] && export OV_HTTP_FEED

/usr/sbin/openvas-nvt-sync $opts >& /dev/null

if [ $? -ne 0 ]; then
	echo "Error updating OpenVAS plugins. Please run openvas-nvt-sync manually."
	exit 1
fi


if [ "$notify_openvas_scanner" == "yes" ]; then
	/etc/init.d/openvas-scanner reloadplugins
fi



--- NEW FILE openvas-nvt-sync-cronjob ---
# start plugin sync daily at midnight
0 0 * * * root /usr/sbin/openvas-nvt-sync-cron


--- NEW FILE openvas-scanner.spec ---
Name:		openvas-scanner
Summary:	Open Vulnerability Assessment (OpenVAS) Scanner
Version:	3.0.2
Release:	3%{?dist}
Source0:	http://wald.intevation.org/frs/download.php/724/%{name}-%{version}.tar.gz
Source1:	openvas-initd.sh
Source2:	openvassd.conf
Source3:	openvas.logrotate
Source4:	openvas-scanner.sysconfig
Source5:	openvas-nvt-sync-cron
Source6:	openvas-nvt-sync-cronjob
URL:		http://www.openvas.org
License:	GPLv2
Group:		System Environment/Libraries
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root
BuildRequires:	openvas-libraries-devel
BuildRequires:	cmake >= 2.6.0
BuildRequires:	glib2-devel
BuildRequires:	libpcap-devel
BuildRequires:	gnutls-devel
BuildRequires:	gpgme-devel
Requires(post):	chkconfig
Requires(preun): chkconfig
Requires(preun): initscripts

%filter_provides_in %{_libdir}/openvas/plugins
%filter_setup

%description
Scanner module for the Open Vulnerability Assessment System (OpenVAS).

%prep
%setup -q

for i in CHANGES ChangeLog; do
	iconv -f iso8859-1 -t utf-8 $i > $i.utf8 && \
	touch -r $i $i.utf8 && \
	mv -f $i.utf8 $i;
done

%build
%configure --disable-static
make %{?_smp_mflags}

%install
rm -rf %{buildroot}
make install DESTDIR=%{buildroot} INSTALL="install -p"
find %{buildroot} -name '*.la' -exec rm -f {} ';'
chmod 755 %{buildroot}/%{_libdir}/openvas/plugins

# Make plugin cache directory
mkdir -p %{buildroot}/%{_var}/cache/openvas

# Install startup script
install -Dp -m 755 %{SOURCE1} %{buildroot}/%{_initddir}/openvas-scanner

# Install initial configuration
#install -Dp -m 644 %{SOURCE2} %{buildroot}/%{_sysconfdir}/openvas/
sed -e "s:@@OPENVAS_PLUGINS@@:%{_libdir}/openvas/plugins:g
	s:@@OPENVAS_CACHE@@:%{_var}/cache/openvas:g
	s:@@OPENVAS_LOGDIR@@:%{_var}/log/openvas:g
	s:@@OPENVAS_SYSCONF@@:%{_sysconfdir}/openvas:g" %{SOURCE2} > openvassd.conf
install -Dp -m 644 openvassd.conf %{buildroot}/%{_sysconfdir}/openvas/

# install log rotation stuff
install -m 644 -Dp %{SOURCE3} \
	%{buildroot}/%{_sysconfdir}/logrotate.d/openvas-scanner

# Install sysconfig configration
install -Dp -m 644 %{SOURCE4} %{buildroot}/%{_sysconfdir}/sysconfig/openvas-scanner

# Install cront script for update
install -Dp -m 755 %{SOURCE5} %{buildroot}/%{_sbindir}/

# Install cront jobs to periodically update plugins
install -Dp -m 644 %{SOURCE6} %{buildroot}/%{_sysconfdir}/cron.d/openvas-sync-plugins

%clean
rm -rf %{buildroot}

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

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

%postun
if [ $1 -ge 1 ]; then
	/sbin/service openvas-scanner condrestart >/dev/null 2>&1
fi 

%files
%defattr(-,root,root,-)
%doc CHANGES ChangeLog COPYING README
%{_bindir}/openvas-mkcert-client
%{_bindir}/openvas-mkrand
%{_sbindir}/openvas-adduser
%{_sbindir}/openvas-mkcert
%{_sbindir}/openvas-rmuser
%{_sbindir}/openvas-nvt-sync
%{_sbindir}/openvas-nvt-sync-cron
%{_sbindir}/greenbone-nvt-sync
%{_sbindir}/openvassd
%{_initddir}/openvas-scanner
%dir %{_sysconfdir}/openvas
%config(noreplace) %{_sysconfdir}/openvas/openvassd.conf
%config(noreplace) %{_sysconfdir}/sysconfig/openvas-scanner
%config(noreplace) %{_sysconfdir}/cron.d/openvas-sync-plugins
%{_mandir}/man1/openvas-mkcert-client.1.*
%{_mandir}/man1/openvas-mkrand.1.*
%{_mandir}/man8/openvas-adduser.8.*
%{_mandir}/man8/openvas-mkcert.8.*
%{_mandir}/man8/openvas-rmuser.8.*
%{_mandir}/man8/openvassd.8.*
%{_mandir}/man8/openvas-nvt-sync.8.*
%dir %{_var}/log/openvas
%dir %{_var}/lib/openvas
%dir %{_var}/lib/openvas/openvas-services
%dir %{_var}/cache/openvas
%config(noreplace) %{_sysconfdir}/logrotate.d/openvas-scanner
%dir %{_libdir}/openvas
%dir %{_libdir}/openvas/plugins
%attr(644,root,root) %{_libdir}/openvas/plugins/*.nes

%changelog
* Fri Apr 16 2010 Stjepan Gros <stjepan.gros at gmail.com> - 3.0.2-3
- Reverted plugin permissions to 644
- Removed non-existing provides

* Wed Apr 14 2010 Stjepan Gros <stjepan.gros at gmail.com> - 3.0.2-2
- Changes based on the comments in the following review
  https://bugzilla.redhat.com/show_bug.cgi?id=562469#c24
- Included missed modifications to openvassd.conf by Michal Ambroz

* Tue Apr 13 2010 Stjepan Gros <stjepan.gros at gmail.com> - 3.0.2-1
- bump to a new upstream release

* Thu Mar 25 2010 Michal Ambroz <rebus at, seznam.cz> - 3.0.1-6
- fix config on 32bit architecture, double includes in specfile, permissions
- usage of macros/shell variables

* Fri Mar 12 2010 Stjepan Gros <stjepan.gros at gmail.com> - 3.0.1-5
- cron job shouldn't be replaced upon upgrade
- better alignment with Fedora's SysVInitScript guidelines
- Moved cronjob to cron.d directory
- Changed init.d name from openvassd into openvas-scanner
- Don't strip binary plugins in install phase to properly generate debuginfo

* Tue Mar  9 2010 Stjepan Gros <stjepan.gros at gmail.com> - 3.0.1-4
- Added cron job to periodically update plugins
- Added new option to init.d script to reload plugins

* Wed Mar  3 2010 Stjepan Gros <stjepan.gros at gmail.com> - 3.0.1-3
- Changes based on the comments in
  https://bugzilla.redhat.com/show_bug.cgi?id=562469#c5
- Fixed a small bug in postun scriptlet
- Ownership of /etc/openvas directory moved to libraries
- Modified init.d script to change openvassd into openvas-scanner

* Fri Feb 26 2010 Stjepan Gros <stjepan.gros at gmail.com> - 3.0.1-2
- Added cmake BR
- Changes based on the comments in
  https://bugzilla.redhat.com/show_bug.cgi?id=562469#c3

* Sat Feb  6 2010 Stjepan Gros <stjepan.gros at gmail.com> - 3.0.1-1
- Upgraded spec file for scanner version 3

* Tue Nov 17 2009 Stjepan Gros <stjepan.gros at gmail.com> - 2.0.3-1
- Minor changes from taken from Xavier Bachelot <xavier at bachelot.org>
- Initial spec file


--- NEW FILE openvas-scanner.sysconfig ---
# Set to yes if plugins should be automatically updated via a cron job
auto_plugin_update=no

# Notify OpenVAS scanner after update by seding it SIGHUP?
notify_openvas_scanner=yes

# Method to use to get updates. The default is via rsync
# Note that only wget and curl support retrieval via proxy
# update_method=rsync|wget|curl

# Additionaly, you can specify the following variables
#NVT_DIR		where to extract plugins (absolute path)
#OV_RSYNC_FEED		URL of rsync feed
#OV_HTTP_FEED		URL of http feed


--- NEW FILE openvas.logrotate ---
# logrotate for openvas
/var/log/openvas/*.log {
        rotate 4
        weekly
        compress
        delaycompress
        missingok
	postrotate
	    /bin/kill -HUP `pidof openvassd`
	endscript
}


--- NEW FILE openvassd.conf ---
# Configuration file of the OpenVAS Security Scanner



# Every line starting with a '#' is a comment

[Misc]

# Path to the security checks folder : 
plugins_folder = @@OPENVAS_PLUGINS@@

# Path to OpenVAS caching folder: 
cache_folder = @@OPENVAS_CACHE@@

# Path to OpenVAS include directories: 
# (multiple entries are separated with colon ':')
include_folders = @@OPENVAS_PLUGINS@@

# Maximum number of simultaneous hosts tested : 
max_hosts = 30

# Maximum number of simultaneous checks against each host tested : 
max_checks = 10

# Niceness. If set to 'yes', openvassd will renice itself to 10.
be_nice = no

# Log file (or 'syslog') : 
logfile = @@OPENVAS_LOGDIR@@/openvassd.log

# Shall we log every details of the attack ? (disk intensive)
log_whole_attack = no

# Log the name of the plugins that are loaded by the server ?
log_plugins_name_at_load = no

# Dump file for debugging output, use `-' for stdout
dumpfile = @@OPENVAS_LOGDIR@@/openvassd.dump

# Rules file : 
rules = @@OPENVAS_SYSCONF@@/openvassd.rules

# CGI paths to check for (cgi-bin:/cgi-aws:/ can do)
cgi_path = /cgi-bin:/scripts

# Range of the ports the port scanners will scan : 
# 'default' means that OpenVAS will scan ports found in its
# services file.
port_range = default

# Optimize the test (recommended) : 
optimize_test = yes



# Optimization : 
# Read timeout for the sockets of the tests : 
checks_read_timeout = 5
# Ports against which two plugins should not be run simultaneously :
# non_simult_ports = Services/www, 139, Services/finger
non_simult_ports = 139, 445
# Maximum lifetime of a plugin (in seconds) : 
plugins_timeout = 320


# Safe checks rely on banner grabbing :
safe_checks = yes


# Automatically activate the plugins that are depended on
auto_enable_dependencies = yes


# Do not echo data from plugins which have been automatically enabled
silent_dependencies = no


# Designate hosts by MAC address, not IP address (useful for DHCP networks)
use_mac_addr = no


#--- Knowledge base saving (can be configured by the client) :
# Save the knowledge base on disk : 
save_knowledge_base = no
# Restore the KB for each test :
kb_restore = no
# Only test hosts whose KB we do not have :
only_test_hosts_whose_kb_we_dont_have = no
# Only test hosts whose KB we already have :
only_test_hosts_whose_kb_we_have = no
# KB test replay :
kb_dont_replay_scanners = no
kb_dont_replay_info_gathering = no
kb_dont_replay_attacks = no
kb_dont_replay_denials = no
kb_max_age = 864000
#--- end of the KB section



# If this option is set, OpenVAS will not scan a network incrementally
# (10.0.0.1, then 10.0.0.2, 10.0.0.3 and so on..) but will attempt to
# slice the workload throughout the whole network (ie: it will scan
# 10.0.0.1, then 10.0.0.127, then 10.0.0.2, then 10.0.0.128 and so on...
slice_network_addresses = no

# Should consider all the NASL scripts as being signed ? (unsafe if set to 'yes')
nasl_no_signature_check = yes

#end.


Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/openvas-scanner/F-13/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- .cvsignore	18 Apr 2010 01:50:01 -0000	1.1
+++ .cvsignore	18 Apr 2010 08:37:36 -0000	1.2
@@ -0,0 +1 @@
+openvas-scanner-3.0.2.tar.gz


Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/openvas-scanner/F-13/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- sources	18 Apr 2010 01:50:01 -0000	1.1
+++ sources	18 Apr 2010 08:37:37 -0000	1.2
@@ -0,0 +1 @@
+0fbadc838d4f21c43f1ce6c8180287e6  openvas-scanner-3.0.2.tar.gz



More information about the scm-commits mailing list