[Pkg-shadow-commits] r1876 - in upstream/trunk: . src

nekral-guest at alioth.debian.org nekral-guest at alioth.debian.org
Fri Mar 7 20:21:15 UTC 2008


Author: nekral-guest
Date: 2008-03-07 20:21:15 +0000 (Fri, 07 Mar 2008)
New Revision: 1876

Modified:
   upstream/trunk/ChangeLog
   upstream/trunk/src/newgrp.c
Log:
* src/newgrp.c: Add missing end of line in message.
* src/newgrp.c: Add audit events for the authentication
  (AUDIT_GRP_AUTH). Thansk to Peter Vrabec.


Modified: upstream/trunk/ChangeLog
===================================================================
--- upstream/trunk/ChangeLog	2008-03-05 00:10:25 UTC (rev 1875)
+++ upstream/trunk/ChangeLog	2008-03-07 20:21:15 UTC (rev 1876)
@@ -1,3 +1,9 @@
+2008-03-07  Nicolas François  <nicolas.francois at centraliens.net>
+
+	* src/newgrp.c: Add missing end of line in message.
+	* src/newgrp.c: Add audit events for the authentication
+	(AUDIT_GRP_AUTH). Thansk to Peter Vrabec.
+
 2008-03-05  Nicolas François  <nicolas.francois at centraliens.net>
 
 	* NEWS, src/faillog.c: Only reset the entries of existing users

Modified: upstream/trunk/src/newgrp.c
===================================================================
--- upstream/trunk/src/newgrp.c	2008-03-05 00:10:25 UTC (rev 1875)
+++ upstream/trunk/src/newgrp.c	2008-03-07 20:21:15 UTC (rev 1876)
@@ -165,6 +165,12 @@
 
 		if (grp->gr_passwd[0] == '\0' ||
 		    strcmp (cpasswd, grp->gr_passwd) != 0) {
+#ifdef WITH_AUDIT
+			snprintf (audit_buf, sizeof(audit_buf),
+			          "authentication new-gid=%d", grp->gr_gid);
+			audit_logger (AUDIT_GRP_AUTH, Prog,
+			              audit_buf, NULL, getuid (), 0);
+#endif
 			SYSLOG ((LOG_INFO,
 				 "Invalid password for group `%s' from `%s'",
 				 groupname, pwd->pw_name));
@@ -172,6 +178,12 @@
 			fputs (_("Invalid password.\n"), stderr);
 			goto failure;
 		}
+#ifdef WITH_AUDIT
+		snprintf (audit_buf, sizeof(audit_buf),
+		          "authentication new-gid=%d", grp->gr_gid);
+		audit_logger (AUDIT_GRP_AUTH, Prog,
+		              audit_buf, NULL, getuid (), 1);
+#endif
 	}
 
 	return;
@@ -250,7 +262,7 @@
 		child = fork ();
 		if (child < 0) {
 			/* error in fork() */
-			fprintf (stderr, _("%s: failure forking: %s"),
+			fprintf (stderr, _("%s: failure forking: %s\n"),
 				 is_newgrp ? "newgrp" : "sg", strerror (errno));
 #ifdef WITH_AUDIT
 			if (group) {




More information about the Pkg-shadow-commits mailing list