gdm r5704 - in trunk: . daemon
- From: halfline svn gnome org
- To: svn-commits-list gnome org
- Subject: gdm r5704 - in trunk: . daemon
- Date: Wed, 6 Feb 2008 23:44:36 +0000 (GMT)
Author: halfline
Date: Wed Feb 6 23:44:35 2008
New Revision: 5704
URL: http://svn.gnome.org/viewvc/gdm?rev=5704&view=rev
Log:
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.
Modified:
trunk/ChangeLog
trunk/daemon/gdm-session-linux-auditor.c
Modified: trunk/daemon/gdm-session-linux-auditor.c
==============================================================================
--- trunk/daemon/gdm-session-linux-auditor.c (original)
+++ trunk/daemon/gdm-session-linux-auditor.c Wed Feb 6 23:44:35 2008
@@ -61,15 +61,14 @@
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,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]