+2008-03-07 Nicolas François <nicolas.francois@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@centraliens.net>
* NEWS, src/faillog.c: Only reset the entries of existing users
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));
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;
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) {