Page MenuHomeFreeBSD

Have syslogd honor 'mesg' status when logging to users.
ClosedPublic

Authored by lidl on Nov 24 2015, 8:38 PM.

Details

Summary

Proposed commit message:

PR: bin/196742
Submitted by: jef at mail acme com
Approved by: rpaulo (mentor)
Differential Revision: https://reviews.freebsd.org/D4270

Test Plan

Setup a syslogd configuration that logs to a user.
Login to two different ttys on machine, use 'logger' to
send distinct message to the facility that logs to the user.
Verify that both logins receive the messages.

Use 'mesg n' to turn off messages to the first user. Verify that
the syslog daemon only writes to the second user (mesg y).

Use 'mesg y' to back on messages to the first user. Use 'mesg n'
to turn off messages to the second user. Verify that only
the first user now receives messages.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

lidl retitled this revision from to Have syslogd honor 'mesg' status when logging to users..
lidl updated this object.
lidl edited the test plan for this revision. (Show Details)
lidl added a reviewer: rpaulo.
usr.sbin/syslogd/syslogd.c
1452 ↗(On Diff #10480)

I think it would be cleaner to use snprintf here.

OK, changed to be snprintf.

Address review comment to use snprintf() rather than strcpy().

rpaulo edited edge metadata.
This revision is now accepted and ready to land.Nov 25 2015, 6:07 PM
This revision was automatically updated to reflect the committed changes.