diff options
author | William Jon McCann <jmccann@redhat.com> | 2010-06-30 10:20:43 -0400 |
---|---|---|
committer | Ray Strode <rstrode@redhat.com> | 2010-08-17 13:45:20 -0400 |
commit | 9310418c63258dfd70cef46e2682cd9adc6c8f21 (patch) | |
tree | 3931193258559e6570482801acebc46b3aed3d1f /daemon/gdm-session-linux-auditor.c | |
parent | 36e72382eb19c31ee9e59b72f27cb8537ef960dd (diff) | |
download | gdm-9310418c63258dfd70cef46e2682cd9adc6c8f21.tar.gz |
Wrap getpw* calls to retry in EINTR
if getpwnam(username) returns NULL, errno needs to be
checked for EINTR. This indicates that a signal was received while waiting for
the blocking call to return, and getpwnam() should be retried.
Diffstat (limited to 'daemon/gdm-session-linux-auditor.c')
-rw-r--r-- | daemon/gdm-session-linux-auditor.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/daemon/gdm-session-linux-auditor.c b/daemon/gdm-session-linux-auditor.c index 15425636..6c581f71 100644 --- a/daemon/gdm-session-linux-auditor.c +++ b/daemon/gdm-session-linux-auditor.c @@ -1,4 +1,4 @@ -/* gdm-session-linux-auditor.c - Object for Linux auditing of session login/logout +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- * * Copyright (C) 2004, 2008 Sun Microsystems, Inc. * Copyright (C) 2005, 2008 Red Hat, Inc. @@ -35,6 +35,8 @@ #include <glib.h> +#include "gdm-common.h" + struct _GdmSessionLinuxAuditorPrivate { int audit_fd; @@ -63,7 +65,7 @@ log_user_message (GdmSessionAuditor *auditor, g_object_get (G_OBJECT (auditor), "display-device", &display_device, NULL); if (username != NULL) { - pw = getpwnam (username); + gdm_get_pwent_for_name (username, &pw); } else { username = g_strdup ("unknown"); pw = NULL; |