5 ** Copyright 1998 - 2001 Double Precision, Inc.
6 ** See COPYING for distribution information.
10 #include <sys/types.h>
17 Functions to access local/config/userdb.dat
20 void userdb_set_debug(int);
21 void userdb_init(const char *);
23 char *userdb(const char *); /* Fetch the record */
24 char *userdbshadow(const char *,
25 const char *); /* Fetch the userdbshadow record */
27 /* Extract field from the record */
28 const char *userdb_get(const char *, /* The record */
29 const char *, /* Field name */
30 int *); /* Content length returned */
32 /* Extract numerical field from record */
34 unsigned userdb_getu(const char *, /* The record */
35 const char *, /* Field name */
36 unsigned); /* Returned if field not found */
38 /* Extract string into malloced buffer */
39 char *userdb_gets(const char *, /* The record */
40 const char *); /* The field */
43 char *udb_name
; /* Account name, ONLY set by userdb_createsuid */
44 char *udb_gecos
; /* GECOS */
45 char *udb_dir
; /* Home directory */
46 char *udb_shell
; /* Shell */
47 char *udb_mailbox
; /* Default mailbox */
48 char *udb_quota
; /* Maildir quota */
49 char *udb_options
; /* Options, see INSTALL */
53 char *udb_source
; /* Non-blank - source file in userdb dir */
56 struct userdbs
*userdb_creates(const char *);
57 struct userdbs
*userdb_createsuid(uid_t
);
58 struct userdbs
*userdb_enum_first();
59 struct userdbs
*userdb_enum_next();
61 void userdb_frees(struct userdbs
*);
62 char *userdb_mkmd5pw(const char *);