diff options
author | Arthur de Jong <arthur@arthurdejong.org> | 2008-01-03 10:34:39 +0000 |
---|---|---|
committer | Arthur de Jong <arthur@arthurdejong.org> | 2008-01-03 10:34:39 +0000 |
commit | 04d2ae9fed5f3229fea740aaa13f1fe65e90b25a (patch) | |
tree | a8dd7bcbbf67eaff872b55dd87ffcbb85b72a4fb /nss/protocols.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/protocols.c')
-rw-r--r-- | nss/protocols.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/nss/protocols.c b/nss/protocols.c index 1f5d877..855c4ad 100644 --- a/nss/protocols.c +++ b/nss/protocols.c @@ -2,7 +2,7 @@ protocols.c - NSS lookup functions for protocol database 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 @@ -61,12 +61,13 @@ static __thread TFILE *protoentfp; enum nss_status _nss_ldap_setprotoent(int UNUSED(stayopen)) { - NSS_SETENT(protoentfp,NSLCD_ACTION_PROTOCOL_ALL); + NSS_SETENT(protoentfp); } enum nss_status _nss_ldap_getprotoent_r(struct protoent *result,char *buffer,size_t buflen,int *errnop) { - NSS_GETENT(protoentfp,read_protoent(protoentfp,result,buffer,buflen,errnop)); + NSS_GETENT(protoentfp,NSLCD_ACTION_PROTOCOL_ALL, + read_protoent(protoentfp,result,buffer,buflen,errnop)); } enum nss_status _nss_ldap_endprotoent(void) |