I haven't had a single contraversial commit all week, so what the

heck.  Watch through our hidden camera, ladies and gentlemen,
as this one-line addition to the syslog output generates hundreds
of thousands of lines of email in response, all from people
decrying the evils of electronic noise pollution! :-)

What this change does, simply speaking, is syslog it every time
someone changes their local password.  I need this at a local ISP to
tell whether people are reacting to expires in a timely fashion or
not.  To disable it, uncomment -DLOGGING in the Makefile.

If your users change their passwords so often as to fill your logfile,
then you may also have another administrative problem to deal with.
This commit is contained in:
Jordan K. Hubbard 1996-11-03 03:11:57 +00:00
parent bb6382fae2
commit 2b5209acaa
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=19342
2 changed files with 10 additions and 3 deletions

View File

@ -1,5 +1,5 @@
# From: @(#)Makefile 8.3 (Berkeley) 4/2/94
# $Id: Makefile,v 1.18 1995/09/14 21:02:16 gibbs Exp $
# $Id: Makefile,v 1.19 1996/02/23 16:08:23 wpaul Exp $
PROG= passwd
SRCS= local_passwd.c yppasswd_private_xdr.c yppasswd_comm.c yp_passwd.c \
@ -13,7 +13,7 @@ LDADD= -lcrypt -lrpcsvc
CFLAGS+= -DCRYPT -DYP -I. -I${.CURDIR} -I${.CURDIR}/../../usr.sbin/vipw \
-I${.CURDIR}/../../usr.bin/chpass -I${.CURDIR}/../../libexec/ypxfr \
-I${.CURDIR}/../../usr.sbin/rpc.yppasswdd -Dyp_error=warnx
-I${.CURDIR}/../../usr.sbin/rpc.yppasswdd -Dyp_error=warnx -DLOGGING
SRCS+= ypxfr_misc.c yp_clnt.c yppasswd_clnt.c

View File

@ -30,7 +30,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: local_passwd.c,v 1.8 1995/12/16 09:45:12 markm Exp $
* $Id: local_passwd.c,v 1.9 1996/07/01 19:38:24 guido Exp $
*/
#ifndef lint
@ -56,6 +56,10 @@ static const char sccsid[] = "@(#)local_passwd.c 8.3 (Berkeley) 4/2/94";
#include <pw_yp.h>
#endif
#ifdef LOGGING
#include <syslog.h>
#endif
#include "extern.h"
static uid_t uid;
@ -178,5 +182,8 @@ local_passwd(uname)
if (!pw_mkdb(uname))
pw_error((char *)NULL, 0, 1);
#ifdef LOGGING
syslog(LOG_DEBUG, "user %s changed their local password\n", uname);
#endif
return (0);
}