summaryrefslogtreecommitdiff
path: root/server/nss/nsssrv_ldb.h
blob: a57a91198c757576809e2768fc0fdbb6be511483 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30

#define NSS_PW_NAME "uid"
#define NSS_PW_UIDNUM "uidNumber"
#define NSS_PW_GIDNUM "gidNumber"
#define NSS_PW_FULLNAME "fullName"
#define NSS_PW_HOMEDIR "HomeDirectory"
#define NSS_PW_SHELL "loginShell"

typedef int (*nss_ldb_callback_t)(void *, int, struct ldb_result *);

int nss_ldb_init(TALLOC_CTX *mem_ctx,
                 struct event_context *ev,
                 struct ldb_context **ldb);

int nss_ldb_getpwnam(TALLOC_CTX *mem_ctx,
                     struct event_context *ev,
                     struct ldb_context *ldb,
                     const char *name,
                     nss_ldb_callback_t fn, void *ptr);

int nss_ldb_getpwuid(TALLOC_CTX *mem_ctx,
                     struct event_context *ev,
                     struct ldb_context *ldb,
                     uint64_t uid,
                     nss_ldb_callback_t fn, void *ptr);

int nss_ldb_enumpwent(TALLOC_CTX *mem_ctx,
                      struct event_context *ev,
                      struct ldb_context *ldb,
                      nss_ldb_callback_t fn, void *ptr);