From 80ef1db3b31937b8c8d01befc3b69ff7d163bcc9 Mon Sep 17 00:00:00 2001 From: nekral-guest Date: Thu, 14 Feb 2008 18:51:37 +0000 Subject: [PATCH] One AUDIT_USER_START remained. Replace it with AUDIT_CHGRP_ID also. --- src/newgrp.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/newgrp.c b/src/newgrp.c index b3af03b9..7c87af20 100644 --- a/src/newgrp.c +++ b/src/newgrp.c @@ -182,7 +182,15 @@ failure: */ closelog (); #ifdef WITH_AUDIT - audit_logger (AUDIT_USER_START, Prog, "changing", NULL, getuid (), 0); + if (groupname) { + snprintf (audit_buf, sizeof(audit_buf), + "changing new-group=%s", groupname); + audit_logger (AUDIT_CHGRP_ID, Prog, + audit_buf, NULL, getuid (), 0); + } else { + audit_logger (AUDIT_CHGRP_ID, Prog, "changing", + NULL, getuid (), 0); + } #endif exit (1); }