Bug 88215 - [patch] syslogd(8) does not pass cleanly parameters to cfline()
Summary: [patch] syslogd(8) does not pass cleanly parameters to cfline()
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 5.4-STABLE
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-10-30 07:30 UTC by Daniel Molina Wegener
Modified: 2017-12-31 22:37 UTC (History)
0 users

See Also:


Attachments
file.diff (937 bytes, patch)
2005-10-30 07:30 UTC, Daniel Molina Wegener
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Molina Wegener 2005-10-30 07:30:15 UTC
   In the syslogd function init(), parameters passed to cfline()
are not clean when the user attempt to use a remote host entry
as the source of syslog messages.

   Instead of a clean host name, it passes the hostname and the
last program specification in the syslog.conf file.

Fix: Apply the next patch from the source tree:
How-To-Repeat: 
   Put any program specification and start syslogd with -vv and -d
flags, you can see the parameters passed to cfline() function in
a list.
Comment 1 Gleb Smirnoff freebsd_committer 2005-11-08 12:43:30 UTC
On Sun, Oct 30, 2005 at 04:22:42AM -0300, Daniel Molina Wegener wrote:
D>    In the syslogd function init(), parameters passed to cfline()
D> are not clean when the user attempt to use a remote host entry
D> as the source of syslog messages.
D> 
D>    Instead of a clean host name, it passes the hostname and the
D> last program specification in the syslog.conf file.
D> 
D> >How-To-Repeat:
D> 
D>    Put any program specification and start syslogd with -vv and -d
D> flags, you can see the parameters passed to cfline() function in
D> a list.

This is expected behavior, it is documented in manual:


     A program or hostname specification may be reset by giving the program or
     hostname as `*'.

This means, that program and hostname specifications are sticky and should
be reset explicitly, if set once. Many people find this confusing (me too).

I would like to change syslogd so that it resets both program and hostname
to '*' after any regular configuration line. But before commiting this we
need positive review from some people, and no negative review. May be current@
mailing list will be the correct choice. You should raise this question
on mailing lists, if you want to discuss this issue. In this case I will set
PR to analyzed state. If you agree with current documented behavior, then you
can ask for PR to be closed.

-- 
Totus tuus, Glebius.
GLEBIUS-RIPN GLEB-RIPE
Comment 2 Daniel Molina Wegener 2005-11-09 14:32:11 UTC
   On Tue, Nov 08, 2005 at 03:43:30PM +0300,
   Gleb Smirnoff wrote:

> [SNIP]
>
> This is expected behavior, it is documented in manual:
> 
> 
>      A program or hostname specification may be reset by
>      giving the program or hostname as `*'.
>

  Ok, the manual page indicates this method to reset the
program/host specification. The patch I've sent makes this
task automatically when a new specficiation is given from the
syslog.conf file.

> This means, that program and hostname specifications are
> sticky and should be reset explicitly, if set once. Many
> people find this confusing (me too).

  I understand...

> I would like to change syslogd so that it resets both program
> and hostname to '*' after any regular configuration line.
> But before commiting this we need positive review from some
> people, and no negative review. May be current@ mailing list
> will be the correct choice. You should raise this question on
> mailing lists, if you want to discuss this issue. In this case
> I will set PR to analyzed state. If you agree with current
> documented behavior, then you can ask for PR to be closed.

  Ok, Is the hackers mailing list the right place to start?.

> -- 
> Totus tuus, Glebius.
> GLEBIUS-RIPN GLEB-RIPE

Regards
-- 
 . 0 . | Daniel Molina Wegener
 . . 0 | dmw at unete dot cl
 0 0 0 | FreeBSD Power User
Comment 3 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 08:00:18 UTC
For bugs matching the following criteria:

Status: In Progress Changed: (is less than) 2014-06-01

Reset to default assignee and clear in-progress tags.

Mail being skipped