diff options
author | 2009-05-25 20:07:21 +0000 | |
---|---|---|
committer | 2009-05-25 20:07:21 +0000 | |
commit | ba73f6cd847c33d488e2dcd38c74a3252a29a7d4 (patch) | |
tree | 7f3cc3129689ca7dc23d7cfe0903d2da42d4f32b /app-admin/syslog-ng/files | |
parent | revert stabilization, bug #262100 comment #4 (diff) | |
download | gentoo-2-ba73f6cd847c33d488e2dcd38c74a3252a29a7d4.tar.gz gentoo-2-ba73f6cd847c33d488e2dcd38c74a3252a29a7d4.tar.bz2 gentoo-2-ba73f6cd847c33d488e2dcd38c74a3252a29a7d4.zip |
version bump
(Portage version: 2.1.6.11/cvs/Linux i686)
Diffstat (limited to 'app-admin/syslog-ng/files')
5 files changed, 258 insertions, 0 deletions
diff --git a/app-admin/syslog-ng/files/syslog-ng-3.0.2-ipv6.patch b/app-admin/syslog-ng/files/syslog-ng-3.0.2-ipv6.patch new file mode 100644 index 000000000000..f608b5955595 --- /dev/null +++ b/app-admin/syslog-ng/files/syslog-ng-3.0.2-ipv6.patch @@ -0,0 +1,31 @@ +From: Balazs Scheidler <bazsi@balabit.hu> +Date: Mon, 25 May 2009 08:30:58 +0000 (+0200) +Subject: [templates] fixed compilation problem if ipv6 is disabled +X-Git-Url: http://git.balabit.hu/?p=bazsi%2Fsyslog-ng-3.0.git;a=commitdiff_plain;h=32949aaf9a241411f63953926898b5f1e33064ca + +[templates] fixed compilation problem if ipv6 is disabled + +templates.c:(.text+0x658): undefined reference to `g_sockaddr_inet6_check' + +Reported-By: Michael Sterrett +--- + +diff --git a/src/templates.c b/src/templates.c +index a2be7ce..a413ad9 100644 +--- a/src/templates.c ++++ b/src/templates.c +@@ -392,7 +392,13 @@ log_macro_expand(GString *result, gint id, guint32 flags, gint ts_format, TimeZo + { + gchar *ip; + +- if (msg->saddr && (g_sockaddr_inet_check(msg->saddr) || g_sockaddr_inet6_check(msg->saddr))) ++ if (msg->saddr && (g_sockaddr_inet_check(msg->saddr) || ++#if ENABLE_IPV6 ++ g_sockaddr_inet6_check(msg->saddr) ++#else ++ 0 ++#endif ++ )) + { + gchar buf[MAX_SOCKADDR_STRING]; + diff --git a/app-admin/syslog-ng/files/syslog-ng.conf.gentoo.3.0 b/app-admin/syslog-ng/files/syslog-ng.conf.gentoo.3.0 new file mode 100644 index 000000000000..3a734ac1fb44 --- /dev/null +++ b/app-admin/syslog-ng/files/syslog-ng.conf.gentoo.3.0 @@ -0,0 +1,32 @@ +@version: 3.0 +# $Header: /var/cvsroot/gentoo-x86/app-admin/syslog-ng/files/syslog-ng.conf.gentoo.3.0,v 1.1 2009/05/25 20:07:21 mr_bones_ Exp $ +# +# Syslog-ng default configuration file for Gentoo Linux + +options { + chain_hostnames(no); + + # The default action of syslog-ng is to log a STATS line + # to the file every 10 minutes. That's pretty ugly after a while. + # Change it to every 12 hours so you get a nice daily update of + # how many messages syslog-ng missed (0). + stats_freq(43200); +}; + +source src { + unix-stream("/dev/log" max-connections(256)); + internal(); + file("/proc/kmsg"); +}; + +destination messages { file("/var/log/messages"); }; + +# By default messages are logged to tty12... +destination console_all { file("/dev/tty12"); }; +# ...if you intend to use /dev/console for programs like xconsole +# you can comment out the destination line above that references /dev/tty12 +# and uncomment the line below. +#destination console_all { file("/dev/console"); }; + +log { source(src); destination(messages); }; +log { source(src); destination(console_all); }; diff --git a/app-admin/syslog-ng/files/syslog-ng.conf.gentoo.fbsd.3.0 b/app-admin/syslog-ng/files/syslog-ng.conf.gentoo.fbsd.3.0 new file mode 100644 index 000000000000..883fbb350e0b --- /dev/null +++ b/app-admin/syslog-ng/files/syslog-ng.conf.gentoo.fbsd.3.0 @@ -0,0 +1,24 @@ +@version: 3.0 +# $Header: /var/cvsroot/gentoo-x86/app-admin/syslog-ng/files/syslog-ng.conf.gentoo.fbsd.3.0,v 1.1 2009/05/25 20:07:21 mr_bones_ Exp $ +# +# Syslog-ng default configuration file for Gentoo FreeBSD +# +options { + chain_hostnames(no); + + # The default action of syslog-ng is to log a STATS line + # to the file every 10 minutes. That's pretty ugly after a while. + # Change it to every 12 hours so you get a nice daily update of + # how many messages syslog-ng missed (0). + stats_freq(43200); +}; + +source src { + unix-dgram("/var/run/log"); + internal(); + file("/dev/klog"); +}; + +destination messages { file("/var/log/messages"); }; + +log { source(src); destination(messages); }; diff --git a/app-admin/syslog-ng/files/syslog-ng.conf.gentoo.hardened.3.0 b/app-admin/syslog-ng/files/syslog-ng.conf.gentoo.hardened.3.0 new file mode 100644 index 000000000000..1d928f92a58e --- /dev/null +++ b/app-admin/syslog-ng/files/syslog-ng.conf.gentoo.hardened.3.0 @@ -0,0 +1,111 @@ +@version: 3.0 +# Copyright 2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-admin/syslog-ng/files/syslog-ng.conf.gentoo.hardened.3.0,v 1.1 2009/05/25 20:07:21 mr_bones_ Exp $ + +# +# Syslog-ng configuration file, compatible with default hardened installations. +# + +options { + chain_hostnames(no); + stats_freq(43200); +}; + +source src { + unix-stream("/dev/log"); + internal(); +}; +source kernsrc { + file("/proc/kmsg"); +}; + +#source net { udp(); }; +#log { source(net); destination(net_logs); }; +#destination net_logs { file("/var/log/HOSTS/$HOST/$YEAR$MONTH$DAY.log"); }; + +destination authlog { file("/var/log/auth.log"); }; +destination _syslog { file("/var/log/syslog"); }; +destination cron { file("/var/log/cron.log"); }; +destination daemon { file("/var/log/daemon.log"); }; +destination kern { file("/var/log/kern.log"); file("/dev/tty12"); }; +destination lpr { file("/var/log/lpr.log"); }; +destination user { file("/var/log/user.log"); }; +destination uucp { file("/var/log/uucp.log"); }; +#destination ppp { file("/var/log/ppp.log"); }; +destination mail { file("/var/log/mail.log"); }; + +destination avc { file("/var/log/avc.log"); }; +destination audit { file("/var/log/audit.log"); }; +destination pax { file("/var/log/pax.log"); }; +destination grsec { file("/var/log/grsec.log"); }; + +destination mailinfo { file("/var/log/mail.info"); }; +destination mailwarn { file("/var/log/mail.warn"); }; +destination mailerr { file("/var/log/mail.err"); }; + +destination newscrit { file("/var/log/news/news.crit"); }; +destination newserr { file("/var/log/news/news.err"); }; +destination newsnotice { file("/var/log/news/news.notice"); }; + +destination debug { file("/var/log/debug"); }; +destination messages { file("/var/log/messages"); }; +destination console { usertty("root"); }; +destination console_all { file("/dev/tty12"); }; +#destination loghost { udp("loghost" port(999)); }; + +destination xconsole { pipe("/dev/xconsole"); }; + +filter f_auth { facility(auth); }; +filter f_authpriv { facility(auth, authpriv); }; +filter f_syslog { not facility(authpriv, mail); }; +filter f_cron { facility(cron); }; +filter f_daemon { facility(daemon); }; +filter f_kern { facility(kern); }; +filter f_lpr { facility(lpr); }; +filter f_mail { facility(mail); }; +filter f_user { facility(user); }; +filter f_uucp { facility(uucp); }; +#filter f_ppp { facility(ppp); }; +filter f_news { facility(news); }; +filter f_debug { not facility(auth, authpriv, news, mail); }; +filter f_messages { level(info..warn) + and not facility(auth, authpriv, mail, news); }; +filter f_emergency { level(emerg); }; + +filter f_info { level(info); }; + +filter f_notice { level(notice); }; +filter f_warn { level(warn); }; +filter f_crit { level(crit); }; +filter f_err { level(err); }; + +filter f_avc { match(".*avc: .*"); }; +filter f_audit { match("^audit.*") and not match(".*avc: .*"); }; +filter f_pax { match("^PAX:.*"); }; +filter f_grsec { match("^grsec:.*"); }; + +log { source(src); filter(f_authpriv); destination(authlog); }; +log { source(src); filter(f_syslog); destination(_syslog); }; +log { source(src); filter(f_cron); destination(cron); }; +log { source(src); filter(f_daemon); destination(daemon); }; +log { source(kernsrc); filter(f_kern); destination(kern); }; +log { source(src); filter(f_lpr); destination(lpr); }; +log { source(src); filter(f_mail); destination(mail); }; +log { source(src); filter(f_user); destination(user); }; +log { source(src); filter(f_uucp); destination(uucp); }; +log { source(kernsrc); filter(f_pax); destination(pax); }; +log { source(kernsrc); filter(f_grsec); destination(grsec); }; +log { source(kernsrc); filter(f_audit); destination(audit); }; +log { source(kernsrc); filter(f_avc); destination(avc); }; +log { source(src); filter(f_mail); filter(f_info); destination(mailinfo); }; +log { source(src); filter(f_mail); filter(f_warn); destination(mailwarn); }; +log { source(src); filter(f_mail); filter(f_err); destination(mailerr); }; +log { source(src); filter(f_news); filter(f_crit); destination(newscrit); }; +log { source(src); filter(f_news); filter(f_err); destination(newserr); }; +log { source(src); filter(f_news); filter(f_notice); destination(newsnotice); }; +log { source(src); filter(f_debug); destination(debug); }; +log { source(src); filter(f_messages); destination(messages); }; +log { source(src); filter(f_emergency); destination(console); }; +#log { source(src); filter(f_ppp); destination(ppp); }; +log { source(src); destination(console_all); }; diff --git a/app-admin/syslog-ng/files/syslog-ng.rc6.3.0 b/app-admin/syslog-ng/files/syslog-ng.rc6.3.0 new file mode 100644 index 000000000000..0da7804b0a2a --- /dev/null +++ b/app-admin/syslog-ng/files/syslog-ng.rc6.3.0 @@ -0,0 +1,60 @@ +#!/sbin/runscript +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-admin/syslog-ng/files/syslog-ng.rc6.3.0,v 1.1 2009/05/25 20:07:21 mr_bones_ Exp $ + +opts="checkconfig reload" + +depend() { + # Make networking dependency conditional on configuration + case $(sed 's/#.*//' /etc/syslog-ng/syslog-ng.conf) in + *source*tcp*|*source*udp*|*destination*tcp*|*destination*udp*) + need net + use stunnel ;; + esac + + # kludge for baselayout-1 compatibility + [ -z "${svclib}" ] && config /etc/syslog-ng/syslog-ng.conf + need clock hostname localmount + provide logger +} + +checkconfig() { + if [ ! -e /etc/syslog-ng/syslog-ng.conf ] ; then + eerror "You need to create /etc/syslog-ng/syslog-ng.conf first." + eerror "An example can be found in /etc/syslog-ng/syslog-ng.conf.sample" + return 1 + fi + syslog-ng -s -f /etc/syslog-ng/syslog-ng.conf + + # the start and reload functions have their own eends so + # avoid calling this twice when there are no problems + [ $? -eq 0 ] || eend $? "Configuration error. Please fix your configfile (/etc/syslog-ng/syslog-ng.conf)" +} + +start() { + checkconfig || return 1 + ebegin "Starting syslog-ng" + [ -n "${SYSLOG_NG_OPTS}" ] && SYSLOG_NG_OPTS="-- ${SYSLOG_NG_OPTS}" + start-stop-daemon --start --quiet --exec /usr/sbin/syslog-ng ${SYSLOG_NG_OPTS} + eend $? "Failed to start syslog-ng" +} + +stop() { + ebegin "Stopping syslog-ng" + start-stop-daemon --stop --quiet --pidfile /var/run/syslog-ng.pid + eend $? "Failed to stop syslog-ng" + sleep 1 # needed for syslog-ng to stop in case we're restarting +} + +reload() { + if [ ! -f /var/run/syslog-ng.pid ]; then + eerror "syslog-ng isn't running" + return 1 + fi + checkconfig || return 1 + ebegin "Reloading configuration and re-opening log files" + start-stop-daemon --stop --oknodo --signal HUP \ + --pidfile /var/run/syslog-ng.pid + eend $? +} |