Page MenuHomeFreeBSD

nscd: Warn when invalid configuration options are selected
ClosedPublic

Authored by allanjude on Jul 11 2020, 6:53 PM.
Tags
None
Referenced Files
F87347558: D25627.id.diff
Mon, Jul 1, 11:16 PM
F87347554: D25627.id74333.diff
Mon, Jul 1, 11:16 PM
F87347550: D25627.id74328.diff
Mon, Jul 1, 11:16 PM
F87347549: D25627.id74329.diff
Mon, Jul 1, 11:16 PM
F87347546: D25627.id74332.diff
Mon, Jul 1, 11:16 PM
F87346825: D25627.diff
Mon, Jul 1, 11:02 PM
Unknown Object (File)
Mon, Jul 1, 12:07 PM
Unknown Object (File)
Mon, Jul 1, 5:45 AM
Subscribers

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

markj added inline comments.
usr.sbin/nscd/parser.c
538 ↗(On Diff #74328)

It is a bit weird to test what is effectively a bool using > 0. != 0 would be clearer, or just write if (invalid_value) {.

539 ↗(On Diff #74328)

Missing a space for the continuing line.

This revision is now accepted and ready to land.Jul 11 2020, 6:57 PM

Agreed, I would have used a bool rather than an int, but this is an improvement regardless.

allanjude added inline comments.
usr.sbin/nscd/parser.c
538 ↗(On Diff #74328)

right.

539 ↗(On Diff #74328)

This is not actually a continuing line, LOG_ERR_2() is a macro that turns into syslog(LOG_ERR, "nscd error (from %s): %s", sender, ferror);
where the first line is 'sender' and the 2nd line is 'ferror'. Only the 2nd parameter has printf expansion.

allanjude marked 2 inline comments as done.

Address review feedback

This revision now requires review to proceed.Jul 11 2020, 7:41 PM
This revision was not accepted when it landed; it landed in state Needs Review.Jul 11 2020, 7:44 PM
This revision was automatically updated to reflect the committed changes.