diff options
author | Josiah Worcester <josiahw@gmail.com> | 2015-02-22 20:58:10 -0600 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2015-02-23 01:02:14 -0500 |
commit | 34b423d2077a4c799d2089068d3bec91fb800256 (patch) | |
tree | 7b852fdc3d580b4d5dc12494812a5a5d11328f66 /src/passwd/nscd.h | |
parent | 0afef1aa24b784c86ae6121ca39e999824086c7c (diff) | |
download | musl-34b423d2077a4c799d2089068d3bec91fb800256.tar.gz musl-34b423d2077a4c799d2089068d3bec91fb800256.tar.bz2 musl-34b423d2077a4c799d2089068d3bec91fb800256.tar.xz musl-34b423d2077a4c799d2089068d3bec91fb800256.zip |
support alternate backends for the passwd and group dbs
when we fail to find the entry in the commonly accepted files, we
query a server over a Unix domain socket on /var/run/nscd/socket.
the protocol used here is compatible with glibc's nscd protocol on
most systems (all that use 32-bit numbers for all the protocol fields,
which appears to be everything but Alpha).
Diffstat (limited to 'src/passwd/nscd.h')
-rw-r--r-- | src/passwd/nscd.h | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/src/passwd/nscd.h b/src/passwd/nscd.h new file mode 100644 index 00000000..102f0b4b --- /dev/null +++ b/src/passwd/nscd.h @@ -0,0 +1,38 @@ +#ifndef NSCD_H +#define NSCD_H + +#include <stdint.h> + +#define NSCDVERSION 2 +#define GETPWBYNAME 0 +#define GETPWBYUID 1 +#define GETGRBYNAME 2 +#define GETGRBYGID 3 + +#define REQVERSION 0 +#define REQTYPE 1 +#define REQKEYLEN 2 +#define REQ_LEN 3 + +#define PWVERSION 0 +#define PWFOUND 1 +#define PWNAMELEN 2 +#define PWPASSWDLEN 3 +#define PWUID 4 +#define PWGID 5 +#define PWGECOSLEN 6 +#define PWDIRLEN 7 +#define PWSHELLLEN 8 +#define PW_LEN 9 + +#define GRVERSION 0 +#define GRFOUND 1 +#define GRNAMELEN 2 +#define GRPASSWDLEN 3 +#define GRGID 4 +#define GRMEMCNT 5 +#define GR_LEN 6 + +FILE *__nscd_query(int32_t req, const char *key, int32_t *buf, size_t len, int *swap); + +#endif |