diff options
author | Arthur de Jong <arthur@arthurdejong.org> | 2007-09-07 22:51:46 +0200 |
---|---|---|
committer | Arthur de Jong <arthur@arthurdejong.org> | 2007-09-07 22:51:46 +0200 |
commit | 30423d96ecd243663906a3a1c13f1f0e90ac6330 (patch) | |
tree | ed94021c35b761bc355e7bec8cf4ce4379fe9c86 /nslcd/ldap-nss.h | |
parent | 6592036689c38566acbafc178e1f22098279263f (diff) |
make handling of ent_context consistent and simpler
git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-ldapd@382 ef36b2f9-881f-0410-afb5-c4e39611909c
Diffstat (limited to 'nslcd/ldap-nss.h')
-rw-r--r-- | nslcd/ldap-nss.h | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/nslcd/ldap-nss.h b/nslcd/ldap-nss.h index 7f89305..1b0e529 100644 --- a/nslcd/ldap-nss.h +++ b/nslcd/ldap-nss.h @@ -147,23 +147,22 @@ void _nss_ldap_enter (void); void _nss_ldap_leave (void); /* - * _nss_ldap_ent_context_init() is called for each getXXent() call - * This will acquire the global mutex. - */ -struct ent_context *_nss_ldap_ent_context_init (struct ent_context **); - -/* * _nss_ldap_ent_context_init_locked() has the same behaviour * as above, except it assumes that the caller has acquired * the lock */ +void _nss_ldap_ent_context_init_locked(struct ent_context *context); -struct ent_context *_nss_ldap_ent_context_init_locked (struct ent_context **); +/* + * _nss_ldap_ent_context_init() is called for each getXXent() call + * This will acquire the global mutex. + */ +void _nss_ldap_ent_context_init(struct ent_context *context); /* - * _nss_ldap_ent_context_release() is used to manually free a context + * _nss_ldap_ent_context_cleanup() is used to manually free a context */ -void _nss_ldap_ent_context_release (struct ent_context *); +void _nss_ldap_ent_context_cleanup (struct ent_context *); /* * these are helper functions for ldap-grp.c only on Solaris @@ -198,8 +197,8 @@ enum nss_status _nss_ldap_read (const char *dn, /* IN */ * extended enumeration routine; uses asynchronous API. * Caller must have acquired the global mutex */ -enum nss_status _nss_ldap_getent_ex ( - struct ent_context ** ctx, /* IN/OUT */ +enum nss_status _nss_ldap_getent_locked ( + struct ent_context *context, /* IN/OUT */ void *result, /* IN/OUT */ char *buffer, /* IN */ size_t buflen, /* IN */ @@ -214,7 +213,7 @@ enum nss_status _nss_ldap_getent_ex ( * common enumeration routine; uses asynchronous API. * Acquires the global mutex */ -int _nss_ldap_getent(struct ent_context ** ctx, /* IN/OUT */ +int _nss_ldap_getent(struct ent_context *context, /* IN/OUT */ void *result, /* IN/OUT */ char *buffer, /* IN */ size_t buflen, /* IN */ |