diff options
author | Arthur de Jong <arthur@arthurdejong.org> | 2010-12-16 21:50:51 +0000 |
---|---|---|
committer | Arthur de Jong <arthur@arthurdejong.org> | 2010-12-16 21:50:51 +0000 |
commit | f67d6f67b84daa6acd33dd8f4192a72bc46c3a63 (patch) | |
tree | 5a2a84e90cbf80cd3f2ca1616a2d27b694c51d91 /nss/common.h | |
parent | 08f01639626bb2ec2537df7d9f8c5459867c0afb (diff) |
switch to a common back-end with a common constructor and destructor and put file pointer shared between {set,get,end}ent() calls in there
git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd-solaris@1333 ef36b2f9-881f-0410-afb5-c4e39611909c
Diffstat (limited to 'nss/common.h')
-rw-r--r-- | nss/common.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/nss/common.h b/nss/common.h index 7a3edcf..74ba519 100644 --- a/nss/common.h +++ b/nss/common.h @@ -104,6 +104,26 @@ return NSS_STATUS_TRYAGAIN; \ } +/* this is the backend structure for Solaris */ +struct nss_ldap_backend +{ + nss_backend_op_t *ops; /* function-pointer table */ + int n_ops; /* number of function pointers */ + TFILE *fp; /* the file pointer for {set,get,end}ent() functions */ +}; + +/* constructor for LDAP backends */ +nss_backend_t *nss_ldap_constructor(nss_backend_op_t *ops,size_t sizeofops); + +/* destructor for LDAP backends */ +nss_status_t nss_ldap_destructor(nss_backend_t *be,void UNUSED(*args)); + +extern TFILE *xxfp; + +/* easy way to get fp from back-end */ +/* #define LDAP_GET_FP(be) (((struct nss_ldap_backend*)(be))->fp) */ +#define LDAP_BE(be) ((struct nss_ldap_backend*)(be)) + #endif /* NSS_FLAVOUR_SOLARIS */ /* The following macros to automatically generate get..byname(), |