diff options
author | Ray Strode <rstrode@redhat.com> | 2008-02-06 23:44:35 +0000 |
---|---|---|
committer | Ray Strode <halfline@src.gnome.org> | 2008-02-06 23:44:35 +0000 |
commit | 3a262e01d93a7576ea0e5ce789fb2659d8b5a36b (patch) | |
tree | d963c2f322b48109eb5a9c0ff02bfe42c9ad8c0c /daemon/gdm-session-linux-auditor.c | |
parent | f9f93cc61a0b05ba6a1f19a6d0356d73e5e7ee87 (diff) | |
download | gdm-3a262e01d93a7576ea0e5ce789fb2659d8b5a36b.tar.gz |
Apply patch from Eamon Walsh <ewalsh@tycho.nsa.gov> to remove superfluos
2008-02-06 Ray Strode <rstrode@redhat.com>
* daemon/gdm-session-linux-auditor.c
(gdm_session_linux_auditor_report_login_attempt):
Apply patch from Eamon Walsh <ewalsh@tycho.nsa.gov>
to remove superfluos getpwnam() call.
svn path=/trunk/; revision=5704
Diffstat (limited to 'daemon/gdm-session-linux-auditor.c')
-rw-r--r-- | daemon/gdm-session-linux-auditor.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/daemon/gdm-session-linux-auditor.c b/daemon/gdm-session-linux-auditor.c index 7702a45a..d9b6a093 100644 --- a/daemon/gdm-session-linux-auditor.c +++ b/daemon/gdm-session-linux-auditor.c @@ -61,15 +61,14 @@ gdm_session_linux_auditor_report_login_attempt (GdmSessionAuditor *auditor, g_object_get (G_OBJECT (auditor), "hostname", &hostname, NULL); g_object_get (G_OBJECT (auditor), "display-device", &display_device, NULL); - pw = getpwnam (username); - if (username) { + if (username != NULL) { pw = getpwnam (username); } else { username = "unknown"; pw = NULL; } - if (pw) { + if (pw != NULL) { g_snprintf (buf, sizeof (buf), "uid=%d", pw->pw_uid); audit_log_user_message (linux_auditor->priv->audit_fd, AUDIT_USER_LOGIN, buf, hostname, NULL, display_device, |