summaryrefslogtreecommitdiffstats
path: root/usr.bin/passwd/local_passwd.c
diff options
context:
space:
mode:
authorjkh <jkh@FreeBSD.org>1996-11-03 03:11:57 +0000
committerjkh <jkh@FreeBSD.org>1996-11-03 03:11:57 +0000
commitf83c06749f2b68dcac53df93cb0454d649fe3a90 (patch)
treecc4282f5921382504827a0a40a71a52d3d383a4c /usr.bin/passwd/local_passwd.c
parent56a5526f33821f3afcfcdc1ba3384cd40c0bbf8c (diff)
downloadFreeBSD-src-f83c06749f2b68dcac53df93cb0454d649fe3a90.zip
FreeBSD-src-f83c06749f2b68dcac53df93cb0454d649fe3a90.tar.gz
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.
Diffstat (limited to 'usr.bin/passwd/local_passwd.c')
-rw-r--r--usr.bin/passwd/local_passwd.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/usr.bin/passwd/local_passwd.c b/usr.bin/passwd/local_passwd.c
index 73ec1f8..04b78dd 100644
--- a/usr.bin/passwd/local_passwd.c
+++ b/usr.bin/passwd/local_passwd.c
@@ -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);
}
OpenPOWER on IntegriCloud