nss-pam-ldapd commit: r1947 - nss-pam-ldapd-0.8/nslcd
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
nss-pam-ldapd commit: r1947 - nss-pam-ldapd-0.8/nslcd
- From: Commits of the nss-pam-ldapd project <nss-pam-ldapd-commits [at] lists.arthurdejong.org>
- To: nss-pam-ldapd-commits [at] lists.arthurdejong.org
- Reply-to: nss-pam-ldapd-users [at] lists.arthurdejong.org
- Subject: nss-pam-ldapd commit: r1947 - nss-pam-ldapd-0.8/nslcd
- Date: Sun, 28 Apr 2013 16:50:43 +0200 (CEST)
Author: arthur
Date: Sun Apr 28 16:50:43 2013
New Revision: 1947
URL: http://arthurdejong.org/viewvc/nss-pam-ldapd?revision=1947&view=revision
Log:
handle the case where getpwuid() returns NULL
Modified:
nss-pam-ldapd-0.8/nslcd/cfg.c
Modified: nss-pam-ldapd-0.8/nslcd/cfg.c
==============================================================================
--- nss-pam-ldapd-0.8/nslcd/cfg.c Sun Apr 28 16:16:28 2013 (r1946)
+++ nss-pam-ldapd-0.8/nslcd/cfg.c Sun Apr 28 16:50:43 2013 (r1947)
@@ -459,11 +459,14 @@
{
/* get the name and gid from the passwd database */
pwent=getpwuid(*var);
- if ((gid!=NULL)&&(*gid==NOGID))
- *gid=pwent->pw_gid;
- if (str!=NULL)
- *str=strdup(pwent->pw_name);
- return;
+ if (pwent!=NULL)
+ {
+ if ((gid!=NULL)&&(*gid==NOGID))
+ *gid=pwent->pw_gid;
+ if (str!=NULL)
+ *str=strdup(pwent->pw_name);
+ return;
+ }
}
/* find by name */
pwent=getpwnam(token);
--
To unsubscribe send an email to
nss-pam-ldapd-commits-unsubscribe@lists.arthurdejong.org or see
http://lists.arthurdejong.org/nss-pam-ldapd-commits/
- nss-pam-ldapd commit: r1947 - nss-pam-ldapd-0.8/nslcd,
Commits of the nss-pam-ldapd project