nss-pam-ldapd commit: r1934 - in nss-pam-ldapd-0.8: . nslcd
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
nss-pam-ldapd commit: r1934 - in 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: r1934 - in nss-pam-ldapd-0.8: . nslcd
- Date: Sat, 23 Feb 2013 22:23:53 +0100 (CET)
Author: arthur
Date: Sat Feb 23 22:23:53 2013
New Revision: 1934
URL: http://arthurdejong.org/viewvc/nss-pam-ldapd?revision=1934&view=revision
Log:
check result of set_tolist() to ensure that memory allocation problems are
logged (r1911 from 0.9)
Modified:
nss-pam-ldapd-0.8/ (props changed)
nss-pam-ldapd-0.8/nslcd/cfg.c
nss-pam-ldapd-0.8/nslcd/group.c
nss-pam-ldapd-0.8/nslcd/passwd.c
nss-pam-ldapd-0.8/nslcd/shadow.c
Modified: nss-pam-ldapd-0.8/nslcd/cfg.c
==============================================================================
--- nss-pam-ldapd-0.8/nslcd/cfg.c Sat Feb 23 22:15:54 2013 (r1933)
+++ nss-pam-ldapd-0.8/nslcd/cfg.c Sat Feb 23 22:23:53 2013 (r1934)
@@ -829,6 +829,11 @@
/* check the variables used in the expression */
set=expr_vars(cfg->ldc_pam_authz_search[i],NULL);
list=set_tolist(set);
+ if (list==NULL)
+ {
+ log_log(LOG_CRIT,"malloc() failed to allocate memory");
+ exit(EXIT_FAILURE);
+ }
for (i=0;list[i]!=NULL;i++)
{
if ((strcmp(list[i],"username")!=0)&&
Modified: nss-pam-ldapd-0.8/nslcd/group.c
==============================================================================
--- nss-pam-ldapd-0.8/nslcd/group.c Sat Feb 23 22:15:54 2013 (r1933)
+++ nss-pam-ldapd-0.8/nslcd/group.c Sat Feb 23 22:23:53 2013 (r1934)
@@ -5,7 +5,7 @@
Copyright (C) 1997-2006 Luke Howard
Copyright (C) 2006 West Consulting
- Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Arthur de Jong
+ Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Arthur de Jong
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@@ -170,6 +170,11 @@
attmap_add_attributes(set,attmap_group_gidNumber);
attmap_add_attributes(set,attmap_group_member);
group_attrs=set_tolist(set);
+ if (group_attrs==NULL)
+ {
+ log_log(LOG_CRIT,"malloc() failed to allocate memory");
+ exit(EXIT_FAILURE);
+ }
set_free(set);
}
Modified: nss-pam-ldapd-0.8/nslcd/passwd.c
==============================================================================
--- nss-pam-ldapd-0.8/nslcd/passwd.c Sat Feb 23 22:15:54 2013 (r1933)
+++ nss-pam-ldapd-0.8/nslcd/passwd.c Sat Feb 23 22:23:53 2013 (r1934)
@@ -5,7 +5,7 @@
Copyright (C) 1997-2005 Luke Howard
Copyright (C) 2006 West Consulting
- Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Arthur de Jong
+ Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Arthur de Jong
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@@ -155,6 +155,11 @@
attmap_add_attributes(set,attmap_passwd_homeDirectory);
attmap_add_attributes(set,attmap_passwd_loginShell);
passwd_attrs=set_tolist(set);
+ if (passwd_attrs==NULL)
+ {
+ log_log(LOG_CRIT,"malloc() failed to allocate memory");
+ exit(EXIT_FAILURE);
+ }
set_free(set);
}
Modified: nss-pam-ldapd-0.8/nslcd/shadow.c
==============================================================================
--- nss-pam-ldapd-0.8/nslcd/shadow.c Sat Feb 23 22:15:54 2013 (r1933)
+++ nss-pam-ldapd-0.8/nslcd/shadow.c Sat Feb 23 22:23:53 2013 (r1934)
@@ -5,7 +5,7 @@
Copyright (C) 1997-2005 Luke Howard
Copyright (C) 2006 West Consulting
- Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Arthur de Jong
+ Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Arthur de Jong
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@@ -107,6 +107,11 @@
attmap_add_attributes(set,attmap_shadow_shadowExpire);
attmap_add_attributes(set,attmap_shadow_shadowFlag);
shadow_attrs=set_tolist(set);
+ if (shadow_attrs==NULL)
+ {
+ log_log(LOG_CRIT,"malloc() failed to allocate memory");
+ exit(EXIT_FAILURE);
+ }
set_free(set);
}
--
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: r1934 - in nss-pam-ldapd-0.8: . nslcd,
Commits of the nss-pam-ldapd project