diff options
author | Arthur de Jong <arthur@arthurdejong.org> | 2008-01-03 11:34:39 +0100 |
---|---|---|
committer | Arthur de Jong <arthur@arthurdejong.org> | 2008-01-03 11:34:39 +0100 |
commit | 04d2ae9fed5f3229fea740aaa13f1fe65e90b25a (patch) | |
tree | a8dd7bcbbf67eaff872b55dd87ffcbb85b72a4fb /nss/netgroup.c | |
parent | 95dfcb1b388e49ea65b4dbbadcedf528387cc364 (diff) |
only start the NSLCD_ACTION_*_ALL requests with the first call to getent() instead of with setent() to avoid unneeded requests if compat is used (except with netgroups)
git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-ldapd@556 ef36b2f9-881f-0410-afb5-c4e39611909c
Diffstat (limited to 'nss/netgroup.c')
-rw-r--r-- | nss/netgroup.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/nss/netgroup.c b/nss/netgroup.c index d043fc1..9d81784 100644 --- a/nss/netgroup.c +++ b/nss/netgroup.c @@ -2,7 +2,7 @@ netgroup.c - NSS lookup functions for netgroup entries Copyright (C) 2006 West Consulting - Copyright (C) 2006, 2007 Arthur de Jong + Copyright (C) 2006, 2007, 2008 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 @@ -100,7 +100,8 @@ static __thread TFILE *netgrentfp; enum nss_status _nss_ldap_setnetgrent(const char *group,struct __netgrent *result) { - /* we cannot use NSS_SETENT() here because we have a parameter */ + /* we cannot use NSS_SETENT() here because we have a parameter that is only + available in this function and we set result->first */ int32_t tmpint32; int errnocp; int *errnop; @@ -124,7 +125,8 @@ enum nss_status _nss_ldap_setnetgrent(const char *group,struct __netgrent *resul enum nss_status _nss_ldap_getnetgrent_r(struct __netgrent *result,char *buffer,size_t buflen,int *errnop) { - NSS_GETENT(netgrentfp,read_netgrent(netgrentfp,result,buffer,buflen,errnop)); + NSS_GETENT(netgrentfp,NSLCD_ACTION_NETGROUP_BYNAME, + read_netgrent(netgrentfp,result,buffer,buflen,errnop)); } enum nss_status _nss_ldap_endnetgrent(struct __netgrent UNUSED(* result)) |