[packages/idsa] - quite old package, included mainly for reference

qboosh qboosh at pld-linux.org
Thu Apr 10 22:03:57 CEST 2014


commit d7c1e495e155504c02afca938992d305972c5f7b
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Thu Apr 10 22:05:37 2014 +0200

    - quite old package, included mainly for reference

 idsa-destdir.patch | 202 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 idsa-gcc.patch     |  44 ++++++++++++
 idsa-guile.patch   | 109 +++++++++++++++++++++++++++++
 idsa.spec          | 200 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 555 insertions(+)
---
diff --git a/idsa.spec b/idsa.spec
new file mode 100644
index 0000000..ef470e6
--- /dev/null
+++ b/idsa.spec
@@ -0,0 +1,200 @@
+# NOTE: no longer maintained
+Summary:	IDS/A - reference monitor, logger and intrusion detection system
+Summary(pl.UTF-8):	ISA/a - monitor odwołań, logger i system wykrywania intruzów
+Name:		idsa
+Version:	0.93.1
+Release:	0.1
+License:	GPL v2
+Group:		Applications/System
+# originally http://jade.cs.uct.ac.za/idsa/download/, but no longer existing
+Source0:	http://old-releases.ubuntu.com/ubuntu/pool/universe/i/idsa/%{name}_%{version}.orig.tar.gz
+# Source0-md5:	9039c703020b844e0f3b35466c8d8035
+Patch0:		%{name}-guile.patch
+Patch1:		%{name}-gcc.patch
+Patch2:		%{name}-destdir.patch
+URL:		http://jade.cs.uct.ac.za/idsa/
+BuildRequires:	apache1-devel >= 1.3
+BuildRequires:	gtk+-devel >= 1.2
+BuildRequires:	guile-devel >= 2
+BuildRequires:	ncurses-devel
+BuildRequires:	pam-devel
+Requires:	%{name}-libs = %{version}-%{release}
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+IDS/A is a combined system logger, reference monitor, and intrusion
+detection system for applications. It makes it possible not only to
+monitor but also adjust application activity. Features include a
+powerful logging component and an extensible and modular access
+control subsystem which can driven by misuse signatures, anomaly
+detection modules, or even a human operator.
+
+%description -l pl.UTF-8
+IDS/A to połączenie loggera systemowego, monitora odwołań oraz systemu
+wykrywania intruzów dla aplikacji. Umożliwia nie tylko monitorowanie,
+ale także modyfikowanie aktywności aplikacji. Właściwości obejmują
+potężny komponent logujący oraz rozszerzalny i modularny podsystem
+kontroli dostępu, który może być sterowany przez sygnatury nadużyć,
+moduły wykrywania anomalii, a nawet człowieka nadzorującego.
+
+%package libs
+Summary:	IDS/A shared library
+Summary(pl.UTF-8):	Biblioteka współdzielona IDS/A
+Group:		Libraries
+
+%description libs
+IDS/A shared library.
+
+%description libs -l pl.UTF-8
+Biblioteka współdzielona IDS/A.
+
+%package devel
+Summary:	Header files for IDS/A library
+Summary(pl.UTF-8):	Pliki nagłówkowe biblioteki IDS/A
+Group:		Development/Libraries
+Requires:	%{name}-libs = %{version}-%{release}
+
+%description devel
+Header files for IDS/A library.
+
+%description devel -l pl.UTF-8
+Pliki nagłówkowe biblioteki IDS/A.
+
+%package guile
+Summary:	Guile module for IDS/A
+Summary(pl.UTF-8):	Moduł Guile dla IDS/A
+Group:		Applications/System
+Requires:	%{name} = %{version}-%{release}
+
+%description guile
+Guile module for IDS/A allows you to write Scheme programs to allow
+or deny an incoming event, as well as correlate related events.
+
+%description guile -l pl.UTF-8
+Moduł Guile dla IDS/A pozwala na pisanie programów w języku Scheme
+decydujących o zezwoleniu lub odrzuceniu przychodzącego zdarzenia, a
+także kojarzeniu powiązanych zdarzeń.
+
+%package gtk
+Summary:	Interactive access control with GTK+ GUI for IDS/A
+Summary(pl.UTF-8):	Interaktywna kontrola dostępu dla IDS/A przy użyciu GUI GTK+
+Group:		X11/Applications
+Requires:	%{name} = %{version}-%{release}
+
+%description gtk
+This GTK+ program allows you to make interactive access control
+decisions for IDS/A. A console version with the same functionality is
+included in the main idsa package.
+
+%description gtk -l pl.UTF-8
+Ten program GTK+ pozwala interaktywnie podejmować decyzje dotyczące
+kontroli dostępu dla IDS/A. Konsolowa wersja o tej samej
+funkcjonalności jest dołączona do głównego pakietu idsa.
+
+%package -n apache1-mod_idsa
+Summary:	IDS/A module for Apache 1.x
+Summary(pl.UTF-8):	Moduł IDS/A dla Apache'a 1.x
+Group:		Applications/Networking
+Requires:	%{name} = %{version}-%{release}
+
+%description -n apache1-mod_idsa
+IDS/A Apache module makes it possible for idsad to make access control
+decisions for Apache requests.
+
+%description -n apache1-mod_idsa -l pl.UTF-8
+Moduł IDS/A dla Apache'a pozwala demonowi idsad podejmowąć decyzje
+dotyczące kontroli dostępu dla żądań Apache'a.
+
+%prep
+%setup -q -n %{name}-%{version}.orig
+%patch0 -p1
+%patch1 -p1
+%patch2 -p1
+
+%build
+%configure2_13 \
+	--with-apxs=/usr/sbin/apxs1 \
+	--with-pamdir=/%{_lib}/security
+%{__make}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%{__make} install \
+	DESTDIR=$RPM_BUILD_ROOT
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post	libs -p /sbin/ldconfig
+%postun	libs -p /sbin/ldconfig
+
+%files
+%defattr(644,root,root,755)
+%doc README doc/{BLURB,CREDITS,TODO,WARNING}
+%attr(755,root,root) %{_bindir}/idsalog
+%attr(755,root,root) %{_bindir}/idsaguardtty
+%attr(755,root,root) %{_bindir}/idsascaffold
+%attr(755,root,root) %{_bindir}/idsasocket
+%attr(755,root,root) %{_bindir}/idsaxmlheader
+%attr(755,root,root) %{_sbindir}/idsad
+%attr(755,root,root) %{_sbindir}/idsaexec
+%attr(755,root,root) %{_sbindir}/idsaklogd
+%attr(755,root,root) %{_sbindir}/idsapid
+%attr(755,root,root) %{_sbindir}/idsapipe
+%attr(755,root,root) %{_sbindir}/idsarlogd
+%attr(755,root,root) %{_sbindir}/idsasyslogd
+%attr(755,root,root) %{_sbindir}/idsatcpd
+%attr(755,root,root) %{_sbindir}/idsatcplogd
+%attr(755,root,root) /%{_lib}/security/pam_idsa.so
+%attr(755,root,root) %{_libdir}/snoopy.so
+%dir %{_libdir}/idsa
+%attr(755,root,root) %{_libdir}/idsa/mod_*.so
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/idsad.conf
+%{_mandir}/man5/idsad.conf.5*
+%{_mandir}/man8/idsad.8*
+%{_mandir}/man8/idsaexec.8*
+%{_mandir}/man8/idsaguardtty.8*
+%{_mandir}/man8/idsaklogd.8*
+%{_mandir}/man8/idsalog.8*
+%{_mandir}/man8/idsapid.8*
+%{_mandir}/man8/idsapipe.8*
+%{_mandir}/man8/idsarlogd.8*
+%{_mandir}/man8/idsasyslogd.8*
+%{_mandir}/man8/idsatcpd.8*
+%{_mandir}/man8/idsatcplogd.8*
+%{_mandir}/man8/mod_counter.8*
+%{_mandir}/man8/mod_interactive.8*
+%{_mandir}/man8/mod_keep.8*
+%{_mandir}/man8/mod_log.8*
+%{_mandir}/man8/mod_regex.8*
+%{_mandir}/man8/mod_time.8*
+%{_mandir}/man8/mod_timer.8*
+%{_mandir}/man8/mod_true.8*
+
+%files libs
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libidsa.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libidsa.so.2
+
+%files devel
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libidsa.so
+%{_includedir}/idsa.h
+%{_includedir}/idsa_internal.h
+%{_mandir}/man3/idsa_*.3*
+
+%files guile
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_sbindir}/idsaguile
+%{_datadir}/idsa
+%{_mandir}/man8/idsaguile.8*
+
+%files gtk
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_bindir}/idsaguardgtk
+%{_mandir}/man8/idsaguardgtk.8*
+
+%files -n apache1-mod_idsa
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/apache1/mod_idsa.so
diff --git a/idsa-destdir.patch b/idsa-destdir.patch
new file mode 100644
index 0000000..53e182b
--- /dev/null
+++ b/idsa-destdir.patch
@@ -0,0 +1,202 @@
+--- idsa-0.93.1.orig/doc/Makefile.orig	2002-05-01 16:54:56.000000000 +0200
++++ idsa-0.93.1.orig/doc/Makefile	2014-04-09 20:51:54.603396999 +0200
+@@ -18,10 +18,10 @@ endif
+ all: 
+ 
+ install: 
+-	@$(INSTALL) -d $(MANDIR)/{man3,man5,man8}
+-	@$(INSTALL) -m 644 $(MAN3) $(MANDIR)/man3
+-	@$(INSTALL) -m 644 $(MAN5) $(MANDIR)/man5
+-	@$(INSTALL) -m 644 $(MAN8) $(MANDIR)/man8
++	@$(INSTALL) -d $(DESTDIR)$(MANDIR)/{man3,man5,man8}
++	@$(INSTALL) -m 644 $(MAN3) $(DESTDIR)$(MANDIR)/man3
++	@$(INSTALL) -m 644 $(MAN5) $(DESTDIR)$(MANDIR)/man5
++	@$(INSTALL) -m 644 $(MAN8) $(DESTDIR)$(MANDIR)/man8
+ 
+ checkpoint: indent clean
+ 	$(CI) -l $(DOCS) $(MAN3) $(MAN5) $(MAN8) 
+--- idsa-0.93.1.orig/etc/Makefile.orig	2002-03-27 11:46:34.000000000 +0100
++++ idsa-0.93.1.orig/etc/Makefile	2014-04-09 20:52:34.200062844 +0200
+@@ -15,7 +15,7 @@ all: $(CONFIGFILES)
+ 	if [ -x $< ] ; then $(CHMOD) +x $@ ; fi
+ 
+ install: all
+-	@if [ ! -e $(SYSCONFDIR)/idsad.conf ] ; then $(INSTALL) -d $(SYSCONFDIR) ; $(INSTALL) -m 0600 idsad.conf $(SYSCONFDIR) ; $(INSTALL) -d -m 0700 $(LOCALSTATEDIR)/log/idsa; else $(WARN) "Existing $(SYSCONFDIR)/idsad.conf not modified" ; fi
++	@if [ ! -e $(DESTDIR)$(SYSCONFDIR)/idsad.conf ] ; then $(INSTALL) -d $(DESTDIR)$(SYSCONFDIR) ; $(INSTALL) -m 0600 idsad.conf $(DESTDIR)$(SYSCONFDIR) ; $(INSTALL) -d -m 0700 $(DESTDIR)$(LOCALSTATEDIR)/log/idsa; else $(WARN) "Existing $(DESTDIR)$(SYSCONFDIR)/idsad.conf not modified" ; fi
+ 
+ checkpoint: indent clean
+ 	$(CI) -l *.in
+--- idsa-0.93.1.orig/guard/Makefile.orig	2002-04-17 15:29:25.000000000 +0200
++++ idsa-0.93.1.orig/guard/Makefile	2014-04-09 20:52:55.066729073 +0200
+@@ -26,8 +26,8 @@ endif
+ all: $(TARGET)
+ 
+ install: all
+-	@$(INSTALL) -d $(BINDIR)
+-	@$(INSTALL) -m 0755 $(TARGET) $(BINDIR)
++	@$(INSTALL) -d $(DESTDIR)$(BINDIR)
++	@$(INSTALL) -m 0755 $(TARGET) $(DESTDIR)$(BINDIR)
+ 
+ 
+ $(GUARDTTY): $(GUARDTTY).c
+--- idsa-0.93.1.orig/guile/Makefile.orig	2002-03-03 22:34:19.000000000 +0100
++++ idsa-0.93.1.orig/guile/Makefile	2014-04-09 20:53:13.800062017 +0200
+@@ -11,9 +11,9 @@ LIB     = -L../lib -L../common -lidsacom
+ ifneq ($(GUILECONFIG),no)
+ all: $(IDSAGUILE)
+ install: all
+-	@$(INSTALL) -m 755 $(IDSAGUILE) $(SBINDIR)
+-	@$(INSTALL) -m 755 -d $(DATADIR)/idsa
+-	@$(INSTALL) -m 644 *.scm $(DATADIR)/idsa
++	@$(INSTALL) -m 755 $(IDSAGUILE) $(DESTDIR)$(SBINDIR)
++	@$(INSTALL) -m 755 -d $(DESTDIR)$(DATADIR)/idsa
++	@$(INSTALL) -m 644 *.scm $(DESTDIR)$(DATADIR)/idsa
+ else
+ all:
+ install:
+--- idsa-0.93.1.orig/include/Makefile.orig	2001-01-20 21:52:56.000000000 +0100
++++ idsa-0.93.1.orig/include/Makefile	2014-04-09 20:53:24.930061787 +0200
+@@ -5,8 +5,8 @@ INCLUDES = idsa.h idsa_internal.h
+ all:
+ 
+ install:
+-	@$(INSTALL) -d $(INCLUDEDIR)
+-	@$(INSTALL) -m 0644 $(INCLUDES) $(INCLUDEDIR)
++	@$(INSTALL) -d $(DESTDIR)$(INCLUDEDIR)
++	@$(INSTALL) -m 0644 $(INCLUDES) $(DESTDIR)$(INCLUDEDIR)
+ 
+ checkpoint: indent clean
+ 	$(CI) -l $(INCLUDES)
+--- idsa-0.93.1.orig/lib/Makefile.orig	2002-06-19 01:25:43.000000000 +0200
++++ idsa-0.93.1.orig/lib/Makefile	2014-04-09 20:58:16.523389041 +0200
+@@ -27,13 +27,13 @@ INCLUDE      = -I../include
+ all: $(LIBNAMEMINOR)
+ 
+ install: all
+-	@$(INSTALL) -d -m 0755 $(LIBDIR)
+-	@$(INSTALL) -m 0755 $(LIBNAMEMINOR) $(LIBDIR)
+-	-$(RM) $(LIBDIR)/$(LIBNAMEMAJOR) $(LIBDIR)/$(LIBNAME)
+-	(cd $(LIBDIR) ; $(LN) $(LIBNAMEMINOR) $(LIBNAMEMAJOR))
+-	(cd $(LIBDIR) ; $(LN) $(LIBNAMEMINOR) $(LIBNAME))
++	@$(INSTALL) -d -m 0755 $(DESTDIR)$(LIBDIR)
++	@$(INSTALL) -m 0755 $(LIBNAMEMINOR) $(DESTDIR)$(LIBDIR)
++	-$(RM) $(DESTDIR)$(LIBDIR)/$(LIBNAMEMAJOR) $(DESTDIR)$(LIBDIR)/$(LIBNAME)
++	(cd $(DESTDIR)$(LIBDIR) ; $(LN) $(LIBNAMEMINOR) $(LIBNAMEMAJOR))
++	(cd $(DESTDIR)$(LIBDIR) ; $(LN) $(LIBNAMEMINOR) $(LIBNAME))
+ 	@if ! $(GREP) -q $(LIBDIR) $(LDSOCONF) ; then $(WARN) "You might have to add $(LIBDIR) to $(LDSOCONF)" ; fi
+-	$(LDCONFIG)
++	-$(LDCONFIG)
+ 	@$(WARN) "You might have to run $(LDCONFIG) to update the cache"
+ 
+ $(LIBNAMEMINOR): $(LIBOBJ)
+--- idsa-0.93.1.orig/modules/Makefile.orig	2002-06-19 01:54:41.000000000 +0200
++++ idsa-0.93.1.orig/modules/Makefile	2014-04-09 20:58:53.046721613 +0200
+@@ -19,8 +19,8 @@ LIB     = -L../lib -lidsa
+ ifneq ($(IDSAMODULES),no)
+ all: $(MODULES)
+ install: all
+-	@$(INSTALL) -m 755 -d $(IDSAMODULES)
+-	@$(INSTALL) -m 755 $(MODULES) $(IDSAMODULES)
++	@$(INSTALL) -m 755 -d $(DESTDIR)$(IDSAMODULES)
++	@$(INSTALL) -m 755 $(MODULES) $(DESTDIR)$(IDSAMODULES)
+ else
+ all:
+ install:
+--- idsa-0.93.1.orig/pam/Makefile.orig	2002-03-17 21:57:16.000000000 +0100
++++ idsa-0.93.1.orig/pam/Makefile	2014-04-09 21:14:34.046701999 +0200
+@@ -13,7 +13,8 @@ LIB     = -L../lib -lidsa -lpam
+ ifneq ($(PAMDIR),no)
+ all: $(PAMSO)
+ install: all
+-	@$(INSTALL) -m 644 $(PAMSO) $(PAMDIR)
++	@$(INSTALL) -d $(DESTDIR)$(PAMDIR)
++	@$(INSTALL) $(PAMSO) $(DESTDIR)$(PAMDIR)
+ 	@$(WARN) "To enable pam_idsa add $(PAMSO) references to the files in /etc/pam.d"
+ else 
+ all:
+--- idsa-0.93.1.orig/server/Makefile.orig	2002-03-05 21:10:15.000000000 +0100
++++ idsa-0.93.1.orig/server/Makefile	2014-04-09 21:15:08.223367954 +0200
+@@ -11,8 +11,8 @@ LIB     = -L../lib -L../common -lidsa -l
+ all: $(SERVER)
+ 
+ install: all
+-	@$(INSTALL) -d $(SBINDIR)
+-	@$(INSTALL) -m 755 $(SERVER) $(SBINDIR)
++	@$(INSTALL) -d $(DESTDIR)$(SBINDIR)
++	@$(INSTALL) -m 755 $(SERVER) $(DESTDIR)$(SBINDIR)
+ 
+ $(SERVER): $(SERVEROBJ)
+ 	$(CC) $(CFLAGS) $(SERVEROBJ) -o $(SERVER) $(LIB)
+--- idsa-0.93.1.orig/snoopy/Makefile.orig	2002-06-19 01:47:28.000000000 +0200
++++ idsa-0.93.1.orig/snoopy/Makefile	2014-04-09 21:15:39.346700638 +0200
+@@ -10,7 +10,7 @@ CFLAGS += -fPIC
+ all: $(SNOOPYSO)
+ 
+ install: all
+-	@$(INSTALL) -m 755 $(SNOOPYSO) $(LIBDIR)
++	@$(INSTALL) -m 755 $(SNOOPYSO) $(DESTDIR)$(LIBDIR)
+ 
+ $(SNOOPYSO): $(SNOOPYSRC)
+ 	$(CC) $(CFLAGS) -shared $(SNOOPYSRC) $(LIB) $(INCLUDE) -o $(SNOOPYSO)
+--- idsa-0.93.1.orig/syslog/Makefile.orig	2002-06-18 23:25:23.000000000 +0200
++++ idsa-0.93.1.orig/syslog/Makefile	2014-04-09 21:16:00.510033530 +0200
+@@ -14,7 +14,7 @@ LIB             = -L../lib -L../common -
+ all: $(SYSLOG)
+ 
+ install: all
+-	@$(INSTALL) -m 0755 $(SYSLOG) $(SBINDIR)
++	@$(INSTALL) -m 0755 $(SYSLOG) $(DESTDIR)$(SBINDIR)
+ 
+ %: %.c ../include/*.h ../common/*.h
+ 	$(CC) $(CFLAGS) -DVERSION=\"$(VERSION)\" $(INCLUDE) $(COMMON) $< -o $@ $(LIB)
+--- idsa-0.93.1.orig/tcpd/Makefile.orig	2002-06-19 02:03:34.000000000 +0200
++++ idsa-0.93.1.orig/tcpd/Makefile	2014-04-09 21:16:16.213366536 +0200
+@@ -11,7 +11,7 @@ LIB             = -L../lib -L../common -
+ ifneq ($(GNUNET),no)
+ all: $(WRAPPER)
+ install: all
+-	@$(INSTALL) -m 0755 $(WRAPPER) $(SBINDIR)
++	@$(INSTALL) -m 0755 $(WRAPPER) $(DESTDIR)$(SBINDIR)
+ else
+ all:
+ install:
+--- idsa-0.93.1.orig/tcplogd/Makefile.orig	2002-06-19 02:03:33.000000000 +0200
++++ idsa-0.93.1.orig/tcplogd/Makefile	2014-04-09 21:16:27.386699637 +0200
+@@ -10,7 +10,7 @@ LIB             = -L../lib -L../common -
+ ifneq ($(GNUNET),no)
+ all: $(TCPLOGD)
+ install: all
+-	@$(INSTALL) -m 0755 $(TCPLOGD) $(SBINDIR)
++	@$(INSTALL) -m 0755 $(TCPLOGD) $(DESTDIR)$(SBINDIR)
+ else
+ all:
+ install:
+--- idsa-0.93.1.orig/utils/Makefile.orig	2002-03-05 21:10:50.000000000 +0100
++++ idsa-0.93.1.orig/utils/Makefile	2014-04-09 21:26:21.426687255 +0200
+@@ -14,10 +14,10 @@ LIB     = -L../lib -L../common -lidsa -l
+ all: $(BIN_UTILS) $(SBIN_UTILS)
+ 
+ install: all
+-	@$(INSTALL) -d $(SBINDIR)
+-	@$(INSTALL) -m 0755 $(SBIN_UTILS) $(SBINDIR)
+-	@$(INSTALL) -d $(BINDIR)
+-	@$(INSTALL) -m 0755 $(BIN_UTILS)  $(BINDIR)
++	@$(INSTALL) -d $(DESTDIR)$(SBINDIR)
++	@$(INSTALL) -m 0755 $(SBIN_UTILS) $(DESTDIR)$(SBINDIR)
++	@$(INSTALL) -d $(DESTDIR)$(BINDIR)
++	@$(INSTALL) -m 0755 $(BIN_UTILS)  $(DESTDIR)$(BINDIR)
+ 
+ %: %.c ../include/*.h ../common/*.h
+ 	$(CC) $(CFLAGS) -DVERSION=\"$(VERSION)\" $(INCLUDE) $(COMMON) $< -o $@ $(LIB)
+--- idsa-0.93.1.orig/apache/Makefile.orig	2002-04-17 01:18:22.000000000 +0200
++++ idsa-0.93.1.orig/apache/Makefile	2014-04-09 22:23:57.236615225 +0200
+@@ -19,7 +19,8 @@
+ 
+ all: $(MODSO)
+ install: all
+-	$(APXS) -i -a $(MODSO)
++	install -d $(DESTDIR)$(shell $(APXS) -q LIBEXECDIR)
++	install $(MODSO) $(DESTDIR)$(shell $(APXS) -q LIBEXECDIR)
+ 	@$(WARN) "To enable mod_idsa stop apache, append 'IdsaLog On' to httpd.conf and restart"
+ else
+ all:
diff --git a/idsa-gcc.patch b/idsa-gcc.patch
new file mode 100644
index 0000000..e28dff5
--- /dev/null
+++ b/idsa-gcc.patch
@@ -0,0 +1,44 @@
+--- idsa-0.93.1.orig/apache/mod_idsa.c.orig	2002-06-19 02:06:10.000000000 +0200
++++ idsa-0.93.1.orig/apache/mod_idsa.c	2014-04-09 19:51:29.546805891 +0200
+@@ -146,7 +146,7 @@
+ 
+ static int access_idsa(request_rec * r)
+ {
+-  char *agent, *referer, *method, *protocol, *hostname;
++  const char *agent, *referer, *method, *protocol, *hostname;
+   IDSA_EVENT *e;
+   idsa_state *st = ap_get_module_config(r->per_dir_config, &idsa_module);
+ 
+@@ -160,15 +160,15 @@
+   if (st) {
+     idsa_risks(e, 1, st->arisk, st->crisk, st->irisk);
+   }
+-  (const char *) method = r->method;
++  method = r->method;
+   if (method) {
+     idsa_add_string(e, "method", method);
+   }
+-  (const char *) protocol = r->protocol;
++  protocol = r->protocol;
+   if (protocol) {
+     idsa_add_string(e, "protocol", protocol);
+   }
+-  (const char *) hostname = r->hostname;
++  hostname = r->hostname;
+   if (hostname) {
+     idsa_add_string(e, "hostname", hostname);
+   }
+@@ -185,11 +185,11 @@
+   if (r->connection->local_ip) {
+     idsa_add_scan(e, "ip4dst", IDSA_T_ADDR, r->connection->local_ip);
+   }
+-  (const char *) agent = ap_table_get(r->headers_in, "User-Agent");
++  agent = ap_table_get(r->headers_in, "User-Agent");
+   if (agent) {
+     idsa_add_string(e, "agent", agent);
+   }
+-  (const char *) referer = ap_table_get(r->headers_in, "Referer");
++  referer = ap_table_get(r->headers_in, "Referer");
+   if (referer) {
+     idsa_add_string(e, "referer", referer);
+   }
diff --git a/idsa-guile.patch b/idsa-guile.patch
new file mode 100644
index 0000000..e164a82
--- /dev/null
+++ b/idsa-guile.patch
@@ -0,0 +1,109 @@
+--- idsa-0.93.1.orig/guile/guile.c.orig	2002-06-19 02:06:09.000000000 +0200
++++ idsa-0.93.1.orig/guile/guile.c	2014-04-09 19:04:38.920197807 +0200
+@@ -7,7 +7,7 @@
+ #include <idsa.h>
+ #include <idsa_internal.h>
+ 
+-#include <guile/gh.h>
++#include <libguile.h>
+ 
+ #include "misc.h"
+ 
+@@ -35,19 +35,19 @@
+   case IDSA_T_TIME:
+   case IDSA_T_ERRNO:
+     if (idsa_unit_get(unit_handle, &intval, sizeof(int)) == sizeof(int)) {
+-      result = gh_int2scm(intval);
++      result = scm_from_int(intval);
+     }
+     break;
+ 
+   case IDSA_T_PORT:
+     if (idsa_unit_get(unit_handle, portval, 2 * sizeof(int)) == (2 * sizeof(int))) {
+-      result = gh_ints2scm(portval, 2);
++      result = scm_take_u32vector(portval, 2);
+     }
+     break;
+ 
+   case IDSA_T_FLAG:
+     if (idsa_unit_get(unit_handle, &intval, sizeof(int)) == sizeof(int)) {
+-      result = gh_bool2scm(intval);
++      result = scm_from_bool(intval);
+     }
+     break;
+ 
+@@ -55,7 +55,7 @@
+     if (idsa_unit_get(unit_handle, &riskx, sizeof(int)) == sizeof(int)) {
+       riskval[0] = idsa_risk_severity(riskx);
+       riskval[1] = idsa_risk_confidence(riskx);
+-      result = gh_doubles2scm(riskval, 2);
++      result = scm_take_f64vector(riskval, 2);
+     }
+     break;
+ 
+@@ -66,7 +66,7 @@
+   default:
+     buflen = idsa_unit_print(unit_handle, buffer, IDSA_M_LONG, 0);
+     if (buflen >= 0) {
+-      result = gh_str2scm(buffer, buflen);
++      result = scm_from_locale_stringn(buffer, buflen);
+     }
+     break;
+   }
+@@ -92,20 +92,20 @@
+       fprintf(stderr, "build_list(): name=<%s>, type=<%d>\n", idsa_unit_name_get(unit_handle), idsa_type_name(idsa_unit_type(unit_handle)));
+ #endif
+ 
+-      unit_name = gh_str02scm(idsa_unit_name_get(unit_handle));
+-      unit_type = gh_str02scm(idsa_type_name(idsa_unit_type(unit_handle)));
++      unit_name = scm_from_locale_string(idsa_unit_name_get(unit_handle));
++      unit_type = scm_from_locale_string(idsa_type_name(idsa_unit_type(unit_handle)));
+       unit_value = idsa2scm(unit_handle);
+ 
+-      list_new = gh_list(unit_name, unit_type, unit_value, SCM_UNDEFINED);
++      list_new = scm_list_n(unit_name, unit_type, unit_value, SCM_UNDEFINED);
+ 
+-      list_head = gh_cons(list_new, list_head);
++      list_head = scm_cons(list_new, list_head);
+     }
+   }
+ 
+   return list_head;
+ }
+ 
+-void local_main(int argc, char *argv[])
++void local_main(void *closure, int argc, char *argv[])
+ {
+   SCM user_function, argument_list;
+   IDSA_EVENT *event_handle;
+@@ -116,10 +116,10 @@
+   char write_buffer[IDSA_M_MESSAGE];
+   int should_write, have_written, write_result;
+ 
+-  gh_load(argv[1]);
++  scm_c_primitive_load(argv[1]);
+ 
+   /* WTF ? why does gh_lookup("idsa") fail and this work ? */
+-  user_function = gh_eval_str("idsa");
++  user_function = scm_c_eval_string("idsa");
+ 
+ #ifdef TRACE
+   fprintf(stderr, "local_main(): user_function is %d\n", user_function);
+@@ -193,7 +193,7 @@
+ 
+ 	idsa_reply_init(event_handle);
+ 
+-	if (gh_call1(user_function, argument_list) == SCM_BOOL_F) {
++	if (scm_call_1(user_function, argument_list) == SCM_BOOL_F) {
+ 	  idsa_reply_deny(event_handle);
+ #ifdef TRACE
+ 	  fprintf(stderr, "local_main(): false=deny\n");
+@@ -350,7 +350,7 @@
+ #endif
+ 
+   /* WARNING: Lets hope the guile garbage collector is really clever */
+-  gh_enter(2, local_argv, local_main);
++  scm_boot_guile(2, local_argv, local_main, NULL);
+ 
+   return 0;
+ }
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/idsa.git/commitdiff/d7c1e495e155504c02afca938992d305972c5f7b



More information about the pld-cvs-commit mailing list