SHA256
1
0
forked from pool/argus
OBS User unknown 2007-01-15 22:51:29 +00:00 committed by Git OBS Bridge
commit 480fe513aa
13 changed files with 1189 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.osc

32
README.SuSE Normal file
View File

@ -0,0 +1,32 @@
README.SuSE
choeger, 4.5.98
Argus is a network-monitoring-tool.
Take a look at /usr/doc/packages/README* for details.
Please change the variables in /etc/sysconfig/argus if you need.
A daily restart-script may look like this:
----------------------------------[snip]---------------------------------
#!/bin/sh
rcargus stop
mv /var/log/argus.log /var/log/argus.`date +"%y%m%d"`.log
gzip -9 /var/log/argus.`date +"%y%m%d"`.log
rcargus start
----------------------------------[snip]---------------------------------
you may copy it to /root/bin/argus_restart and add the following to your
/etc/crontab:
----------------------------------[snip]---------------------------------
50 17 * * * root /root/bin/argus_restart
----------------------------------[snip]---------------------------------
if you want to restart argus at 17:50 (5:50pm).
Use the tools 'ra' and 'services' to take a look in your captured
argus-data.

520
argus-2.0.6-fixes-1.patch Normal file
View File

@ -0,0 +1,520 @@
diff -rNu argus-2.0.6/aclocal.m4 argus-2.0.6.fixes.1/aclocal.m4
--- argus-2.0.6/aclocal.m4 2004-02-23 16:00:29.000000000 +0100
+++ argus-2.0.6.fixes.1/aclocal.m4 2004-05-10 14:53:01.000000000 +0200
@@ -322,7 +322,7 @@
dnl
dnl If the file .debug exists:
-dnl Add NTAM_DEBUG to the condefs.h file.
+dnl Add ARGUS_DEBUG to the condefs.h file.
dnl
dnl usage:
dnl
@@ -338,13 +338,13 @@
[
if test -f .debug ; then
cat >> confdefs.h <<\EOF
-#define NTAMDEBUG 1
+#define ARGUSDEBUG 1
EOF
fi])
dnl
dnl If the file .threads exists:
-dnl Add NTAM_THREADS to the condefs.h file.
+dnl Add ARGUS_THREADS to the condefs.h file.
dnl
dnl usage:
dnl
@@ -360,7 +360,7 @@
[
if test -f .threads ; then
cat >> confdefs.h <<\EOF
-#define NTAM_THREADS 1
+#define ARGUS_THREADS 1
EOF
if test "$GCC" = yes ; then
LIBS="$LIBS -pthread"
@@ -451,7 +451,7 @@
LIB_SASL="$LIB_SASL -lsasl"
if test "$with_sasl" != no; then
- AC_DEFINE(NTAM_SASL, 1)
+ AC_DEFINE(ARGUS_SASL, 1)
AC_SUBST(LIB_SASL)
AC_SUBST(SASLFLAGS)
fi
diff -rNu argus-2.0.6/ChangeLog argus-2.0.6.fixes.1/ChangeLog
--- argus-2.0.6/ChangeLog 2004-05-05 15:15:44.000000000 +0200
+++ argus-2.0.6.fixes.1/ChangeLog 2004-05-10 19:09:58.000000000 +0200
@@ -1,3 +1,6 @@
+Mon May 10 13:02:46 EDT 2004
+ * bug in -F processing fixed.
+
Wed May 5 09:15:34 EDT 2004
* argus-2.0.6 released.
diff -rNu argus-2.0.6/common/argus_filter.c argus-2.0.6.fixes.1/common/argus_filter.c
--- argus-2.0.6/common/argus_filter.c 2004-02-23 16:00:36.000000000 +0100
+++ argus-2.0.6.fixes.1/common/argus_filter.c 2004-05-10 15:29:10.000000000 +0200
@@ -4765,11 +4765,13 @@
void
ArgusDebug (int d, char *fmt, ...)
{
- va_list ap;
char buf[1024], *ptr;
+ struct timeval now;
+ va_list ap;
if (d <= Argusdflag) {
- (void) sprintf (buf, "%s[%d]: %s ", ArgusProgramName, (int)getpid(), print_time(&ArgusGlobalTime));
+ gettimeofday(&now, 0L);
+ (void) sprintf (buf, "%s[%d]: %s ", ArgusProgramName, (int)getpid(), print_time(&now));
ptr = &buf[strlen(buf)];
va_start (ap, fmt);
@@ -5480,9 +5482,8 @@
ptr = &buf[strlen(buf)];
va_end (ap);
- if (*fmt) {
- fmt += (int) strlen (fmt);
- if (fmt[-1] != '\n')
+ if (*ptr) {
+ if (ptr[-1] != '\n')
sprintf (ptr, "\n");
}
diff -rNu argus-2.0.6/configure argus-2.0.6.fixes.1/configure
--- argus-2.0.6/configure 2004-05-05 16:27:45.000000000 +0200
+++ argus-2.0.6.fixes.1/configure 2004-05-10 14:53:56.000000000 +0200
@@ -3901,7 +3901,7 @@
if test -f .debug ; then
cat >> confdefs.h <<\EOF
-#define NTAMDEBUG 1
+#define ARGUSDEBUG 1
EOF
fi
@@ -4376,7 +4376,7 @@
if test "$with_sasl" != no; then
cat >>confdefs.h <<\_ACEOF
-#define NTAM_SASL 1
+#define ARGUS_SASL 1
_ACEOF
diff -rNu argus-2.0.6/server/argus.c argus-2.0.6.fixes.1/server/argus.c
--- argus-2.0.6/server/argus.c 2004-02-23 16:00:36.000000000 +0100
+++ argus-2.0.6.fixes.1/server/argus.c 2004-05-10 14:51:57.000000000 +0200
@@ -236,8 +236,16 @@
if (*ptr == '-') {
do {
switch (*++ptr) {
+ case 'D':
+ if (*++ptr == '\0')
+ ptr = argv[++i];
+ setArgusdflag (atoi (ptr));
+ break;
+
case 'F':
- ArgusParseResourceFile (argv[i++]);
+ if (*++ptr == '\0')
+ ptr = argv[++i];
+ ArgusParseResourceFile (ptr);
doconf++;
break;
diff -rNu argus-2.0.6/server/argus.h argus-2.0.6.fixes.1/server/argus.h
--- argus-2.0.6/server/argus.h 2004-02-23 16:00:36.000000000 +0100
+++ argus-2.0.6.fixes.1/server/argus.h 2004-05-10 15:00:13.000000000 +0200
@@ -57,7 +57,7 @@
char *RaTimeFormat = "%d %b %y %T";
char RaFieldDelimiter = '.';
-int nflag = 1, Nflag = -1, uflag = 1, gflag = 0;
+int nflag = 1, Nflag = -1, uflag = 0, gflag = 0;
int Uflag = 6, XMLflag = 0, pflag = 0, pidflag = 0;
int Dflag = 0, daemonflag = 0;
diff -rNu argus-2.0.6/server/ArgusSource.c argus-2.0.6.fixes.1/server/ArgusSource.c
--- argus-2.0.6/server/ArgusSource.c 2004-04-30 20:11:35.000000000 +0200
+++ argus-2.0.6.fixes.1/server/ArgusSource.c 2004-05-10 15:23:22.000000000 +0200
@@ -67,7 +67,7 @@
ArgusSnapLen = getArgusSnapLen();
#ifdef ARGUSDEBUG
- ArgusDebug (1, "ArgusNewSource() returning 0x%x\n", retn);
+ ArgusDebug (1, "ArgusNewSource() returning 0x%x", retn);
#endif
return (retn);
@@ -99,7 +99,7 @@
setuid(getuid());
if ((ArgusPd[0] = ArgusOpenInputPacketFile(errbuf)) == NULL)
- ArgusLog (LOG_ERR, "ArgusInitSource: %s\n", errbuf);
+ ArgusLog (LOG_ERR, "ArgusInitSource: %s", errbuf);
} else {
if (ArgusDeviceList == NULL) {
@@ -127,7 +127,7 @@
ArgusInterface[i].ArgusNetMask = ntohl(ArgusInterface[i].ArgusNetMask);
}
} else
- ArgusLog (LOG_ERR, "ArgusInitSource: pcap_open_live %s\n", errbuf);
+ ArgusLog (LOG_ERR, "ArgusInitSource: pcap_open_live %s", errbuf);
ArgusPushBackList(ArgusDeviceList, ArgusDevice);
}
@@ -154,7 +154,7 @@
bzero ((char *) &ArgusFilters[0], sizeof (struct bpf_program));
if (pcap_compile (ArgusPd[0], &ArgusFilters[0], ArgusInputFilter, getArgusOflag(), ArgusNetMask) < 0)
- ArgusLog (LOG_ERR, "ArgusInputFilter \"%s\" %s\n", ArgusInputFilter, pcap_geterr (ArgusPd[0]));
+ ArgusLog (LOG_ERR, "ArgusInputFilter \"%s\" %s", ArgusInputFilter, pcap_geterr (ArgusPd[0]));
if (Argusbpflag) {
Argusbpf_dump (&ArgusFilters[0], Argusbpflag);
@@ -165,18 +165,18 @@
if (ArgusPd[i] != NULL) {
if (ArgusInputPacketFileType == ARGUSLIBPPKTFILE) {
if (pcap_setfilter (ArgusPd[i], &ArgusFilters[0]) < 0)
- ArgusLog (LOG_ERR, "%s\n", pcap_geterr (ArgusPd[i]));
+ ArgusLog (LOG_ERR, "%s", pcap_geterr (ArgusPd[i]));
}
}
}
if (ArgusWriteOutPacketFile) {
if ((ArgusPcapOutFile = pcap_dump_open(ArgusPd[0], ArgusWriteOutPacketFile)) == NULL)
- ArgusLog (LOG_ERR, "%s\n", pcap_geterr (ArgusPd[0]));
+ ArgusLog (LOG_ERR, "%s", pcap_geterr (ArgusPd[0]));
}
#ifdef ARGUSDEBUG
- ArgusDebug (1, "ArgusInitSource() returning\n");
+ ArgusDebug (1, "ArgusInitSource() returning");
#endif
}
@@ -197,7 +197,7 @@
pcap_dump_close(ArgusPcapOutFile);
#ifdef ARGUSDEBUG
- ArgusDebug (1, "ArgusDeleteSource() deleting ArgusSourceTask 0x%x\n", ArgusSourceTask);
+ ArgusDebug (1, "ArgusDeleteSource() deleting ArgusSourceTask 0x%x", ArgusSourceTask);
#endif
return (0);
}
@@ -260,7 +260,7 @@
retn = (char *) ArgusFrontList(ArgusDeviceList);
#ifdef ARGUSDEBUG
- ArgusDebug (3, "getArgusDevice() returning %s\n", retn);
+ ArgusDebug (3, "getArgusDevice() returning %s", retn);
#endif
return (retn);
}
@@ -276,7 +276,7 @@
ArgusPushFrontList(ArgusDeviceList, strdup(value));
#ifdef ARGUSDEBUG
- ArgusDebug (3, "setArgusDevice(%s) returning\n", value);
+ ArgusDebug (3, "setArgusDevice(%s) returning", value);
#endif
}
@@ -289,7 +289,7 @@
}
#ifdef ARGUSDEBUG
- ArgusDebug (3, "clearArgusDevice(%s) returning\n");
+ ArgusDebug (3, "clearArgusDevice(%s) returning");
#endif
}
@@ -381,7 +381,7 @@
close(pcap_fileno(ArgusPd[0]));
#ifdef ARGUSDEBUG
- ArgusDebug (5, "ArgusMoatTshRead() returning %d\n", retn);
+ ArgusDebug (5, "ArgusMoatTshRead() returning %d", retn);
#endif
return (retn);
@@ -424,7 +424,7 @@
}
#ifdef ARGUSDEBUG
- ArgusDebug (5, "ArgusSnoopRead() returning %d\n", retn);
+ ArgusDebug (5, "ArgusSnoopRead() returning %d", retn);
#endif
return (retn);
@@ -449,7 +449,7 @@
}
#ifdef ARGUSDEBUG
- ArgusDebug (3, "Arguslookup_pcap_callback(%d) returning %s: 0x%x\n", type, name, retn);
+ ArgusDebug (3, "Arguslookup_pcap_callback(%d) returning %s: 0x%x", type, name, retn);
#endif
return (retn);
@@ -489,7 +489,7 @@
}
if ((ArgusPcapOutFile = pcap_dump_open(ArgusPd[0], ArgusWriteOutPacketFile)) == NULL)
- ArgusLog (LOG_ERR, "%s\n", pcap_geterr (ArgusPd[0]));
+ ArgusLog (LOG_ERR, "%s", pcap_geterr (ArgusPd[0]));
}
}
}
@@ -499,7 +499,7 @@
pcap_dump((u_char *)ArgusPcapOutFile, h, p);
#ifdef ARGUSDEBUG
- ArgusDebug (6, "ArgusEtherPacket (0x%x, 0x%x, 0x%x) returning\n", user, h, p);
+ ArgusDebug (6, "ArgusEtherPacket (0x%x, 0x%x, 0x%x) returning", user, h, p);
#endif
}
@@ -604,7 +604,7 @@
ArgusGlobalTime = *tvp;
if (ArgusGlobalTime.tv_sec < 0) {
- ArgusLog (LOG_ERR, "ArgusFddiPacket (0x%x, 0x%x, 0x%x) libpcap timestamp out of range %d.%d\n",
+ ArgusLog (LOG_ERR, "ArgusFddiPacket (0x%x, 0x%x, 0x%x) libpcap timestamp out of range %d.%d",
user, h, p, ArgusGlobalTime.tv_sec, ArgusGlobalTime.tv_usec);
}
ArgusThisLength = length;
@@ -617,7 +617,7 @@
}
#ifdef ARGUSDEBUG
- ArgusDebug (6, "ArgusFddiPacket (0x%x, 0x%x, 0x%x) returning\n", user, h, p);
+ ArgusDebug (6, "ArgusFddiPacket (0x%x, 0x%x, 0x%x) returning", user, h, p);
#endif
}
@@ -636,7 +636,7 @@
ArgusGlobalTime = *tvp;
if (ArgusGlobalTime.tv_sec < 0) {
- ArgusLog (LOG_ERR, "ArgusATMPacket (0x%x, 0x%x, 0x%x) libpcap timestamp out of range %d.%d\n",
+ ArgusLog (LOG_ERR, "ArgusATMPacket (0x%x, 0x%x, 0x%x) libpcap timestamp out of range %d.%d",
user, h, p, ArgusGlobalTime.tv_sec, ArgusGlobalTime.tv_usec);
}
@@ -669,7 +669,7 @@
ArgusProcessPacket (ep, length, tvp);
#ifdef ARGUSDEBUG
- ArgusDebug (6, "ArgusATMPacket (0x%x, 0x%x, 0x%x) returning\n", user, h, p);
+ ArgusDebug (6, "ArgusATMPacket (0x%x, 0x%x, 0x%x) returning", user, h, p);
#endif
}
@@ -688,7 +688,7 @@
ArgusGlobalTime = *tvp;
if (ArgusGlobalTime.tv_sec < 0) {
- ArgusLog (LOG_ERR, "ArgusPppPacket (0x%x, 0x%x, 0x%x) libpcap timestamp out of range %d.%d\n",
+ ArgusLog (LOG_ERR, "ArgusPppPacket (0x%x, 0x%x, 0x%x) libpcap timestamp out of range %d.%d",
user, h, p, ArgusGlobalTime.tv_sec, ArgusGlobalTime.tv_usec);
}
ArgusSnapLength = caplen;
@@ -703,7 +703,7 @@
}
#ifdef ARGUSDEBUG
- ArgusDebug (6, "ArgusPppPacket (0x%x, 0x%x, 0x%x) returning\n", user, h, p);
+ ArgusDebug (6, "ArgusPppPacket (0x%x, 0x%x, 0x%x) returning", user, h, p);
#endif
}
@@ -723,7 +723,7 @@
ArgusGlobalTime = *tvp;
if (ArgusGlobalTime.tv_sec < 0) {
- ArgusLog (LOG_ERR, "ArgusPppBsdosPacket (0x%x, 0x%x, 0x%x) libpcap timestamp out of range %d.%d\n",
+ ArgusLog (LOG_ERR, "ArgusPppBsdosPacket (0x%x, 0x%x, 0x%x) libpcap timestamp out of range %d.%d",
user, h, p, ArgusGlobalTime.tv_sec, ArgusGlobalTime.tv_usec);
}
ArgusSnapLength = caplen;
@@ -754,7 +754,7 @@
}
#ifdef ARGUSDEBUG
- ArgusDebug (6, "ArgusPppPacket (0x%x, 0x%x, 0x%x) returning\n", user, h, p);
+ ArgusDebug (6, "ArgusPppPacket (0x%x, 0x%x, 0x%x) returning", user, h, p);
#endif
}
@@ -789,7 +789,7 @@
ArgusGlobalTime = *tvp;
if (ArgusGlobalTime.tv_sec < 0) {
- ArgusLog (LOG_ERR, "ArgusSlipPacket (0x%x, 0x%x, 0x%x) libpcap timestamp out of range %d.%d\n",
+ ArgusLog (LOG_ERR, "ArgusSlipPacket (0x%x, 0x%x, 0x%x) libpcap timestamp out of range %d.%d",
user, h, p, ArgusGlobalTime.tv_sec, ArgusGlobalTime.tv_usec);
}
ArgusSnapLength = caplen;
@@ -805,7 +805,7 @@
#ifdef ARGUSDEBUG
- ArgusDebug (6, "ArgusSlipPacket (0x%x, 0x%x, 0x%x) returning\n", user, h, p);
+ ArgusDebug (6, "ArgusSlipPacket (0x%x, 0x%x, 0x%x) returning", user, h, p);
#endif
}
@@ -821,7 +821,7 @@
ArgusGlobalTime = *tvp;
if (ArgusGlobalTime.tv_sec < 0) {
- ArgusLog (LOG_ERR, "ArgusIpPacket (0x%x, 0x%x, 0x%x) libpcap timestamp out of range %d.%d\n",
+ ArgusLog (LOG_ERR, "ArgusIpPacket (0x%x, 0x%x, 0x%x) libpcap timestamp out of range %d.%d",
user, h, p, ArgusGlobalTime.tv_sec, ArgusGlobalTime.tv_usec);
}
ArgusSnapLength = caplen;
@@ -835,7 +835,7 @@
#ifdef ARGUSDEBUG
- ArgusDebug (6, "ArgusIpPacket (0x%x, 0x%x, 0x%x) returning\n", user, h, p);
+ ArgusDebug (6, "ArgusIpPacket (0x%x, 0x%x, 0x%x) returning", user, h, p);
#endif
}
@@ -860,7 +860,7 @@
ArgusGlobalTime = *tvp;
if (ArgusGlobalTime.tv_sec < 0) {
- ArgusLog (LOG_ERR, "ArgusSllPacket (0x%x, 0x%x, 0x%x) libpcap timestamp out of range %d.%d\n",
+ ArgusLog (LOG_ERR, "ArgusSllPacket (0x%x, 0x%x, 0x%x) libpcap timestamp out of range %d.%d",
user, h, p, ArgusGlobalTime.tv_sec, ArgusGlobalTime.tv_usec);
}
@@ -911,7 +911,7 @@
ArgusProcessPacket (ep, length, tvp);
#ifdef ARGUSDEBUG
- ArgusDebug (6, "ArgusSllPacket (0x%x, 0x%x, 0x%x) returning\n", user, h, p);
+ ArgusDebug (6, "ArgusSllPacket (0x%x, 0x%x, 0x%x) returning", user, h, p);
#endif
}
@@ -958,7 +958,7 @@
case ARGUSLIBPPKTFILE:
if ((pcap_read (ArgusPd[i], -1, ArgusCallBack, (u_char *) NULL)) < 0) {
#ifdef ARGUSDEBUG
- ArgusDebug (4, "ArgusGetPackets: pcap_read() returned %s\n", pcap_geterr(ArgusPd[i]));
+ ArgusDebug (4, "ArgusGetPackets: pcap_read() returned %s", pcap_geterr(ArgusPd[i]));
#endif
noerror = 0;
}
@@ -986,7 +986,7 @@
gettimeofday (tvp, NULL);
ArgusGlobalTime = *tvp;
if (ArgusGlobalTime.tv_sec < 0) {
- ArgusLog (LOG_ERR, "ArgusGetPackets () gettimeofday() timestamp out of range %d.%d\n",
+ ArgusLog (LOG_ERR, "ArgusGetPackets () gettimeofday() timestamp out of range %d.%d",
ArgusGlobalTime.tv_sec, ArgusGlobalTime.tv_usec);
}
@@ -997,7 +997,7 @@
FD_ZERO(&ArgusReadMask);
#ifdef ARGUSDEBUG
- ArgusDebug (4, "ArgusGetPackets: select() returned %s\n", strerror(errno));
+ ArgusDebug (4, "ArgusGetPackets: select() returned %s", strerror(errno));
#endif
if (errno == EINTR)
break;
@@ -1029,7 +1029,7 @@
gettimeofday (&ArgusEndTime, 0L);
#ifdef ARGUSDEBUG
- ArgusDebug (4, "ArgusGetPackets () returning\n");
+ ArgusDebug (4, "ArgusGetPackets () returning");
#endif
}
@@ -1066,7 +1066,7 @@
}
#ifdef ARGUSDEBUG
- ArgusDebug (3, "Argusbpf_dump (0x%x, %d) returning\n", p, option);
+ ArgusDebug (3, "Argusbpf_dump (0x%x, %d) returning", p, option);
#endif
}
@@ -1124,7 +1124,7 @@
ArgusReadingOffLine++;
} else
- ArgusLog(LOG_ERR, "ArgusOpenInputPacketFile(%s) error. %s\n", Argusrfile, strerror(errno));
+ ArgusLog(LOG_ERR, "ArgusOpenInputPacketFile(%s) error. %s", Argusrfile, strerror(errno));
} else
if ((ch = fgetc(ArgusPacketInput)) != EOF) {
ungetc(ch, ArgusPacketInput);
@@ -1144,19 +1144,19 @@
}
} else {
- snprintf (errbuf, PCAP_ERRBUF_SIZE - 1, "Unknown packet file format\n");
+ snprintf (errbuf, PCAP_ERRBUF_SIZE - 1, "Unknown packet file format");
}
} else {
- snprintf (errbuf, PCAP_ERRBUF_SIZE - 1, "Error reading %s. Read %d bytes\n", Argusrfile, rlen);
+ snprintf (errbuf, PCAP_ERRBUF_SIZE - 1, "Error reading %s. Read %d bytes", Argusrfile, rlen);
}
} else {
- snprintf (errbuf, PCAP_ERRBUF_SIZE - 1, "Error reading %s. Stream Empty\n", Argusrfile);
+ snprintf (errbuf, PCAP_ERRBUF_SIZE - 1, "Error reading %s. Stream Empty", Argusrfile);
}
}
}
#ifdef ARGUSDEBUG
- ArgusDebug (3, "ArgusOpenInputPacketFile(0x%x) returning 0x%x\n", errbuf, retn);
+ ArgusDebug (3, "ArgusOpenInputPacketFile(0x%x) returning 0x%x", errbuf, retn);
#endif
return (retn);
@@ -1189,7 +1189,7 @@
}
#ifdef ARGUSDEBUG
- ArgusDebug (6, "ArgusCopyArgv(0x%x) returning 0x%x\n", argv, buf);
+ ArgusDebug (6, "ArgusCopyArgv(0x%x) returning 0x%x", argv, buf);
#endif
return buf;
@@ -1210,7 +1210,7 @@
if ((fd = open(fname, O_RDONLY)) >= 0) {
if (fstat(fd, &buf) < 0) {
- snprintf (outbuf, 255, "%s: fstat('%s') failed.\n", ArgusProgramName, fname);
+ snprintf (outbuf, 255, "%s: fstat('%s') failed.", ArgusProgramName, fname);
perror (outbuf);
close(fd);
}
@@ -1233,7 +1233,7 @@
#ifdef ARGUSDEBUG
- ArgusDebug (3, "ArgusReadInfile(%s) returning 0x%x\n", fname, p);
+ ArgusDebug (3, "ArgusReadInfile(%s) returning 0x%x", fname, p);
#endif
return (p);
diff -rNu argus-2.0.6/VERSION argus-2.0.6.fixes.1/VERSION
--- argus-2.0.6/VERSION 2004-05-05 15:54:22.000000000 +0200
+++ argus-2.0.6.fixes.1/VERSION 2004-05-10 19:10:12.000000000 +0200
@@ -1 +1 @@
-2.0.6
+2.0.6.fixes.1

11
argus-2.0.6-libpcap.diff Normal file
View File

@ -0,0 +1,11 @@
--- common/gencode.c
+++ common/gencode.c
@@ -59,7 +59,7 @@
#include <stdlib.h>
#include <syslog.h>
-#include <net/bpf.h>
+#include <pcap-bpf.h>
#include <argus_out.h>
#include <argus_filter.h>

View File

@ -0,0 +1,10 @@
--- common/argus_filter.c
+++ common/argus_filter.c
@@ -4261,6 +4261,7 @@
protoid[0] = 0;
protoid[1] = 0;
protoid[2] = 0;
+ protoid[4] = 0;
for (i = 0; i < ARGUS_MAXEPROTODB; i++) {
if ((p = argus_eproto_db[i]) != NULL) {

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

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

216
argus.changes Normal file
View File

@ -0,0 +1,216 @@
-------------------------------------------------------------------
Fri Nov 10 12:18:59 CET 2006 - ro@suse.de
- fix manpage permissions
-------------------------------------------------------------------
Tue Apr 4 11:03:53 CEST 2006 - mmarek@suse.cz
- use RPM_OPT_FLAGS
-------------------------------------------------------------------
Wed Jan 25 21:34:21 CET 2006 - mls@suse.de
- converted neededforbuild to BuildRequires
-------------------------------------------------------------------
Tue Jan 3 14:16:15 CET 2006 - mmarek@suse.cz
- fixed uninitialized variable warning
[#137379] (uninitialized.patch)
-------------------------------------------------------------------
Thu Aug 19 14:03:56 CEST 2004 - postadal@suse.cz
- updated to version 2.0.6 (fixes 1)
- splitted in two new (sub)packages (argus-server, argus-client)
-------------------------------------------------------------------
Thu Mar 18 11:59:23 CET 2004 - postadal@suse.cz
- fixed permissions of man pages and documentation [#36325]
-------------------------------------------------------------------
Thu Feb 12 01:25:38 CET 2004 - ro@suse.de
- adapt to change in libpcap: include moved to pcap_bpf.h
-------------------------------------------------------------------
Sat Jan 10 21:25:02 CET 2004 - adrian@suse.de
- build as user
-------------------------------------------------------------------
Mon Aug 25 09:21:51 CEST 2003 - postadal@suse.cz
- modified init script
- added sysconfig metadata [#28836]
- use new stop_on_removal/restart_on_upate macros
-------------------------------------------------------------------
Mon Jun 2 15:33:58 CEST 2003 - ro@suse.de
- fixed rcargus symlink
-------------------------------------------------------------------
Fri Jan 03 14:14:28 CET 2003 - postadal@suse.cz
- added metadata in sysconfig template
-------------------------------------------------------------------
Wed Aug 21 14:35:56 CEST 2002 - ro@suse.de
- fix build on ppc64
-------------------------------------------------------------------
Fri Aug 16 13:17:06 CEST 2002 - postadal@suse.cz
- added %insserv_prereq and %fillup_prereq to PreReq [#17787]
-------------------------------------------------------------------
Tue Aug 6 19:55:24 CEST 2002 - adrian@suse.de
- remove tcpdump man page again
(fixes file conflict with tcpdump package)
-------------------------------------------------------------------
Tue Jul 30 12:21:48 CEST 2002 - postadal@suse.cz
- udate to version 2.0.5
* multithreaded, configuration files, syslog support, secure access
* record changes
* a lot of new features for server and client
-------------------------------------------------------------------
Wed Jul 24 10:57:44 CEST 2002 - kukuk@suse.de
- Replase rc.config with sysconfig/argus in README.SuSE
-------------------------------------------------------------------
Wed Jul 24 10:57:07 CEST 2002 - kukuk@suse.de
- Don't parse rc.config
-------------------------------------------------------------------
Mon Feb 25 16:44:50 CET 2002 - postadal@suse.cz
- modified copyright in /etc/init.d/argus
-------------------------------------------------------------------
Tue Jan 15 15:51:46 CET 2002 - egmont@suselinux.hu
- removed colons from startup/shutdown messages
-------------------------------------------------------------------
Mon Jan 14 08:47:40 CET 2002 - cihlar@suse.cz
- use %{_libdir}
-------------------------------------------------------------------
Thu Dec 13 01:43:20 CET 2001 - ro@suse.de
- moved rc.config.d -> sysconfig
-------------------------------------------------------------------
Tue Dec 11 15:46:05 CET 2001 - cihlar@suse.cz
- source /etc/rc.config.d/argus.rc.config in init script
- fixed to remove variables which are in
/etc/rc.config.d/argus.rc.config now from /etc/rc.config
-------------------------------------------------------------------
Mon Dec 10 09:58:22 CET 2001 - cihlar@suse.cz
- removed START_ARGUS
-------------------------------------------------------------------
Fri Nov 23 12:52:01 CET 2001 - cihlar@suse.cz
- Fixed Url
-------------------------------------------------------------------
Mon Aug 13 11:52:11 CEST 2001 - cihlar@suse.cz
- really removed whole files from patches
- fixed README.SuSE
-------------------------------------------------------------------
Thu Jul 26 07:40:48 CEST 2001 - cihlar@suse.cz
- removed tcpdump man page
-------------------------------------------------------------------
Tue Jul 24 14:40:45 CEST 2001 - cihlar@suse.cz
- fixed to compile on ia64
- fixed includes
- added BuildRoot
- use suse_update_config
- removed whole files from patches
- added Url
- bzipped sources
-------------------------------------------------------------------
Mon Jul 2 14:29:10 CEST 2001 - choeger@suse.de
- bugfix: init script was not LSB compliant, Bugzilla ID#8969
- update to version 1.8.1
-------------------------------------------------------------------
Fri Dec 1 01:59:07 CET 2000 - ro@suse.de
- use normal tcpd (wrapper-lib)
- fixed startscript
-------------------------------------------------------------------
Wed Mar 1 13:22:19 MET 2000 - choeger@suse.de
- added mandir
-------------------------------------------------------------------
Tue Feb 15 14:19:22 CET 2000 - aj@suse.de
- fix headers for sparc
-------------------------------------------------------------------
Thu Sep 16 12:08:30 CEST 1999 - uli@suse.de
- fixed headers for PPC
-------------------------------------------------------------------
Mon Sep 13 17:23:57 CEST 1999 - bs@suse.de
- ran old prepare_spec on spec file to switch to new prepare_spec.
-------------------------------------------------------------------
Mon Jul 12 01:47:14 MEST 1999 - ro@suse.de
- libpcap is an extra package now
-------------------------------------------------------------------
Thu Apr 22 02:14:35 MEST 1999 - ro@suse.de
- fixed for alpha (ip_hl like other little-endian)
-------------------------------------------------------------------
Wed Dec 9 15:38:19 MET 1998 - choeger@suse.de
- completed new init-script
-------------------------------------------------------------------
Mon Nov 23 16:55:50 MET 1998 - choeger@suse.de
- new version and new init-script
-------------------------------------------------------------------
Wed Oct 7 00:56:08 MEST 1998 - ro@suse.de
- dont redeclare sys_errlist or strcpy for glibc
- dont cast to a char* where you're not supposed to
-------------------------------------------------------------------
Mon May 4 10:57:49 MEST 1998 - choeger@suse.de
- new package 1.7.beta.1b

220
argus.spec Normal file
View File

@ -0,0 +1,220 @@
#
# spec file for package argus (Version 2.0.6)
#
# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
Name: argus
BuildRequires: libpcap tcpd-devel tcsh
License: BSD License and BSD-like, GNU Library General Public License v. 2.0 and 2.1 (LGPL)
Group: Productivity/Networking/Diagnostic
Autoreqprov: on
Summary: Network Monitoring Tool
Version: 2.0.6
Release: 32
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
Patch2: %{name}-%{version}-uninitialized.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%package server
PreReq: %insserv_prereq %fillup_prereq
Group: Productivity/Networking/Diagnostic
Summary: Daemon for Network Monitoring Tool
Requires: argus
Provides: argus:/usr/sbin/argus
Autoreqprov: on
%description
Argus is a network monitoring tool.
Documentation can be found in /usr/share/doc/packages/argus.
Authors:
--------
Carter Bullard <carter@qosient.com>
%description server
Daemon for Argus network monitoring tool.
Authors:
--------
Carter Bullard <argus@sei.cmu.edu>
%prep
%setup -n argus-%{version}
%patch -p1
%patch1
%patch2
cp %{S:3} .
cp %{S:4} man/man8/
%build
%{suse_update_config -f bin config }
autoreconf -fi
export CFLAGS="$RPM_OPT_FLAGS"
./configure --libdir=%{_libdir}
make
%install
rm -rf %{buildroot}
install -d -m 755 $RPM_BUILD_ROOT{/etc/init.d,/sbin,/usr/{sbin,bin,share/man},%{_docdir}}
install -m 700 bin/argus_linux $RPM_BUILD_ROOT/usr/sbin/argus
install -m 700 bin/arg* $RPM_BUILD_ROOT/usr/bin/
rm -f $RPM_BUILD_ROOT/usr/bin/argus_linux
( cd man
cp -a man* $RPM_BUILD_ROOT%{_mandir}
chmod a-x $RPM_BUILD_ROOT%{_mandir}/*/* )
rm -f $RPM_BUILD_ROOT%{_mandir}/man1/tcpdump.1*
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}
%clean
rm -rf %{buildroot}
%post server
%{fillup_and_insserv argus}
%preun server
%stop_on_removal argus
%postun server
%restart_on_update argus
%{insserv_cleanup}
%files
%defattr(-,root,root)
/usr/bin/argus*
%files server
%defattr(-,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
%changelog -n argus
* Fri Nov 10 2006 - ro@suse.de
- fix manpage permissions
* Tue Apr 04 2006 - mmarek@suse.cz
- use RPM_OPT_FLAGS
* Wed Jan 25 2006 - mls@suse.de
- converted neededforbuild to BuildRequires
* Tue Jan 03 2006 - mmarek@suse.cz
- fixed uninitialized variable warning
[#137379] (uninitialized.patch)
* Thu Aug 19 2004 - postadal@suse.cz
- updated to version 2.0.6 (fixes 1)
- splitted in two new (sub)packages (argus-server, argus-client)
* Thu Mar 18 2004 - postadal@suse.cz
- fixed permissions of man pages and documentation [#36325]
* Thu Feb 12 2004 - ro@suse.de
- adapt to change in libpcap: include moved to pcap_bpf.h
* Sat Jan 10 2004 - adrian@suse.de
- build as user
* Mon Aug 25 2003 - postadal@suse.cz
- modified init script
- added sysconfig metadata [#28836]
- use new stop_on_removal/restart_on_upate macros
* Mon Jun 02 2003 - ro@suse.de
- fixed rcargus symlink
* Fri Jan 03 2003 - postadal@suse.cz
- added metadata in sysconfig template
* Wed Aug 21 2002 - ro@suse.de
- fix build on ppc64
* Fri Aug 16 2002 - postadal@suse.cz
- added %%insserv_prereq and %%fillup_prereq to PreReq [#17787]
* Tue Aug 06 2002 - adrian@suse.de
- remove tcpdump man page again
(fixes file conflict with tcpdump package)
* Tue Jul 30 2002 - postadal@suse.cz
- udate to version 2.0.5
* multithreaded, configuration files, syslog support, secure access
* record changes
* a lot of new features for server and client
* Wed Jul 24 2002 - kukuk@suse.de
- Replase rc.config with sysconfig/argus in README.SuSE
* Wed Jul 24 2002 - kukuk@suse.de
- Don't parse rc.config
* Mon Feb 25 2002 - postadal@suse.cz
- modified copyright in /etc/init.d/argus
* Tue Jan 15 2002 - egmont@suselinux.hu
- removed colons from startup/shutdown messages
* Mon Jan 14 2002 - cihlar@suse.cz
- use %%{_libdir}
* Thu Dec 13 2001 - ro@suse.de
- moved rc.config.d -> sysconfig
* Tue Dec 11 2001 - cihlar@suse.cz
- source /etc/rc.config.d/argus.rc.config in init script
- fixed to remove variables which are in
/etc/rc.config.d/argus.rc.config now from /etc/rc.config
* Mon Dec 10 2001 - cihlar@suse.cz
- removed START_ARGUS
* Fri Nov 23 2001 - cihlar@suse.cz
- Fixed Url
* Mon Aug 13 2001 - cihlar@suse.cz
- really removed whole files from patches
- fixed README.SuSE
* Thu Jul 26 2001 - cihlar@suse.cz
- removed tcpdump man page
* Tue Jul 24 2001 - cihlar@suse.cz
- fixed to compile on ia64
- fixed includes
- added BuildRoot
- use suse_update_config
- removed whole files from patches
- added Url
- bzipped sources
* Mon Jul 02 2001 - choeger@suse.de
- bugfix: init script was not LSB compliant, Bugzilla ID#8969
- update to version 1.8.1
* Fri Dec 01 2000 - ro@suse.de
- use normal tcpd (wrapper-lib)
- fixed startscript
* Wed Mar 01 2000 - choeger@suse.de
- added mandir
* Tue Feb 15 2000 - aj@suse.de
- fix headers for sparc
* Thu Sep 16 1999 - uli@suse.de
- fixed headers for PPC
* Mon Sep 13 1999 - bs@suse.de
- ran old prepare_spec on spec file to switch to new prepare_spec.
* Mon Jul 12 1999 - ro@suse.de
- libpcap is an extra package now
* Thu Apr 22 1999 - ro@suse.de
- fixed for alpha (ip_hl like other little-endian)
* Wed Dec 09 1998 - choeger@suse.de
- completed new init-script
* Mon Nov 23 1998 - choeger@suse.de
- new version and new init-script
* Wed Oct 07 1998 - ro@suse.de
- dont redeclare sys_errlist or strcpy for glibc
- dont cast to a char* where you're not supposed to
* Mon May 04 1998 - choeger@suse.de
- new package 1.7.beta.1b

3
argus_linux.8.gz Normal file
View File

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

132
rc.argus Normal file
View File

@ -0,0 +1,132 @@
#! /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

0
ready Normal file
View File

18
sysconfig.argus Normal file
View File

@ -0,0 +1,18 @@
## 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"