Source-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
re: CVS commit: basesrc/usr.sbin/user
[ there is one useful suggestion down the bottom, please don't
ignore that bit ;-) ]
On Tue, Aug 27, 2002 at 11:19:17PM +1000, matthew green wrote:
>
> Log Message:
> Use syslog(3) to log new users and groups, deletions of users and
groups,
> and modification of user and group information.
>
> Syslog priority is LOG_INFO, facility is LOG_USER (there is no need to
> do this via LOG_AUTH, since the password and group files are world
> readable).
>
> Suggested by Hubert Feyrer, after a similar facility in Linux.
>
>
> LOG_USER seems very wrong for this to me (syslog(3)):
>
> LOG_USER Messages generated by random user processes. This is
the
> default facility identifier if none is specified.
>
> this seems more like LOG_AUTH stuff to me.
By default, LOG_AUTH facility goes to /var/log/authlog, and this information
Aug 27 13:26:30 sys1 useradd[1247]: new user added: name=bozo, uid=1004,
gid=100, home=/home/bozo, shell=/bin/csh
Aug 27 13:26:46 sys1 userdel[1249]: user removed: name=bozo
is not really the same type as the login, su information which is
logged via LOG_AUTH. The information logged by user(8) is much more
informational, and, as the same information can be gleaned from
watching /etc/passwd and /etc/group, it is not really necessary to use
LOG_AUTH, since it is less of a security logging intent, and much more
of an informational intent.
FYI, I actually had it as LOG_AUTH and changed it to use LOG_USER,
since it is a much better fit.
user(8) is a random user process? LOG_USER is basically for programs
that non-root people run. logging user(8) info via it seems *exactly*
the wrong thing (irrespective of the name being the same) - user(8)
logs are system logs that should go along side other such information.
LOG_AUTH seems much more like the right place to me...
from my quick survey of the source tree, the only programs
that user LOG_USER are:
vacation(1) - exactly as expected
sesd(8) - without looking, i'd say this should use LOG_DAEMON
libc's _DIAGASSERT() - hi luke!
LOG_USER is for when some person on my system is writting a program
that wants to use syslog. that's a "random user process". root
running a program to change user information is decidedly not a
"random user process" to me.
it occurs to me that chpass(1) & friends should probably do the
same thing as user(8)...
Home |
Main Index |
Thread Index |
Old Index