Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 204164

Summary: app-admin/syslog-ng - add logging to /dev/tty12 for hardened
Product: Gentoo Linux Reporter: Filip Golewski <zoltarx>
Component: [OLD] UnspecifiedAssignee: Gentoo Linux bug wranglers <bug-wranglers>
Status: VERIFIED NEEDINFO    
Severity: enhancement CC: marcin.deranek
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Filip Golewski 2008-01-03 10:08:10 UTC
this line may be added to be default used at the end of configuration file  /etc/syslog-ng/syslog-ng.conf (original header describes it as "/var/cvsroot/gentoo-x86/app-admin/syslog-ng/files/syslog-ng.conf.gentoo.hardened")  to log all messages to log it to 12th console (don't think it is necessary by default) and /var/log/messages file (like in several other unises).

destination console_all { file("/dev/tty12"); };
destination console_all { file("/var/log/messages"); };


Reproducible: Always
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2008-01-03 10:48:08 UTC
I don't understand, it's already there...

http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-admin/syslog-ng/files/syslog-ng.conf.gentoo.hardened?rev=1.5&view=markup

<snip>
destination console_all { file("/dev/tty12"); };
</snip>
Comment 2 Filip Golewski 2008-01-03 11:22:23 UTC
but I think there is no definition for logging into the file /var/log/messages (second line)
Comment 3 Filip Golewski 2008-01-03 11:26:57 UTC
sorry, missed that it is already. I thought it wasn't by default due to last update of my gentoo system.
Comment 4 Jakub Moc (RETIRED) gentoo-dev 2008-01-03 11:30:52 UTC
(In reply to comment #2)
> but I think there is no definition for logging into the file /var/log/messages
> (second line)

Eh, that's on purpose. If you want all cruft dumped into /var/log/messages instead of being sorted, then do NOT use the syslog-ng.conf.gentoo.hardened but 
syslog-ng.conf.gentoo instead.
Comment 5 Marcin Deranek 2008-06-11 08:44:34 UTC
Related problem: currently we have defined /dev/tty12 in 2 destinations (hardened syslog-ng.conf template):

destination kern { file("/var/log/kern.log"); file("/dev/tty12"); };
destination console_all { file("/dev/tty12"); };

Syslog-ng doesn't like that:

May 28 03:10:04 mac syslog-ng[1313]: Internal error, duplicate configuration elements refer to the same persistent config; name='affile_dd_writers(/dev/tty12)'
Comment 6 Clemente Aguiar 2009-04-29 10:06:57 UTC
I have the same problem with the syslog.conf (hardened)

# grep tty12 syslog-ng.conf
destination kern { file("/var/log/kern.log"); file("/dev/tty12"); };
destination console_all { file("/dev/tty12"); };

Apr 29 11:05:37 cherne syslog-ng[3851]: Internal error, duplicate configuration elements refer to the same persistent config; name='affile_dd_writers(/dev/tty12)'
Comment 7 William Waisse 2009-07-10 02:04:16 UTC
 exactly the same problem here :

Jul  7 03:10:02 quaoar syslog-ng[4053]: Configuration reload request received, reloading configuration;
Jul  7 03:10:02 quaoar syslog-ng[4053]: Internal error, duplicate configuration elements refer to the same persistent config; name='affile_dd_writers(/dev/tty12)'
Jul  7 03:10:02 quaoar syslog-ng[4053]: Configuration reload request received, reloading configuration;
Jul  7 03:10:03 quaoar syslog-ng[4053]: Configuration reload request received, reloading configuration;
Jul  7 03:10:03 quaoar syslog-ng[4053]: Configuration reload request received, reloading configuration;
Jul  7 03:10:04 quaoar syslog-ng[4053]: Configuration reload request received, reloading configuration;
Jul  7 03:10:04 quaoar syslog-ng[4053]: Configuration reload request received, reloading configuration;
Jul  7 03:10:04 quaoar syslog-ng[4053]: Configuration reload request received, reloading configuration;

 is there a workaround ?
Comment 8 Marcin Deranek 2009-07-10 12:33:40 UTC
Created separate bug (BUG#277308) - otherwise it will never get fixed.