[Pkg-shadow-devel] Bug#190215: Proposed patch for su to log through
syslog (#190215)
Christian Perrier
bubulle at debian.org
Thu Oct 27 16:24:01 UTC 2005
tags 190215 patch
thanks
Attached is a patch which adds syslog logging of successful/failed su
actions.
It implements the simple scheme (INFO/NOTICE) I proposed a few minutes
ago.
--
-------------- next part --------------
Goal: Log successful/failed su through syslog
Fixes: #190215
Status wrt upstream: Forwarded but not applied yet
Index: shadow-4.0.13/libmisc/sulog.c
===================================================================
--- shadow-4.0.13.orig/libmisc/sulog.c 2005-08-31 19:24:58.000000000 +0200
+++ shadow-4.0.13/libmisc/sulog.c 2005-10-27 18:19:27.168072616 +0200
@@ -49,6 +49,14 @@
FILE *fp;
mode_t oldmask;
+ if (success) {
+ SYSLOG ((LOG_INFO,
+ "Successful su for %s by %s",name,oldname));
+ } else {
+ SYSLOG ((LOG_NOTICE,
+ "FAILED su for %s by %s",name,oldname));
+ }
+
if ((sulog_file = getdef_str ("SULOG_FILE")) == (char *) 0)
return;
More information about the Pkg-shadow-devel
mailing list