Bug 1042 - Allow TCP wrapper refusals to follow SyslogFacility
Summary: Allow TCP wrapper refusals to follow SyslogFacility
Status: CLOSED FIXED
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: sshd (show other bugs)
Version: 4.0p1
Hardware: All Solaris
: P2 enhancement
Assignee: Assigned to nobody
URL:
Keywords:
Depends on:
Blocks: V_4_8
  Show dependency treegraph
 
Reported: 2005-05-17 07:55 AEST by William Knox
Modified: 2008-03-31 15:20 AEDT (History)
2 users (show)

See Also:


Attachments
Patch to allow TCP wrapper refusals to log with SyslogFacility facility (618 bytes, patch)
2005-05-17 07:56 AEST, William Knox
dtucker: ok+
djm: ok+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description William Knox 2005-05-17 07:55:09 AEST
A refusal based on TCP wrappers now defaults to the syslog facility LOG_USER
(which is the default if none is defined) as opposed to the facility used by the
rest of ssh. The attached patch changes this behavior such that it logs with the
SyslogFacility as defined in the options (or the default of LOG_AUTH).
Comment 1 William Knox 2005-05-17 07:56:42 AEST
Created attachment 917 [details]
Patch to allow TCP wrapper refusals to log with SyslogFacility facility
Comment 2 Darren Tucker 2005-11-28 16:34:00 AEDT
Looks like this should be a portable-only change as it has no effect on OpenBSD.  Damien?
Comment 3 Damien Miller 2008-02-26 15:51:43 AEDT
Comment on attachment 917 [details]
Patch to allow TCP wrapper refusals to log with SyslogFacility facility

Why is this proposed for portable only? The same code is in OpenBSD.

Also, I don't think the bit-wise OR of log_facility is correct - according to syslog(3) the level is an ordered list, not a bitmask.
Comment 4 Darren Tucker 2008-02-26 17:27:52 AEDT
(In reply to comment #3)
> (From update of attachment 917 [details])
> Why is this proposed for portable only? The same code is in OpenBSD.

It doesn't occur on OpenBSD although I don't recall why.  The change could go into OpenBSD (and would be a no-op) but it's not required.

> Also, I don't think the bit-wise OR of log_facility is correct -
> according to syslog(3) the level is an ordered list, not a bitmask.

Level is an ordered list (as is facility, I believe), however the two are bitwise or'ed together.  quoth syslog(3):

 "The  priority  argument  is  formed  by  ORing  the facility and the level values (explained below)."
Comment 5 Darren Tucker 2008-02-28 23:21:11 AEDT
Patch has been applied an will be in the 4.8 release.  Thanks.
Comment 6 Damien Miller 2008-03-31 15:20:15 AEDT
Fix shipped in 4.9/4.9p1 release.