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
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

lidl updated this revision to Diff 10480.Nov 24 2015, 8:38 PM
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.
lidl updated this object.Nov 24 2015, 8:40 PM
rpaulo added inline comments.Nov 25 2015, 5:25 AM
usr.sbin/syslogd/syslogd.c
1452 ↗(On Diff #10480)

I think it would be cleaner to use snprintf here.

lidl marked an inline comment as done.Nov 25 2015, 3:20 PM

OK, changed to be snprintf.

lidl updated this revision to Diff 10494.Nov 25 2015, 3:26 PM

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

rpaulo accepted this revision.Nov 25 2015, 6:07 PM
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.