Document that -c does not work with -P

Bug #15371 reported by Elias Oltmanns
8
Affects Status Importance Assigned to Milestone
sysklogd (Ubuntu)
Triaged
Medium
Unassigned

Bug Description

Applies to: klogd 1.4.1-16ubuntu6 (hoary) and probably 1.4.1-16ubuntu4 and ...ubuntu5 as well. When using -P (selecting input source for klogd) in conjunction with -c (changing default log level for console messages), the -c option seems to be ignored by klogd. I added -c 3 to the standard option list in the init script and still got as much output to the console as before. The only work around I could find is to run klogd as root (without -P) as before. Obviously I'd rather like to run klogd without root priviliges but as a console user it's really annoying to get a bulk of messages each time you plug in another usb device are mount a file system. Related to this I would also like to suggest to add a /etc/default/klogd file where the user would be able to specify an options string to be passed to klogd. This file wouldn't be silently overwritten during upgrades. Finally I have to point out that the -P option isn't documented in the man page and doesn't seem to be mentioned anywhere except from the changelog.

Revision history for this message
Elias Oltmanns (oltmanns) wrote :

It seems as if the call to ksyslog during initialisation (in function
GetKernelLogSrc) requires root privileges in order to change the
console log level. One solution would be to start klogd as root and
let it drop root privileges after initialisation if an appropriate
command line option has been given. This is not a clean solution,
however, since klogd would be unable to restore the original setting
during termination. An alternative would be to use a small tool just
for making these calls to ksyslog and let the klogd startup script
take care of console log level changes. This doesn't seem very clean
to me either because the original settings would only be restored if
klogd was terminated by the klogd init script.

Revision history for this message
Phil Bull (philbull) wrote :

Thanks for the report.

Do you still have this issue with Ubuntu Dapper?

Changed in sysklogd:
status: Unconfirmed → Needs Info
Revision history for this message
Martin Pitt (pitti) wrote : Re: [Bug 15371] Newly added -P option blocks other options. Also, -P option isn't documented in man page.

Hi Phil,

 status confirmed

Phil Bull [2006-03-28 14:35 -0000]:
> Comment:
> Thanks for the report.
>
> Do you still have this issue with Ubuntu Dapper?

Yes, it's still there.

Martin
--
Martin Pitt http://www.piware.de
Ubuntu Developer http://www.ubuntu.com
Debian Developer http://www.debian.org

In a world without walls and fences, who needs Windows and Gates?

Changed in sysklogd:
status: Needs Info → Confirmed
Revision history for this message
Elias Oltmanns (oltmanns) wrote :

Martin Pitt <email address hidden> wrote:
[...]
> Phil Bull [2006-03-28 14:35 -0000]:
>> Comment:
>> Thanks for the report.
>>
>> Do you still have this issue with Ubuntu Dapper?
>
> Yes, it's still there.

Sorry for answering that late. The -P option is documented in the man
page now, so the remaining problem is the issue with changing the
console loglevel by specifying the -c option. Because of the problems
I had outlined in the previous posts, I've come to the conclusion that
the solution does not lie in changing klogd. Instead, it might be
worthwhile considering a change to the man page of klogd explaining
that in the Ubuntu default configuration the daemon is executed
without root privileges and the user should consider adding a line
like
kernel/printk = 3 4 1 7
to her /etc/sysctl.conf file instead of specifying the -c option.

Elias

Martin Pitt (pitti)
summary: - Newly added -P option blocks other options. Also, -P option isn't
- documented in man page.
+ Document that -c does not work with -P
Martin Pitt (pitti)
Changed in sysklogd (Ubuntu):
status: Confirmed → Triaged
Martin Pitt (pitti)
Changed in sysklogd (Ubuntu):
assignee: Martin Pitt (pitti) → nobody
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.