5 ** Copyright 1998 - 2001 Double Precision, Inc.
6 ** See COPYING for distribution information.
9 static const char userdb_rcsid_h
[]="$Id: userdb.h,v 1.8 2004/04/18 15:54:39 mrsam Exp $";
11 #include <sys/types.h>
18 Functions to access local/config/userdb.dat
21 void userdb_set_debug(int);
22 void userdb_init(const char *);
24 char *userdb(const char *); /* Fetch the record */
25 char *userdbshadow(const char *,
26 const char *); /* Fetch the userdbshadow record */
28 /* Extract field from the record */
29 const char *userdb_get(const char *, /* The record */
30 const char *, /* Field name */
31 int *); /* Content length returned */
33 /* Extract numerical field from record */
35 unsigned userdb_getu(const char *, /* The record */
36 const char *, /* Field name */
37 unsigned); /* Returned if field not found */
39 /* Extract string into malloced buffer */
40 char *userdb_gets(const char *, /* The record */
41 const char *); /* The field */
44 char *udb_name
; /* Account name, ONLY set by userdb_createsuid */
45 char *udb_gecos
; /* GECOS */
46 char *udb_dir
; /* Home directory */
47 char *udb_shell
; /* Shell */
48 char *udb_mailbox
; /* Default mailbox */
49 char *udb_quota
; /* Maildir quota */
50 char *udb_options
; /* Options, see INSTALL */
54 char *udb_source
; /* Non-blank - source file in userdb dir */
57 struct userdbs
*userdb_creates(const char *);
58 struct userdbs
*userdb_createsuid(uid_t
);
59 struct userdbs
*userdb_enum_first();
60 struct userdbs
*userdb_enum_next();
62 void userdb_frees(struct userdbs
*);
63 char *userdb_mkmd5pw(const char *);