]> granicus.if.org Git - shadow/commitdiff
* src/login.c: Use failent_user to log to audit. username is the
authornekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Sat, 20 Sep 2008 13:20:31 +0000 (13:20 +0000)
committernekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Sat, 20 Sep 2008 13:20:31 +0000 (13:20 +0000)
caller, not the user login tries to authenticate.
* src/login.c: Use pwd->pw_name instead of pwd->pw_uid. This might
be more precise (name must be unique, uid might not be).

ChangeLog
src/login.c

index 0614f0d3b6fb3d9d80c6b786c39dec426b78f1dd..15223d9c2b19a0f0fb91aecc49b60b64d85f9594 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2008-09-20  Nicolas François  <nicolas.francois@centraliens.net>
+
+       * src/login.c: Use failent_user to log to audit. username is the
+       caller, not the user login tries to authenticate.
+       * src/login.c: Use pwd->pw_name instead of pwd->pw_uid. This might
+       be more precise (name must be unique, uid might not be).
+
 2008-09-20  Nicolas François  <nicolas.francois@centraliens.net>
 
        * man/passwd.1.xml: passwd cannot change the full name of the
index 73f6e066fe7b39d0ae7716044a939e2a638dd5af..e82ead10ce22eeb329f3de9e4105e66c5fdc31c9 100644 (file)
@@ -752,8 +752,7 @@ int main (int argc, char **argv)
                                                  AUDIT_USER_LOGIN,
                                                  NULL,    /* Prog. name */
                                                  "login",
-                                                 (NULL!=username)?username
-                                                                 :"(unknown)",
+                                                 failent_user,
                                                  AUDIT_NO_ID,
                                                  hostname,
                                                  NULL,    /* addr */
@@ -1045,8 +1044,8 @@ int main (int argc, char **argv)
                                AUDIT_USER_LOGIN,
                                NULL,    /* Prog. name */
                                "login",
-                               NULL,    /* user's name => use uid */
-                               (unsigned int) pwd->pw_uid,
+                               pwd->pw_name,
+                               AUDIT_NO_ID,
                                hostname,
                                NULL,    /* addr */
                                tty,