Compare commits
3 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
41c4b30bc5 | ||
|
|
24773f7e2d | ||
|
|
527844b41b |
13 changed files with 725 additions and 1 deletions
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
ulogd-1.24.tar.bz2
|
||||
|
|
@ -1 +0,0 @@
|
|||
Retire packages without systemd support, See FESCo ticket 1605
|
||||
1
sources
Normal file
1
sources
Normal file
|
|
@ -0,0 +1 @@
|
|||
05b4ed2926b9a22aaeaf642917bbf8ff ulogd-1.24.tar.bz2
|
||||
109
ulogd-1.02-init.patch
Normal file
109
ulogd-1.02-init.patch
Normal file
|
|
@ -0,0 +1,109 @@
|
|||
--- ./ulogd.init.lsbinit 2005-11-25 20:58:27.000000000 +0100
|
||||
+++ ./ulogd.init 2007-07-14 10:25:22.000000000 +0200
|
||||
@@ -1,36 +1,66 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
-# chkconfig: 345 81 19
|
||||
+# chkconfig: - 81 19
|
||||
# description: ulogd is the userspace logging daemon for netfilter/iptables
|
||||
+### BEGIN INIT INFO
|
||||
+# Provides: ulogd
|
||||
+# Required-Start: $local_fs $network $remote_fs
|
||||
+# Should-Start: $syslog
|
||||
+# Required-Stop: $local_fs $network $remote_fs
|
||||
+# Should-Stop: $syslog
|
||||
+# Default-Start:
|
||||
+# Default-Stop: 0 1 6
|
||||
+# Short-Description: start and stop ulogd
|
||||
+# Description: ulogd is the userspace logging daemon for netfilter/iptables
|
||||
+### END INIT INFO
|
||||
#
|
||||
|
||||
|
||||
. /etc/rc.d/init.d/functions
|
||||
|
||||
+prog="ulogd"
|
||||
+test -x /usr/sbin/ulogd || exit 0
|
||||
+
|
||||
+# Source networking configuration.
|
||||
+. /etc/sysconfig/network
|
||||
+
|
||||
+# Check that networking is up.
|
||||
+[ "$NETWORKING" = "no" ] && exit 0
|
||||
|
||||
function start()
|
||||
{
|
||||
- printf "Starting %s: " "ulogd"
|
||||
- daemon /usr/sbin/ulogd -d
|
||||
- echo
|
||||
- touch /var/lock/subsys/ulogd
|
||||
+ pid=`pidof ulogd`
|
||||
+ if [ "x$pid" == "x" ]; then
|
||||
+ echo -n $"Starting $prog: "
|
||||
+ daemon /usr/sbin/ulogd -d || exit $?
|
||||
+ echo
|
||||
+ touch /var/lock/subsys/ulogd
|
||||
+ else
|
||||
+ echo $"$prog is already running."
|
||||
+ fi
|
||||
}
|
||||
|
||||
|
||||
function stop()
|
||||
{
|
||||
- printf "Stopping %s: " "ulogd"
|
||||
- killproc ulogd
|
||||
- echo
|
||||
- rm -f /var/lock/subsys/ulogd
|
||||
+ pid=`pidof ulogd`
|
||||
+ if [ "x$pid" != "x" ]; then
|
||||
+ echo -n $"Stopping $prog: "
|
||||
+ killproc ulogd || exit $?
|
||||
+ echo
|
||||
+ rm -f /var/lock/subsys/ulogd
|
||||
+ else
|
||||
+ echo $"$prog is already stopped."
|
||||
+ fi
|
||||
}
|
||||
|
||||
|
||||
function reload()
|
||||
{
|
||||
+ echo -n $"Reloading $prog: "
|
||||
pid=`pidof ulogd`
|
||||
if [ "x$pid" != "x" ]; then
|
||||
- kill -HUP $pid 2>/dev/null
|
||||
+ kill -HUP $pid 2>/dev/null || exit $?
|
||||
fi
|
||||
touch /var/lock/subsys/ulogd
|
||||
}
|
||||
@@ -44,18 +74,26 @@ case "$1" in
|
||||
stop
|
||||
;;
|
||||
restart)
|
||||
+ echo $"restarting $prog..."
|
||||
stop
|
||||
start
|
||||
;;
|
||||
- reload)
|
||||
+ try-restart|condrestart)
|
||||
+ pid=`pidof ulogd`
|
||||
+ if [ "x$pid" != "x" ]; then
|
||||
+ stop
|
||||
+ start
|
||||
+ fi
|
||||
+ ;;
|
||||
+ reload|force-reload)
|
||||
reload
|
||||
;;
|
||||
status)
|
||||
status ulogd
|
||||
;;
|
||||
*)
|
||||
- printf "Usage: %s {start|stop|status|restart|reload}\n" "ulogd"
|
||||
- exit 1
|
||||
+ echo $"Usage: $0 {start|stop|status|restart|reload}"
|
||||
+ exit 2
|
||||
esac
|
||||
|
||||
exit 0
|
||||
24
ulogd-1.02-pgsql.patch
Normal file
24
ulogd-1.02-pgsql.patch
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
diff -Nur ulogd-1.02-orig/doc/pgsql.table ulogd-1.02/doc/pgsql.table
|
||||
--- ulogd-1.02-orig/doc/pgsql.table 2002-08-28 11:42:50.000000000 +0200
|
||||
+++ ulogd-1.02/doc/pgsql.table 2004-10-31 02:27:49.652607440 +0100
|
||||
@@ -33,16 +33,16 @@
|
||||
"ip_csum" integer,
|
||||
|
||||
/* log IPs as unsigned int32 (default) */
|
||||
--- "ip_saddr" bigint,
|
||||
--- "ip_daddr" bigint,
|
||||
+ "ip_saddr" bigint,
|
||||
+ "ip_daddr" bigint,
|
||||
|
||||
/* log IPs as string (--with-pgsql-log-ip-as-string) */
|
||||
-- "ip_saddr" character varying(40),
|
||||
-- "ip_daddr" character varying(40),
|
||||
|
||||
/* log IPs as inet (--with-pgsql-log-ip-as-string) */
|
||||
- "ip_saddr" inet,
|
||||
- "ip_daddr" inet,
|
||||
+-- "ip_saddr" inet,
|
||||
+-- "ip_daddr" inet,
|
||||
|
||||
|
||||
"tcp_sport" integer,
|
||||
33
ulogd-1.21-logdir.patch
Normal file
33
ulogd-1.21-logdir.patch
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
--- ulogd-1.21/ulogd.conf.in.logdir 2005-02-20 16:32:16.281426904 +0100
|
||||
+++ ulogd-1.21/ulogd.conf.in 2005-02-20 16:33:42.677292736 +0100
|
||||
@@ -11,7 +11,7 @@
|
||||
nlgroup=1
|
||||
|
||||
# logfile for status messages
|
||||
-logfile="/var/log/ulogd.log"
|
||||
+logfile="/var/log/ulogd/ulogd.log"
|
||||
|
||||
# loglevel: debug(1), info(3), notice(5), error(7) or fatal(8)
|
||||
loglevel=5
|
||||
@@ -50,11 +50,11 @@
|
||||
|
||||
|
||||
[LOGEMU]
|
||||
-file="/var/log/ulogd.syslogemu"
|
||||
+file="/var/log/ulogd/ulogd.syslogemu"
|
||||
sync=1
|
||||
|
||||
[OPRINT]
|
||||
-file="/var/log/ulogd.pktlog"
|
||||
+file="/var/log/ulogd/ulogd.pktlog"
|
||||
|
||||
[MYSQL]
|
||||
table="ulog"
|
||||
@@ -76,6 +76,6 @@
|
||||
buffer=200
|
||||
|
||||
[PCAP]
|
||||
-file="/var/log/ulogd.pcap"
|
||||
+file="/var/log/ulogd/ulogd.pcap"
|
||||
sync=1
|
||||
|
||||
89
ulogd-1.21-x86_64.patch
Normal file
89
ulogd-1.21-x86_64.patch
Normal file
|
|
@ -0,0 +1,89 @@
|
|||
--- ulogd-1.21/configure.x86_64 2005-02-16 12:26:32.000000000 +0100
|
||||
+++ ulogd-1.21/configure 2005-02-20 16:44:13.389409920 +0100
|
||||
@@ -1709,22 +1709,22 @@
|
||||
mysqldir=""
|
||||
echo $ac_n "checking for MySQL files""... $ac_c" 1>&6
|
||||
echo "configure:1712: checking for MySQL files" >&5
|
||||
-for d in $dir /usr /usr/local /usr/local/mysql /opt/mysql /opt/packages/mysql
|
||||
-do
|
||||
- if test -f $d/lib/mysql/libmysqlclient.so
|
||||
+#for d in $dir /usr /usr/local /usr/local/mysql /opt/mysql /opt/packages/mysql
|
||||
+#do
|
||||
+ if test -f ${libdir}/mysql/libmysqlclient.so
|
||||
then
|
||||
- echo "$ac_t""found mysql in $d" 1>&6
|
||||
- mysqldir=$d
|
||||
+ echo "$ac_t""found mysql in ${exec_prefix}" 1>&6
|
||||
+ mysqldir=${exec_prefix}
|
||||
mysqldir_suffix=/mysql
|
||||
- break
|
||||
- elif test -f $d/lib/libmysqlclient.so
|
||||
- then
|
||||
- echo "$ac_t""found mysql in $d" 1>&6
|
||||
- mysqldir=$d
|
||||
- mysqldir_suffix=
|
||||
- break
|
||||
+# break
|
||||
+# elif test -f $d/lib/libmysqlclient.so
|
||||
+# then
|
||||
+# echo "$ac_t""found mysql in $d" 1>&6
|
||||
+# mysqldir=$d
|
||||
+# mysqldir_suffix=
|
||||
+# break
|
||||
fi
|
||||
-done
|
||||
+#done
|
||||
|
||||
if test x$mysqldir = x
|
||||
then
|
||||
@@ -1735,7 +1735,7 @@
|
||||
EOF
|
||||
|
||||
MYSQLINCLUDES=${mysqldir}/include${mysqldir_suffix}
|
||||
- MYSQLLIBS=${mysqldir}/lib${mysqldir_suffix}
|
||||
+ MYSQLLIBS=${libdir}${mysqldir_suffix}
|
||||
|
||||
DATABASE_DIR="${DATABASE_DIR} mysql"
|
||||
|
||||
@@ -1802,20 +1802,20 @@
|
||||
pgsqldir=""
|
||||
echo $ac_n "checking for PGSQL files""... $ac_c" 1>&6
|
||||
echo "configure:1805: checking for PGSQL files" >&5
|
||||
-for d in $dir /usr /usr/local /usr/local/pgsql /opt/pgsql /opt/packages/pgsql
|
||||
-do
|
||||
- if test -f $d/lib/pgsql/libpq.so
|
||||
- then
|
||||
- echo "$ac_t""found pgsql in $d" 1>&6
|
||||
- pgsqldir=$d
|
||||
- break
|
||||
- elif test -f $d/lib/libpq.so
|
||||
+#for d in $dir /usr /usr/local /usr/local/pgsql /opt/pgsql /opt/packages/pgsql
|
||||
+#do
|
||||
+ if test -f ${libdir}/libpq.so
|
||||
then
|
||||
- echo "$ac_t""found pgsql in $d" 1>&6
|
||||
- pgsqldir=$d
|
||||
- break
|
||||
+ echo "$ac_t""found pgsql in ${exec_prefix}" 1>&6
|
||||
+ pgsqldir=${exec_prefix}
|
||||
+# break
|
||||
+# elif test -f $d/lib/libpq.so
|
||||
+# then
|
||||
+# echo "$ac_t""found pgsql in $d" 1>&6
|
||||
+# pgsqldir=$d
|
||||
+# break
|
||||
fi
|
||||
-done
|
||||
+#done
|
||||
|
||||
if test x$pgsqldir = x
|
||||
then
|
||||
@@ -1833,7 +1833,7 @@
|
||||
break
|
||||
fi
|
||||
done
|
||||
- PGSQLLIBS=${pgsqldir}/lib
|
||||
+ PGSQLLIBS=${libdir}
|
||||
|
||||
DATABASE_DIR="${DATABASE_DIR} pgsql"
|
||||
|
||||
22
ulogd-1.23-gcc4.patch
Normal file
22
ulogd-1.23-gcc4.patch
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
--- ulogd-1.23/extensions/ulogd_SYSLOG.c.gcc4 2005-02-12 22:17:41.000000000 +0100
|
||||
+++ ulogd-1.23/extensions/ulogd_SYSLOG.c 2005-04-19 14:03:48.000000000 +0200
|
||||
@@ -136,7 +136,7 @@
|
||||
.name = "syslog",
|
||||
.init = &syslog_init,
|
||||
.fini = &syslog_fini,
|
||||
- .output &_output_syslog
|
||||
+ .output = &_output_syslog
|
||||
};
|
||||
|
||||
|
||||
--- ulogd-1.23/include/ulogd/ulogd.h.gcc4 2005-04-19 14:06:36.000000000 +0200
|
||||
+++ ulogd-1.23/include/ulogd/ulogd.h 2005-04-19 14:06:49.000000000 +0200
|
||||
@@ -56,7 +56,7 @@
|
||||
#define ULOGD_ERROR 7 /* error condition, requires user action */
|
||||
#define ULOGD_FATAL 8 /* fatal, program aborted */
|
||||
|
||||
-extern FILE *logfile;
|
||||
+//extern FILE *logfile;
|
||||
|
||||
typedef struct ulog_iret {
|
||||
/* next interpreter return (key) in the global list */
|
||||
22
ulogd-1.24-fortify-source.patch
Normal file
22
ulogd-1.24-fortify-source.patch
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
--- extensions/ulogd_BASE.c.fortify-source 2007-08-06 11:23:53.000000000 +0200
|
||||
+++ extensions/ulogd_BASE.c 2007-08-06 11:28:47.000000000 +0200
|
||||
@@ -63,7 +63,7 @@ static ulog_iret_t *_interp_raw(ulog_int
|
||||
{
|
||||
unsigned char *p;
|
||||
int i;
|
||||
- char *buf, *oldbuf = NULL;
|
||||
+ char *buf = NULL;
|
||||
ulog_iret_t *ret = ip->result;
|
||||
|
||||
if (pkt->mac_len) {
|
||||
@@ -75,9 +75,8 @@ static ulog_iret_t *_interp_raw(ulog_int
|
||||
*buf = '\0';
|
||||
|
||||
p = pkt->mac;
|
||||
- oldbuf = buf;
|
||||
for (i = 0; i < pkt->mac_len; i++, p++)
|
||||
- sprintf(buf, "%s%02x%c", oldbuf, *p, i==pkt->mac_len-1 ? ' ':':');
|
||||
+ sprintf(buf + (i*3), "%02x%c", *p, i==pkt->mac_len-1 ? ' ':':');
|
||||
ret[0].value.ptr = buf;
|
||||
ret[0].flags |= ULOGD_RETF_VALID;
|
||||
}
|
||||
129
ulogd-1.24-initializers.patch
Normal file
129
ulogd-1.24-initializers.patch
Normal file
|
|
@ -0,0 +1,129 @@
|
|||
--- ./pcap/ulogd_PCAP.c.initializers 2005-11-25 20:58:25.000000000 +0100
|
||||
+++ ./pcap/ulogd_PCAP.c 2007-08-14 23:18:45.000000000 +0200
|
||||
@@ -276,7 +276,7 @@ static ulog_output_t pcap_op = {
|
||||
.signal = &pcap_signal_handler,
|
||||
};
|
||||
|
||||
-void _init(void)
|
||||
+static void __attribute__((constructor)) init_pcap(void)
|
||||
{
|
||||
if (get_ids()) {
|
||||
ulogd_log(ULOGD_ERROR, "can't resolve all keyhash id's\n");
|
||||
--- ./sqlite3/ulogd_SQLITE3.c.initializers 2005-11-25 20:58:25.000000000 +0100
|
||||
+++ ./sqlite3/ulogd_SQLITE3.c 2007-08-14 23:18:22.000000000 +0200
|
||||
@@ -405,7 +405,7 @@ static ulog_output_t _sqlite3_plugin = {
|
||||
.fini = &_sqlite3_fini,
|
||||
};
|
||||
|
||||
-void _init(void)
|
||||
+static void __attribute__((constructor)) init_sqlite3(void)
|
||||
{
|
||||
register_output(&_sqlite3_plugin);
|
||||
}
|
||||
--- ./pgsql/ulogd_PGSQL.c.initializers 2006-01-23 00:07:10.000000000 +0100
|
||||
+++ ./pgsql/ulogd_PGSQL.c 2007-08-14 23:17:54.000000000 +0200
|
||||
@@ -458,7 +458,7 @@ static ulog_output_t pgsql_plugin = {
|
||||
.fini = &pgsql_fini,
|
||||
};
|
||||
|
||||
-void _init(void)
|
||||
+static void __attribute__((constructor)) init_pgsql(void)
|
||||
{
|
||||
register_output(&pgsql_plugin);
|
||||
}
|
||||
--- ./extensions/ulogd_LOGEMU.c.initializers 2005-11-25 20:58:26.000000000 +0100
|
||||
+++ ./extensions/ulogd_LOGEMU.c 2007-08-14 23:16:04.000000000 +0200
|
||||
@@ -130,7 +130,7 @@ static ulog_output_t logemu_op = {
|
||||
.signal = &signal_handler_logemu,
|
||||
};
|
||||
|
||||
-void _init(void)
|
||||
+static void __attribute__((constructor)) logemu__init(void)
|
||||
{
|
||||
register_output(&logemu_op);
|
||||
}
|
||||
--- ./extensions/ulogd_PWSNIFF.c.initializers 2005-11-25 20:58:26.000000000 +0100
|
||||
+++ ./extensions/ulogd_PWSNIFF.c 2007-08-14 23:16:04.000000000 +0200
|
||||
@@ -151,7 +151,7 @@ static ulog_interpreter_t base_ip[] = {
|
||||
{ NULL, "", 0, NULL, 0, NULL },
|
||||
};
|
||||
|
||||
-static void _base_reg_ip(void)
|
||||
+static void __attribute__((constructor)) _base_reg_ip(void)
|
||||
{
|
||||
ulog_interpreter_t *ip = base_ip;
|
||||
ulog_interpreter_t *p;
|
||||
@@ -159,9 +159,3 @@ static void _base_reg_ip(void)
|
||||
for (p = ip; p->interp; p++)
|
||||
register_interpreter(p);
|
||||
}
|
||||
-
|
||||
-
|
||||
-void _init(void)
|
||||
-{
|
||||
- _base_reg_ip();
|
||||
-}
|
||||
--- ./extensions/ulogd_SYSLOG.c.initializers 2006-01-25 12:14:09.000000000 +0100
|
||||
+++ ./extensions/ulogd_SYSLOG.c 2007-08-14 23:16:04.000000000 +0200
|
||||
@@ -140,7 +140,7 @@ static ulog_output_t syslog_op = {
|
||||
};
|
||||
|
||||
|
||||
-void _init(void)
|
||||
+static void __attribute__((constructor)) init_syslog(void)
|
||||
{
|
||||
if (printpkt_init())
|
||||
ulogd_log(ULOGD_ERROR, "can't resolve all keyhash id's\n");
|
||||
--- ./extensions/ulogd_OPRINT.c.initializers 2005-11-25 20:58:26.000000000 +0100
|
||||
+++ ./extensions/ulogd_OPRINT.c 2007-08-14 23:16:04.000000000 +0200
|
||||
@@ -138,7 +138,8 @@ static ulog_output_t oprint_op = {
|
||||
.fini = &oprint_fini,
|
||||
};
|
||||
|
||||
-void _init(void)
|
||||
+__attribute__ ((constructor))
|
||||
+static void init_oprint(void)
|
||||
{
|
||||
register_output(&oprint_op);
|
||||
}
|
||||
--- ./extensions/ulogd_BASE.c.initializers 2007-08-14 23:16:04.000000000 +0200
|
||||
+++ ./extensions/ulogd_BASE.c 2007-08-14 23:16:04.000000000 +0200
|
||||
@@ -540,6 +540,7 @@ static ulog_interpreter_t base_ip[] = {
|
||||
{ NULL, "", 0, NULL, 0, NULL },
|
||||
};
|
||||
|
||||
+__attribute__ ((constructor))
|
||||
void _base_reg_ip(void)
|
||||
{
|
||||
ulog_interpreter_t *ip = base_ip;
|
||||
@@ -549,8 +550,3 @@ void _base_reg_ip(void)
|
||||
register_interpreter(p);
|
||||
}
|
||||
}
|
||||
-
|
||||
-void _init(void)
|
||||
-{
|
||||
- _base_reg_ip();
|
||||
-}
|
||||
--- ./extensions/ulogd_LOCAL.c.initializers 2005-11-25 20:58:26.000000000 +0100
|
||||
+++ ./extensions/ulogd_LOCAL.c 2007-08-14 23:16:04.000000000 +0200
|
||||
@@ -84,7 +84,7 @@ static void _local_reg_ip(void)
|
||||
register_interpreter(p);
|
||||
}
|
||||
|
||||
-void _init(void)
|
||||
+static void __attribute__((constructor)) local_init(void)
|
||||
{
|
||||
/* get hostname */
|
||||
char *tmp;
|
||||
--- ./mysql/ulogd_MYSQL.c.initializers 2005-11-25 20:58:27.000000000 +0100
|
||||
+++ ./mysql/ulogd_MYSQL.c 2007-08-14 23:17:31.000000000 +0200
|
||||
@@ -448,7 +448,7 @@ static ulog_output_t mysql_plugin = {
|
||||
.fini = &_mysql_fini,
|
||||
};
|
||||
|
||||
-void _init(void)
|
||||
+static void __attribute__((constructor)) init_mysql(void)
|
||||
{
|
||||
register_output(&mysql_plugin);
|
||||
}
|
||||
57
ulogd.8
Normal file
57
ulogd.8
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
.\" Hey, EMACS: -*- nroff -*-
|
||||
.\" First parameter, NAME, should be all caps
|
||||
.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
|
||||
.\" other parameters are allowed: see man(7), man(1)
|
||||
.TH ULOGD 8 "November 05, 2002" "Linux Netfilter"
|
||||
.\" Please adjust this date whenever revising the manpage.
|
||||
.\"
|
||||
.\" Some roff macros, for reference:
|
||||
.\" .nh disable hyphenation
|
||||
.\" .hy enable hyphenation
|
||||
.\" .ad l left justify
|
||||
.\" .ad b justify to both left and right margins
|
||||
.\" .nf disable filling
|
||||
.\" .fi enable filling
|
||||
.\" .br insert line break
|
||||
.\" .sp <n> insert n+1 empty lines
|
||||
.\" for manpage-specific macros, see man(7)
|
||||
.SH NAME
|
||||
ulogd \- netfilter/iptables ULOG daemon
|
||||
.SH SYNOPSIS
|
||||
.B ulogd [options]
|
||||
.SH DESCRIPTION
|
||||
.B ulogd
|
||||
connects to the netlink device of the Linux kernel and reads messages
|
||||
from the netfilter that get queued with the iptables ULOG target. For
|
||||
this to work you have to compile the ULOG target into your kernel or
|
||||
load the respective module.
|
||||
.PP
|
||||
The received messages can be logged into files or into a mySQL or
|
||||
PostgreSQL database.
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
.B -d, --daemon
|
||||
fork ulogd into background (start as daemon)
|
||||
.TP
|
||||
.B -c <filename>, --config-file <filename>
|
||||
use <filename> as configuration file instead of
|
||||
.I /etc/ulogd.conf
|
||||
.TP
|
||||
.B -h, --help
|
||||
show usage information
|
||||
.TP
|
||||
.B -V, --version
|
||||
show version information and copyright
|
||||
.SH FILES
|
||||
.I /etc/ulogd.conf
|
||||
.br
|
||||
.I /var/log/ulogd.log
|
||||
.SH SEE ALSO
|
||||
There is more documentation about the daemon and the database plugins
|
||||
(including examples) in the directory
|
||||
.nf
|
||||
.br
|
||||
.I /usr/share/doc/ulogd-@VERSION@
|
||||
.SH AUTHOR
|
||||
This manual page was written by Joerg Wendland <joergland@debian.org>,
|
||||
for the Debian GNU/Linux system (but may be used by others).
|
||||
10
ulogd.logrotate
Normal file
10
ulogd.logrotate
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
/var/log/ulogd/ulogd.log /var/log/ulogd/ulogd.syslogemu {
|
||||
missingok
|
||||
notifempty
|
||||
weekly
|
||||
compress
|
||||
sharedscripts
|
||||
postrotate
|
||||
/etc/init.d/ulogd reload > /dev/null 2>&1
|
||||
endscript
|
||||
}
|
||||
228
ulogd.spec
Normal file
228
ulogd.spec
Normal file
|
|
@ -0,0 +1,228 @@
|
|||
Name: ulogd
|
||||
Version: 1.24
|
||||
Release: 11%{?dist}
|
||||
Summary: The userspace logging daemon for netfilter
|
||||
License: GPLv2
|
||||
Group: System Environment/Daemons
|
||||
URL: http://gnumonks.org/projects
|
||||
Source0: http://ftp.netfilter.org/pub/ulogd/ulogd-%{version}.tar.bz2
|
||||
Source1: ulogd.logrotate
|
||||
Source2: ulogd.8
|
||||
Patch1: ulogd-1.21-logdir.patch
|
||||
Patch2: ulogd-1.02-init.patch
|
||||
# Bug 247345
|
||||
Patch3: ulogd-1.24-fortify-source.patch
|
||||
# The code uses a deprecated way of getting its DSO initializers run,
|
||||
# build fails with rpm-build > 4.4.2.1-3 (new find-debuginfo.sh script)
|
||||
Patch4: ulogd-1.24-initializers.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
Requires(post): initscripts, chkconfig
|
||||
Requires(postun): initscripts, chkconfig
|
||||
BuildRequires: mysql-devel
|
||||
BuildRequires: postgresql-devel
|
||||
BuildRequires: libpcap-devel
|
||||
BuildRequires: openssl-devel
|
||||
|
||||
%description
|
||||
Ulogd is an universal logging daemon for the ULOG target of netfilter, the
|
||||
Linux 2.4+ firewalling subsystem. Ulogd is able to log packets in various
|
||||
formats to different targets (text files, databases, etc..). It has an
|
||||
easy-to-use plugin interface to add new protocols and new output targets.
|
||||
|
||||
%package mysql
|
||||
Summary: MySQL output plugin for ulogd
|
||||
Group: System Environment/Daemons
|
||||
Requires: %{name} = %{version}
|
||||
|
||||
%description mysql
|
||||
Ulogd-mysql is a MySQL output plugin for ulogd. It enables logging of
|
||||
firewall information into a MySQL database.
|
||||
|
||||
%package pgsql
|
||||
Summary: PostgreSQL output plugin for ulogd
|
||||
Group: System Environment/Daemons
|
||||
Requires: %{name} = %{version}
|
||||
|
||||
%description pgsql
|
||||
Ulogd-pgsql is a PostgreSQL output plugin for ulogd. It enables logging of
|
||||
firewall information into a PostgreSQL database.
|
||||
|
||||
%package pcap
|
||||
Summary: PCAP output plugin for ulogd
|
||||
Group: System Environment/Daemons
|
||||
Requires: %{name} = %{version}
|
||||
|
||||
%description pcap
|
||||
ulogd-pcap is a output plugin for ulogd that saves packet logs as PCAP file.
|
||||
PCAP is a standard format that can be later analyzed by a lot of tools such as
|
||||
tcpdump and wireshark.
|
||||
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch1 -p1 -b .logdir
|
||||
%patch2 -p1 -b .lsbinit
|
||||
%patch3 -p0 -b .fortify-source
|
||||
# Enable BuildID :
|
||||
# https://www.redhat.com/archives/fedora-devel-announce/2007-August/msg00007.html
|
||||
perl -pi -e 's/\(LD\) -shared/(CC) \$(CFLAGS) \$(LDFLAGS) -shared/g' */Makefile.in
|
||||
%patch4 -p1 -b .initializers
|
||||
|
||||
|
||||
%build
|
||||
%configure --with-mysql --with-pgsql
|
||||
# Does not support parallel builds
|
||||
make
|
||||
|
||||
%install
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}
|
||||
mkdir -p $RPM_BUILD_ROOT%{_libdir}/ulogd
|
||||
mkdir -p $RPM_BUILD_ROOT%{_sbindir}/sbin
|
||||
make DESTDIR=$RPM_BUILD_ROOT install
|
||||
|
||||
mkdir -p $RPM_BUILD_ROOT%{_initrddir}
|
||||
install -m755 ulogd.init $RPM_BUILD_ROOT%{_initrddir}/ulogd
|
||||
|
||||
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/log/ulogd
|
||||
|
||||
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d
|
||||
install -m644 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/ulogd
|
||||
|
||||
mkdir -p $RPM_BUILD_ROOT%{_mandir}/man8
|
||||
sed -e 's/@VERSION@/%{version}/g' %{SOURCE2} > $RPM_BUILD_ROOT%{_mandir}/man8/ulogd.8
|
||||
gzip $RPM_BUILD_ROOT%{_mandir}/man8/ulogd.8
|
||||
|
||||
|
||||
%post
|
||||
/sbin/chkconfig --add ulogd
|
||||
|
||||
%preun
|
||||
if [ "$1" = 0 ]; then
|
||||
/sbin/service ulogd stop > /dev/null 2>&1 ||:
|
||||
/sbin/chkconfig --del ulogd
|
||||
fi
|
||||
|
||||
%postun
|
||||
if [ "$1" -ge "1" ]; then
|
||||
/sbin/service ulogd reload > /dev/null 2>&1 ||:
|
||||
fi
|
||||
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,)
|
||||
%doc COPYING AUTHORS README
|
||||
%doc doc/ulogd.txt doc/ulogd.a4.ps doc/ulogd.html
|
||||
%doc doc/mysql.table* doc/pgsql.table
|
||||
%{_sbindir}/ulogd
|
||||
%config(noreplace) %{_sysconfdir}/ulogd.conf
|
||||
%{_sysconfdir}/rc.d/init.d/ulogd
|
||||
%{_libdir}/ulogd
|
||||
%dir %{_localstatedir}/log/ulogd
|
||||
%config(noreplace) %{_sysconfdir}/logrotate.d/ulogd
|
||||
%{_mandir}/man8/ulogd.8.gz
|
||||
%exclude %{_libdir}/ulogd/ulogd_MYSQL.so
|
||||
%exclude %{_libdir}/ulogd/ulogd_PGSQL.so
|
||||
%exclude %{_libdir}/ulogd/ulogd_PCAP.so
|
||||
|
||||
%files mysql
|
||||
%defattr(0755,root,root)
|
||||
%{_libdir}/ulogd/ulogd_MYSQL.so
|
||||
|
||||
%files pgsql
|
||||
%defattr(0755,root,root)
|
||||
%{_libdir}/ulogd/ulogd_PGSQL.so
|
||||
|
||||
%files pcap
|
||||
%defattr(0755,root,root)
|
||||
%{_libdir}/ulogd/ulogd_PCAP.so
|
||||
|
||||
%changelog
|
||||
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.24-11
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
|
||||
|
||||
* Sat Jan 24 2009 Aurelien Bompard <abompard@fedoraproject.org> 1.24-10
|
||||
- rebuild for mysql
|
||||
|
||||
* Mon Feb 18 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 1.24-9
|
||||
- Autorebuild for GCC 4.3
|
||||
|
||||
* Wed Jan 9 2008 Leopold Aichinger <linuxtrainer@gmx.at> 1.24-8
|
||||
- Support for libpcap added
|
||||
|
||||
* Thu Dec 06 2007 Release Engineering <rel-eng at fedoraproject dot org> - 1.24-7
|
||||
- Rebuild for deps
|
||||
|
||||
* Tue Aug 14 2007 Aurelien Bompard <abompard@fedoraproject.org> 1.24-5
|
||||
- Fix the deprecated way of getting the DSO initializers run, causing
|
||||
builds to fails with rpm-build > 4.4.2.1-3 (new find-debuginfo.sh script)
|
||||
|
||||
* Sat Jul 14 2007 Aurelien Bompard <abompard@fedoraproject.org> 1.24-4
|
||||
- add patch to fix bug 247345
|
||||
- update URL
|
||||
- fix initscript (bug 247083)
|
||||
- unmark init script as %%config (Fedora policy)
|
||||
|
||||
* Sat Dec 09 2006 Aurelien Bompard <abompard@fedoraproject.org> 1.24-3
|
||||
- rebuild
|
||||
|
||||
* Thu Aug 31 2006 Aurelien Bompard <abompard@fedoraproject.org> 1.24-2
|
||||
- rebuild
|
||||
|
||||
* Wed Feb 22 2006 Aurelien Bompard <gauret[AT]free.fr> 1.24-1
|
||||
- version 1.24
|
||||
- drop patch3 (applied upstream)
|
||||
- drop patch4 (upstream uses mysql-config to detect libdir now)
|
||||
- drop patch5 (applied upstream)
|
||||
|
||||
* Tue Feb 21 2006 Aurelien Bompard <gauret[AT]free.fr> 1.23-3
|
||||
- rebuild for FC5
|
||||
|
||||
* Sun Jul 24 2005 Aurelien Bompard <gauret[AT]free.fr> 1.23-2
|
||||
- compress rotated logs
|
||||
- start after mysql in the init process
|
||||
- use dist tag
|
||||
|
||||
* Tue Apr 19 2005 Aurelien Bompard <gauret[AT]free.fr> 1.23-1.fc4
|
||||
- version 1.23
|
||||
- change release tag for FC4
|
||||
- add patch for GCC4 (upstream bug #323)
|
||||
|
||||
* Fri Apr 7 2005 Michael Schwendt <mschwendt[AT]users.sf.net>
|
||||
- rebuilt
|
||||
|
||||
* Wed Mar 09 2005 Aurelien Bompard <gauret[AT]free.fr> 1.22-1
|
||||
- version 1.22
|
||||
- add gpg signature to sources
|
||||
|
||||
* Sun Feb 20 2005 Aurelien Bompard <gauret[AT]free.fr> 1.21-1
|
||||
- version 1.21
|
||||
|
||||
* Fri Dec 17 2004 Michael Schwendt <mschwendt[AT]users.sf.net> 1.02-8
|
||||
- revise x86_64 patch to remove more hardcoded /lib badness
|
||||
|
||||
* Fri Dec 17 2004 Michael Schwendt <mschwendt[AT]users.sf.net> 1.02-7
|
||||
- x86_64, patch configure to look for mysql/pgsql below %%_libdir.
|
||||
- delete undefined %%epoch in mysql/pgsql sub package dep.
|
||||
|
||||
* Sun Oct 31 2004 Aurelien Bompard <gauret[AT]free.fr> 1.02-6
|
||||
- apply Michael Schwendt's suggestions in bug 1598
|
||||
|
||||
* Wed Oct 20 2004 Aurelien Bompard <gauret[AT]free.fr> 0:1.02-0.fdr.5
|
||||
- enable MySQL and PostgreSQL in subpackages
|
||||
- add man page from Debian
|
||||
|
||||
* Wed Oct 06 2004 Aurelien Bompard <gauret[AT]free.fr> 0:1.02-0.fdr.4
|
||||
- apply QA suggestions (bug 1598)
|
||||
|
||||
* Sat Jul 10 2004 Aurelien Bompard <gauret[AT]free.fr> 0:1.02-0.fdr.3
|
||||
- disable parallel builds
|
||||
- add chkconfig to Requires(pre,post)
|
||||
- set the right mode for /etc/logrotate.d/ulogd
|
||||
- rotate weekly
|
||||
|
||||
* Sun May 16 2004 Aurelien Bompard <gauret[AT]free.fr> 0:1.02-0.fdr.2
|
||||
- Add Epoch: 0
|
||||
Loading…
Add table
Add a link
Reference in a new issue