SHA256
1
0
forked from pool/argus

Accepting request 140229 from security

Change changes for being acceptable on factory (forwarded request 140114 from posophe)

OBS-URL: https://build.opensuse.org/request/show/140229
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/argus?expand=0&rev=17
This commit is contained in:
Stephan Kulow 2012-11-06 15:04:51 +00:00 committed by Git OBS Bridge
commit 9b86c7180f
8 changed files with 64 additions and 183 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:bcce24ca20611d64b9c17278b57e6df3b5919ff58d276cc78a1e76367869ced6
size 325033

View File

@ -1,6 +1,6 @@
--- argus/ArgusSource.c
+++ argus/ArgusSource.c
@@ -45,7 +45,7 @@
--- a/argus/ArgusSource.c 2012-06-20 15:11:43.000000000 +0200
+++ b/argus/ArgusSource.c 2012-10-24 11:14:47.425282905 +0200
@@ -48,7 +48,7 @@
#if defined(__APPLE_CC__) || defined(__APPLE__)
#define PCAP_DONT_INCLUDE_PCAP_BPF_H
#include <sys/ioctl.h>
@ -8,4 +8,4 @@
+#include <pcap-bpf.h>
#endif
#include <compat.h>

3
argus-3.0.6.1.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:df330ae91d4d74147587d6c4a6322a50fe4d30853830a72849867a50f22c60af
size 742739

View File

@ -1,3 +1,27 @@
-------------------------------------------------------------------
Sun Oct 28 15:54:54 UTC 2012 - p.drouand@gmail.com
- Remove argus-3.0.0-flex.diff from Coolo : argus_get_leng string
is no longer used since 3.0.6 release
-------------------------------------------------------------------
Sun Oct 28 14:00:36 UTC 2012 - p.drouand@gmail.com
- - Update to 3.0.6.1 version :
Bugs fixed :
* Correct memory leak and deadlock issues for argus and radium;
* Argus and radium get some protection from port scanners;
* The client release also fixes a number of bugs with geolocation data,
especially country code aggregation and printing. We also fixed
meta-data label merging, multicast identification, and some minor
issues with variable namespace collisions.
- Remove sysvinit support and improve systemd support
-------------------------------------------------------------------
Fri Oct 26 05:34:04 UTC 2012 - coolo@suse.com
- remove prototypes for flex, they conflict with the real ones
-------------------------------------------------------------------
Sun Nov 27 10:05:22 UTC 2011 - coolo@suse.com

11
argus.service Normal file
View File

@ -0,0 +1,11 @@
[Unit]
Description=Argus generates network transaction audit records
After=syslog.target network.target
[Service]
PIDFile=/var/run/argus.pid
ExecStart=/usr/sbin/argus -d
[Install]
WantedBy=multi-user.target

View File

@ -19,27 +19,26 @@
Name: argus
BuildRequires: bison flex libpcap-devel tcpd-devel tcsh
License: BSD3c ; LGPLv2.1+ ; MIT
License: BSD-3-Clause ; LGPL-2.1+ ; MIT
Group: Productivity/Networking/Diagnostic
Summary: Network Monitoring Tool
Version: 3.0.0
Version: 3.0.6.1
Release: 3
Url: http://www.qosient.com/argus/
Source: %{name}-%{version}.tar.bz2
Source1: rc.argus
Source2: sysconfig.argus
Source3: README.SuSE
Source4: argus_linux.8.gz
#Patch: %{name}-%{version}-fixes-1.patch
Patch1: %{name}-%{version}-libpcap.diff
Source5: argus.service
Patch1: %{name}-%{version}-libpcap.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: systemd
%package server
License: BSD3c ; LGPLv2.1+ ; NON-OSI-COMPLIANT(Restricted Shareware) ; MIT
PreReq: %insserv_prereq %fillup_prereq
License: BSD-3-Clause ; LGPL-2.1+ ; NON-OSI-COMPLIANT(Restricted Shareware) ; MIT
Group: Productivity/Networking/Diagnostic
Summary: Daemon for Network Monitoring Tool
Requires: argus
%{?systemd_requires}
Provides: argus:/usr/sbin/argus
%description
@ -52,8 +51,7 @@ Daemon for Argus network monitoring tool.
%prep
%setup -n argus-%{version}
# %patch -p1
%patch1
%patch1 -p1
cp %{S:3} .
cp %{S:4} man/man8/
@ -64,9 +62,10 @@ export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
make %{?_smp_mflags}
%install
install -d -m 755 $RPM_BUILD_ROOT{/etc/init.d,/sbin,/usr/{sbin,bin,share/man},%{_docdir}}
install -d -m 755 $RPM_BUILD_ROOT{/etc,/usr/{sbin,bin,share/man},%{_docdir}}
install -m 700 bin/argus $RPM_BUILD_ROOT/usr/sbin/argus
install -m 700 bin/arg* $RPM_BUILD_ROOT/usr/bin/
install -D -m 0755 %{SOURCE5} %{buildroot}/%{_unitdir}/argus.service
# alread in sbin
rm -f $RPM_BUILD_ROOT/usr/bin/argus
rm -f $RPM_BUILD_ROOT/usr/bin/argus_linux
@ -74,38 +73,35 @@ rm -f $RPM_BUILD_ROOT/usr/bin/argus_linux
cp -a man* $RPM_BUILD_ROOT%{_mandir}
chmod a-x $RPM_BUILD_ROOT%{_mandir}/*/* )
rm -f $RPM_BUILD_ROOT%{_mandir}/man1/tcpdump.1*
rm -rf `find -type f -name ._*`
install -m 600 support/Config/argus.conf $RPM_BUILD_ROOT/etc/argus.conf
install -m 755 support/Archive/argusarchive $RPM_BUILD_ROOT/usr/bin/
install -d -m 755 $RPM_BUILD_ROOT/etc/init.d
install -m 755 %{S:1} $RPM_BUILD_ROOT/etc/init.d/argus
ln -sf ../etc/init.d/argus $RPM_BUILD_ROOT/sbin/rcargus
mkdir -p $RPM_BUILD_ROOT/var/adm/fillup-templates
install -m 644 %{S:2} $RPM_BUILD_ROOT/var/adm/fillup-templates/sysconfig.argus
find support -type f -exec chmod 0644 {} \;
chmod a+x support/{Archive/argusarchive,Startup/argus,System/magic}
%pre server
%service_add_pre argus.service
%post server
%{fillup_and_insserv argus}
%service_add_post argus.service
%preun server
%stop_on_removal argus
%service_del_preun argus.service
%postun server
%restart_on_update argus
%{insserv_cleanup}
%service_del_postun argus.service
%files
%defattr(-,root,root)
/usr/bin/argus*
%{_bindir}/argus*
%files server
%defattr(-,root,root)
%doc doc COPYING MANIFEST README.* support
%attr(0644,root,root) %doc doc COPYING MANIFEST README.* support
%attr(0644,root,root) %doc %{_mandir}/man*/*
%config /etc/init.d/argus
%config /etc/argus.conf
/usr/sbin/*
/sbin/rcargus
/var/adm/fillup-templates/sysconfig.argus
%config %{_unitdir}/argus.service
%{_sbindir}/*
%changelog

132
rc.argus
View File

@ -1,132 +0,0 @@
#! /bin/sh
# Copyright (c) 1998-2001 SuSE GmbH Nuernberg, Germany. All rights reserved.
# Copyright (c) 2002 SuSE Linux AG, Nuernberg, Germany.
#
# Author: Carsten Hoeger <choeger@suse.de>
#
# /etc/init.d/argus
#
### BEGIN INIT INFO
# Provides: argus
# Required-Start: $remote_fs
# Required-Stop: $remote_fs
# Default-Start: 2 3 5
# Default-Stop: 0 1 6
# Description: Start argus
### END INIT INFO
test -r /etc/sysconfig/argus || exit 6
. /etc/sysconfig/argus
ARGUS_BIN=/usr/sbin/argus
test -x $ARGUS_BIN || exit 5
# Shell functions sourced from /etc/rc.status:
# rc_check check and set local and overall rc status
# rc_status check and set local and overall rc status
# rc_status -v ditto but be verbose in local rc status
# rc_status -v -r ditto and clear the local rc status
# rc_failed set local and overall rc status to failed
# rc_failed <num> set local and overall rc status to <num><num>
# rc_reset clear local rc status (overall remains)
# rc_exit exit appropriate to overall rc status
. /etc/rc.status
# First reset status of this service
rc_reset
# Return values acc. to LSB for all commands but status:
# 0 - success
# 1 - generic or unspecified error
# 2 - invalid or excess argument(s)
# 3 - unimplemented feature (e.g. "reload")
# 4 - insufficient privilege
# 5 - program is not installed
# 6 - program is not configured
# 7 - program is not running
#
# Note that starting an already running service, stopping
# or restarting a not-running service as well as the restart
# with force-reload (in case signalling is not supported) are
# considered a success.
case "$1" in
start)
echo -n "Starting argus "
## Start daemon with startproc(8). If this fails
## the echo return value is set appropriate.
/sbin/startproc $ARGUS_BIN -w $ARGUS_LOGFILE \
-i $ARGUS_INTERFACE || return=$rc_failed
# Remember status and be verbose
rc_status -v
;;
stop)
echo -n "Shutting down argus "
/sbin/killproc -TERM $ARGUS_BIN
# Remember status and be verbose
rc_status -v
;;
try-restart)
## Stop the service and if this succeeds (i.e. the
## service was running before), start it again.
## Note: try-restart is not (yet) part of LSB (as of 0.7.5)
$0 status >/dev/null && $0 restart
# Remember status and be quiet
rc_status
;;
restart)
## If first returns OK call the second, if first or
## second command fails, set echo return value.
$0 stop && $0 start || return=$rc_failed
;;
force-reload)
## Signal the daemon to reload its config. Most daemons
## do this on signal 1 (SIGHUP).
## If it does not support it, restart.
echo -n "Reload argus"
# if it supports it:
#killproc -HUP $ARGUS_BIN
#touch /var/run/FOO.pid
#rc_status -v
# Otherwise:
$0 stop && $0 start
rc_status
;;
reload)
echo -n "Reload argus"
# If it supports signalling:
#killproc -HUP $ARGUS_BIN
#touch /var/run/FOO.pid
#rc_status -v
# Otherwise if it does not support reload:
rc_failed 3
rc_status -v
;;
status)
echo -n "Checking for service argus: "
## Check status with checkproc(8), if process is running
## checkproc will return with exit status 0.
# Status has a slightly different for the status command:
# 0 - service running
# 1 - service dead, but /var/run/ pid file exists
# 2 - service dead, but /var/lock/ lock file exists
# 3 - service not running
# NOTE: checkproc returns LSB compliant status values.
checkproc $ARGUS_BIN
rc_status -v
;;
*)
echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload}"
exit 1
esac
rc_exit

View File

@ -1,18 +0,0 @@
## Path: Network/Monitors/Argus
## Description: Argus settings
## Type: string(eth0)
## Default: eth0
## ServiceRestart: argus
#
# What interface should argus listen?
#
ARGUS_INTERFACE="eth0"
## Type: string(/var/log/argus.log)
## Default: /var/log/argus.log
## ServiceRestart: argus
#
# Where to write the argus logfile? (Remember to check this file
# periodical, because it may become very large!!!)
#
ARGUS_LOGFILE="/var/log/argus.log"