rpms/argus/FC-4 argus-2.0.6.fixes.1-build.patch, 1.1, 1.2 argus-2.0.6.fixes.1-makefile.patch, 1.1, 1.2 argus.spec, 1.2, 1.3
Gabriel L. Somlo (somlo)
fedora-extras-commits at redhat.com
Fri Apr 21 19:23:11 UTC 2006
Author: somlo
Update of /cvs/extras/rpms/argus/FC-4
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv8635
Modified Files:
argus-2.0.6.fixes.1-build.patch
argus-2.0.6.fixes.1-makefile.patch argus.spec
Log Message:
daemon patches now eliminate unused common files: argus_parse.c, argus_util.c, and argus_auth.c
argus-2.0.6.fixes.1-build.patch:
View full diff with command:
/usr/bin/cvs -f diff -kk -u -N -r 1.1 -r 1.2 argus-2.0.6.fixes.1-build.patch
Index: argus-2.0.6.fixes.1-build.patch
===================================================================
RCS file: /cvs/extras/rpms/argus/FC-4/argus-2.0.6.fixes.1-build.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- argus-2.0.6.fixes.1-build.patch 17 Mar 2006 19:32:36 -0000 1.1
+++ argus-2.0.6.fixes.1-build.patch 21 Apr 2006 19:23:11 -0000 1.2
@@ -1,55 +1,6649 @@
+diff -NarU5 argus-2.0.6.fixes.1.orig/common/argus_auth.c argus-2.0.6.fixes.1/common/argus_auth.c
+--- argus-2.0.6.fixes.1.orig/common/argus_auth.c 2004-02-23 10:00:36.000000000 -0500
++++ argus-2.0.6.fixes.1/common/argus_auth.c 1969-12-31 19:00:00.000000000 -0500
+@@ -1,569 +0,0 @@
+-/*
+- * Copyright (c) 2000-2004 QoSient, LLC
+- * All rights reserved.
+- *
+- * This program is free software; you can redistribute it and/or modify
+- * it under the terms of the GNU General Public License as published by
+- * the Free Software Foundation; either version 2, or (at your option)
+- * any later version.
+-
+- * This program is distributed in the hope that it will be useful,
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- * GNU General Public License for more details.
+-
+- * You should have received a copy of the GNU General Public License
+- * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+- *
+- */
+-
+-/*
+- * Copyright (c) 2000 Carnegie Mellon University. All rights reserved.
+- *
+- * Redistribution and use in source and binary forms, with or without
+- * modification, are permitted provided that the following conditions
+- * are met:
+- *
+- * 1. Redistributions of source code must retain the above copyright
+- * notice, this list of conditions and the following disclaimer.
+- *
+- * 2. Redistributions in binary form must reproduce the above copyright
+- * notice, this list of conditions and the following disclaimer in
+- * the documentation and/or other materials provided with the
+- * distribution.
+- *
+- * 3. The name "Carnegie Mellon University" must not be used to
+- * endorse or promote products derived from this software without
+- * prior written permission. For permission or any other legal
+- * details, please contact
+- * Office of Technology Transfer
+- * Carnegie Mellon University
+- * 5000 Forbes Avenue
+- * Pittsburgh, PA 15213-3890
+- * (412) 268-4387, fax: (412) 268-7395
+- * tech-transfer at andrew.cmu.edu
+- *
+- * 4. Redistributions of any form whatsoever must retain the following
+- * acknowledgment:
+- * "This product includes software developed by Computing Services
+- * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+- *
+- * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+- * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+- * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+- * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+- * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+- * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+- */
+-
+-/*
+- * Modified by Carter Bullard
+- * QoSient, LLC
+- *
+- */
+-
+-
+-#ifndef ArgusAuth
+-#define ArgusAuth
+-#endif
+-
+-#include <stdlib.h>
+-#include <unistd.h>
+-
+-#include <errno.h>
+-#include <string.h>
+-
+-#ifdef ARGUS_SASL
+-
+-#include <ctype.h>
+-#include <assert.h>
+-#include <sasl.h>
+-
+-#endif /* ARGUS_SASL */
+-
+-#include <netinet/in.h>
+-#include <pcap.h>
+-
+-#include <compat.h>
+-#include <interface.h>
+-
+-#include <argus_parse.h>
+-#include <argus_util.h>
+-#include <argus_out.h>
+-#include <argus_filter.h>
+-
+-
+-extern void ArgusLog (int, char *, ...);
+-
+-int ArgusInitializeAuthentication (struct ARGUS_INPUT *);
+-int ArgusAuthenticate (struct ARGUS_INPUT *);
+-
+-#ifdef ARGUS_SASL
+-
+-static int RaGetRealm(void *context, int, const char **, const char **);
+-static int RaSimple(void *context, int, const char **, unsigned *);
+-static int RaGetSecret(sasl_conn_t *, void *context, int, sasl_secret_t **);
+-
+-int RaSaslNegotiate(FILE *, FILE *, sasl_conn_t *);
+-int RaGetSaslString (FILE *, char *, int);
+-int RaSendSaslString (FILE *, const char *, int);
+-
+-/* RaCallBacks we support */
+-
+-static sasl_callback_t RaCallBacks[] = {
+- { SASL_CB_GETREALM, &RaGetRealm, NULL },
+- { SASL_CB_USER, &RaSimple, NULL },
+- { SASL_CB_AUTHNAME, &RaSimple, NULL },
+- { SASL_CB_PASS, &RaGetSecret, NULL },
+- { SASL_CB_LIST_END, NULL, NULL }
+-};
+-
+-char *RaSaslMech = NULL;
+-
+-#endif
+-
+-
+-#if defined(HAVE_SOLARIS)
+-extern int getdomainname(char *name, size_t len);
+-#endif
+-
+-
+-int
+-ArgusInitializeAuthentication (struct ARGUS_INPUT *input)
+-{
+- int retn = 1;
+-
+-#ifdef ARGUS_SASL
+- struct sockaddr_in localaddr, remoteaddr;
+- int salen, fd = input->fd;
+- char *localhostname = NULL;
+-
+- if ((retn = sasl_client_init(RaCallBacks)) != SASL_OK)
+- ArgusLog (LOG_ERR, "ArgusInitializeAuthentication() sasl_client_init %d", retn);
+-
+- localhostname = ArgusCalloc (1, 1024);
+- gethostname(localhostname, 1024);
+- if (!strchr (localhostname, '.')) {
+- strcat (localhostname, ".");
+- getdomainname (&localhostname[strlen(localhostname)], 1024 - strlen(localhostname));
+- }
+-
+- if ((retn = sasl_client_new("argus", localhostname, NULL, SASL_SECURITY_LAYER, &input->sasl_conn)) != SASL_OK)
+- ArgusLog (LOG_ERR, "ArgusInitializeAuthentication() sasl_client_new %d", retn);
+-
+- /* set external properties here
+- sasl_setprop(input->sasl_conn, SASL_SSF_EXTERNAL, &extprops); */
+-
+- /* set required security properties here
+- sasl_setprop(input->sasl_conn, SASL_SEC_PROPS, &secprops); */
+-
+- /* set ip addresses */
+- salen = sizeof(localaddr);
+- if (getsockname(fd, (struct sockaddr *)&localaddr, &salen) < 0)
+- perror("getsockname");
+-
+- salen = sizeof(remoteaddr);
+- if (getpeername(fd, (struct sockaddr *)&remoteaddr, &salen) < 0)
+- perror("getpeername");
+-
+- if ((retn = sasl_setprop(input->sasl_conn, SASL_IP_LOCAL, &localaddr)) != SASL_OK)
+- ArgusLog (LOG_ERR, "ArgusInitializeAuthentication() error setting localaddr %d", retn);
+-
+- if ((retn = sasl_setprop(input->sasl_conn, SASL_IP_REMOTE, &remoteaddr)) != SASL_OK)
+- ArgusLog (LOG_ERR, "ArgusInitializeAuthentication() error setting remoteaddr %d", retn);
+-
+- retn = 1;
+-#endif
+-
+-#ifdef ARGUSDEBUG
+- ArgusDebug (2, "ArgusInitializeAuthentication () returning %d\n", retn);
+-#endif
+-
+- return (retn);
+-}
+-
+-
[...6308 lines suppressed...]
+- bzero (indStr, 16);
+- bzero (date, 128);
+-
+- flow = &argus->argus_far.flow;
+-
+- sprintf (srcString, "%17.17s", etheraddr_string((unsigned char *)&flow->mac_flow.ehdr.ether_shost));
+- sprintf (dstString, "%17.17s", etheraddr_string((unsigned char *)&flow->mac_flow.ehdr.ether_dhost));
+-
+- src_count = argus->argus_far.src.count;
+- dst_count = argus->argus_far.dst.count;
+-
+- if (Aflag) {
+- src_bytes = argus->argus_far.src.appbytes;
+- dst_bytes = argus->argus_far.dst.appbytes;
+- } else {
+- src_bytes = argus->argus_far.src.bytes;
+- dst_bytes = argus->argus_far.dst.bytes;
+- }
+-
+- print_date (argus, date);
+-
+- if (idflag) {
+- if (ArgusInput->ArgusManStart.ahdr.status & ARGUS_ID_IS_IPADDR)
+- argusIDStr = strdup (ipaddr_string (&argus->ahdr.argusid));
+- else
+- sprintf (argusIDStr, "%u", argus->ahdr.argusid);
+-
+- sprintf(argus_strbuf, "%-15.15s ", argusIDStr);
+- }
+-
+- if (mflag) {
+- if (ArgusThisFarStatus & ARGUS_MAC_DSR_STATUS) {
+- struct ArgusMacStruct *mac = (struct ArgusMacStruct *) ArgusThisFarHdrs[ARGUS_MAC_DSR_INDEX];
+-
+- esrcString = etheraddr_string ((u_char *)&mac->phys_union.ether.ethersrc);
+- edstString = etheraddr_string ((u_char *)&mac->phys_union.ether.etherdst);
+-
+- sprintf (srcString, "%17.17s %17.17s %*.*s",
+- esrcString, edstString, hfield + 2, hfield + 2,
+- etheraddr_string((unsigned char *)&flow->mac_flow.ehdr.ether_shost));
+- } else
+- sprintf (srcString, "%17.17s %17.17s %*.*s",
+- blankStr, blankStr, hfield + 2, hfield + 2,
+- etheraddr_string((unsigned char *)&flow->mac_flow.ehdr.ether_shost));
+- }
+-
+- if (Iflag)
+- strcpy (fmtstr, "%s%s%4s %s - %22.22s ");
+- else
+- strcpy (fmtstr, "%s %4s %s - %22.22s ");
+-
+- if (cflag)
+- strcat (fmtstr, "%-8u %-8u %-12u %-12u");
+-
+- if ((argus->ahdr.cause & ARGUS_TIMEOUT))
+- strcat (fmtstr, "TIM");
+- else
+- if (argus->argus_far.src.count && argus->argus_far.dst.count) {
+- if ((argus->argus_far.src.count == 1) && (argus->argus_far.dst.count == 1))
+- strcat (fmtstr, "ACC");
+- else
+- strcat (fmtstr, "CON");
+- } else
+- if (argus->ahdr.type & ARGUS_START)
+- strcat (fmtstr, "INT");
+-
+- proto = argus->ahdr.status & 0xFFFF;
+-
+- sprintf (protoStr, "%s", etherproto_string(proto));
+-
+- if (src_count)
+- fmtstr[12 + vc] = '>';
+- if (dst_count)
+- fmtstr[10 + vc] = '<';
+-
+-
+- if ((RaFieldDelimiter != ' ') && (RaFieldDelimiter != '\0'))
+- delim = RaFieldDelimiter;
+- else {
+- if (proto == 0) {
+- delim = '.';
+- } else {
+- delim = ' ';
+- }
+- }
+-
+- if (proto == 0) {
+- sprintf (sportbuf, "%c%-4.4s", delim, llcsap_string((unsigned char) flow->mac_flow.ssap));
+- sprintf (dportbuf, "%c%-4.4s", delim, llcsap_string((unsigned char) flow->mac_flow.dsap));
+- } else {
+- sprintf (sportbuf, "%c ", delim);
+- sprintf (dportbuf, "%c ", delim);
+-
+- if (dst_count) {
+- if ((RaFieldDelimiter != ' ') && (RaFieldDelimiter != '\0'))
+- fmtstr[9 + vc] = RaFieldDelimiter;
+- } else
+- if ((RaFieldDelimiter != ' ') && (RaFieldDelimiter != '\0'))
+- fmtstr[10 + vc] = RaFieldDelimiter;
+-
+- if ((RaFieldDelimiter != ' ') && (RaFieldDelimiter != '\0')) {
+- fmtstr[22 + vc] = RaFieldDelimiter;
+- }
+- }
+-
+- strcat (srcString, sportbuf);
+- strcat (dstString, dportbuf);
+-
+- if ((strlen(protoStr) > 4) && !((RaFieldDelimiter != ' ') && (RaFieldDelimiter != '\0')))
+- protoStr[4] = '\0';
+-
+- ArgusGetIndicatorString (argus, indStr);
+-
+- if (Iflag) {
+- if (cflag)
+- sprintf (&argus_strbuf[strlen(argus_strbuf)], fmtstr, date, indStr, protoStr,
+- srcString, dstString,
+- src_count, dst_count,
+- src_bytes, dst_bytes);
+- else
+- sprintf (&argus_strbuf[strlen(argus_strbuf)], fmtstr, date, indStr, protoStr,
+- srcString, dstString);
+- } else {
+- if (cflag)
+- sprintf (&argus_strbuf[strlen(argus_strbuf)], fmtstr, date, protoStr,
+- srcString, dstString,
+- src_count, dst_count,
+- src_bytes, dst_bytes);
+- else
+- sprintf (&argus_strbuf[strlen(argus_strbuf)], fmtstr, date, protoStr,
+- srcString, dstString);
+- }
+-
+- if ((RaFieldDelimiter != ' ') && (RaFieldDelimiter != '\0')) {
+- char tmpbuf[128], *ptr = tmpbuf, *str = argus_strbuf, lastchr = ' ';
+- int len = strlen(date) - 1;
+- bzero (tmpbuf, sizeof(tmpbuf));
+-
+- bcopy (str, ptr, len);
+- str += len;
+- ptr += len;
+-
+- while (*str) {
+- if (*str == ' ') {
+- if (lastchr != RaFieldDelimiter)
+- *ptr++ = RaFieldDelimiter;
+- while (isspace((int)*str)) str++;
+- }
+- lastchr = *str;
+-
+- *ptr++ = *str++;
+- }
+- bzero (argus_strbuf, MAXSTRLEN);
+- bcopy (tmpbuf, argus_strbuf, strlen(tmpbuf));
+- }
+-
+- return (argus_strbuf);
+-}
+-
+-
+-
+-#ifdef NOVFPRINTF
+-/*
+- * Stock 4.3 doesn't have vfprintf.
+- * This routine is due to Chris Torek.
+- */
+-vfprintf(f, fmt, args)
+- FILE *f;
+- char *fmt;
+- va_list args;
+-{
+- int ret;
+-
+- if ((f->_flag & _IOWRT) == 0) {
+- if (f->_flag & _IORW)
+- f->_flag |= _IOWRT;
+- else
+- return EOF;
+- }
+- ret = _doprnt(fmt, args, f);
+- return ferror(f) ? EOF : ret;
+-}
+-#endif
+-
diff -NarU5 argus-2.0.6.fixes.1.orig/common/gencode.c argus-2.0.6.fixes.1/common/gencode.c
--- argus-2.0.6.fixes.1.orig/common/gencode.c 2004-02-23 10:00:36.000000000 -0500
-+++ argus-2.0.6.fixes.1/common/gencode.c 2006-02-24 11:54:41.000000000 -0500
++++ argus-2.0.6.fixes.1/common/gencode.c 2006-04-21 14:57:52.000000000 -0400
@@ -57,11 +57,11 @@
#include <setjmp.h>
#include <stdarg.h>
@@ -65,7 +6659,7 @@
#include <ethertype.h>
diff -NarU5 argus-2.0.6.fixes.1.orig/server/ArgusOutput.c argus-2.0.6.fixes.1/server/ArgusOutput.c
--- argus-2.0.6.fixes.1.orig/server/ArgusOutput.c 2004-02-23 10:00:36.000000000 -0500
-+++ argus-2.0.6.fixes.1/server/ArgusOutput.c 2006-02-24 11:54:41.000000000 -0500
++++ argus-2.0.6.fixes.1/server/ArgusOutput.c 2006-04-21 14:57:52.000000000 -0400
@@ -1196,11 +1196,11 @@
void
ArgusCheckClientStatus ()
argus-2.0.6.fixes.1-makefile.patch:
Index: argus-2.0.6.fixes.1-makefile.patch
===================================================================
RCS file: /cvs/extras/rpms/argus/FC-4/argus-2.0.6.fixes.1-makefile.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- argus-2.0.6.fixes.1-makefile.patch 17 Mar 2006 19:32:36 -0000 1.1
+++ argus-2.0.6.fixes.1-makefile.patch 21 Apr 2006 19:23:11 -0000 1.2
@@ -1,7 +1,45 @@
diff -NarU5 argus-2.0.6.fixes.1.orig/common/Makefile.in argus-2.0.6.fixes.1/common/Makefile.in
--- argus-2.0.6.fixes.1.orig/common/Makefile.in 2004-02-23 10:00:36.000000000 -0500
-+++ argus-2.0.6.fixes.1/common/Makefile.in 2006-03-15 11:08:37.000000000 -0500
-@@ -144,18 +144,18 @@
++++ argus-2.0.6.fixes.1/common/Makefile.in 2006-04-21 15:03:33.000000000 -0400
+@@ -98,34 +98,28 @@
+
+ TAGHDR = bpf/net/bpf.h
+
+ TAGFILES = $(SRC) $(HDR) $(TAGHDR)
+
+-LIBS = @INSTALL_LIB@/argus_parse.a @INSTALL_LIB@/argus_common.a
++LIBS = @INSTALL_LIB@/argus_common.a
+
+-OBJ = $(COMMONOBJ) $(PARSEOBJ)
++OBJ = $(COMMONOBJ)
+ CLEANFILES = $(LIBS) $(OBJ) $(GENSRC) $(GENHDR) lex.yy.c
+
+
+ COMMONSRC = gencode.c argus_filter.c $(GENSRC)
+ COMMONOBJ = gencode.o argus_filter.o scanner.o grammar.o version.o
+
+-PARSESRC = argus_parse.c argus_util.c argus_auth.c
+-PARSEOBJ = argus_parse.o argus_util.o argus_auth.o
+
+-SRC = $(COMMONSRC) $(PARSESRC)
++SRC = $(COMMONSRC)
+
+ all: $(LIBS)
+
+ @INSTALL_LIB@/argus_common.a: $(COMMONOBJ)
+ rm -f $@; ar qc $@ $(COMMONOBJ)
+ -$(RANLIB) $@
+
+- at INSTALL_LIB@/argus_parse.a: $(PARSEOBJ)
+- rm -f $@; ar qc $@ $(PARSEOBJ)
+- -$(RANLIB) $@
+-
+ scanner.c: scanner.l
+ @rm -f $@
+ $(LEX) -t $< > $$$$.$@; mv $$$$.$@ $@
+
+ scanner.o: scanner.c tokdefs.h
+@@ -144,18 +138,16 @@
version.c: $(srcdir)/../VERSION
@rm -f $@
sed -e 's/.*/char version[] = "&";/' $(srcdir)/../VERSION > $@
@@ -15,12 +53,10 @@
- $(INSTALL) $(srcdir)/../lib/argus_common.a $(LIBDEST)/argus_common.a
- $(INSTALL) $(srcdir)/../lib/argus_parse.a $(LIBDEST)/argus_parse.a
+ $(INSTALL) $(srcdir)/../lib/argus_common.a $(DESTDIR)/$(LIBDEST)/argus_common.a
-+ $(INSTALL) $(srcdir)/../lib/argus_parse.a $(DESTDIR)/$(LIBDEST)/argus_parse.a
- $(RANLIB) $(LIBDEST)/argus_common.a
- $(RANLIB) $(LIBDEST)/argus_parse.a
+ $(RANLIB) $(DESTDIR)/$(LIBDEST)/argus_common.a
-+ $(RANLIB) $(DESTDIR)/$(LIBDEST)/argus_parse.a
clean:
rm -f $(CLEANFILES)
@@ -28,7 +64,7 @@
distclean:
diff -NarU5 argus-2.0.6.fixes.1.orig/Makefile.in argus-2.0.6.fixes.1/Makefile.in
--- argus-2.0.6.fixes.1.orig/Makefile.in 2004-04-13 01:32:58.000000000 -0400
-+++ argus-2.0.6.fixes.1/Makefile.in 2006-03-15 11:08:37.000000000 -0500
++++ argus-2.0.6.fixes.1/Makefile.in 2006-04-21 15:01:16.000000000 -0400
@@ -29,14 +29,14 @@
LIBS = @LIBS@
@@ -189,7 +225,7 @@
config.status: configure
diff -NarU5 argus-2.0.6.fixes.1.orig/server/Makefile.in argus-2.0.6.fixes.1/server/Makefile.in
--- argus-2.0.6.fixes.1.orig/server/Makefile.in 2004-02-23 10:00:36.000000000 -0500
-+++ argus-2.0.6.fixes.1/server/Makefile.in 2006-03-15 11:09:04.000000000 -0500
++++ argus-2.0.6.fixes.1/server/Makefile.in 2006-04-21 15:01:16.000000000 -0400
@@ -41,11 +41,11 @@
#
# Various configurable paths (remember to edit Makefile.in, not Makefile)
Index: argus.spec
===================================================================
RCS file: /cvs/extras/rpms/argus/FC-4/argus.spec,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- argus.spec 20 Mar 2006 18:38:44 -0000 1.2
+++ argus.spec 21 Apr 2006 19:23:11 -0000 1.3
@@ -1,6 +1,6 @@
Name: argus
Version: 2.0.6.fixes.1
-Release: 8%{?dist}
+Release: 9%{?dist}
Summary: Network transaction audit tool
License: GPL
Group: Applications/Internet
@@ -123,6 +123,9 @@
%{_mandir}/man5/ra*
%changelog
+* Fri Apr 21 2006 Gabriel Somlo <somlo at cmu.edu> 2.0.6.fixes.1-9
+- daemon patches now eliminate unused common files: argus_parse.c, argus_util.c, and argus_auth.c
+
* Mon Mar 20 2006 Gabriel Somlo <somlo at cmu.edu> 2.0.6.fixes.1-8
- added ncurses-devel build requirement
More information about the fedora-extras-commits
mailing list