1HESIOD(3)                  Library Functions Manual                  HESIOD(3)
2
3
4

NAME

6       hesiod_getpwnam, hesiod_getpwuid, hesiod_free_passwd - Hesiod functions
7       for retrieving passwd information
8

SYNOPSIS

10       #include <hesiod.h>
11
12       struct passwd *hesiod_getpwnam(void *context, const char *name)
13       struct passwd *hesiod_getpwuid(void *context, uid_t uid)
14       void hesiod_free_passwd(void *context, struct passwd *pw)
15
16       cc file.c -lhesiod
17

DESCRIPTION

19       This family of functions allows you to retrieve passwd database  infor‐
20       mation  using Hesiod.  To perform lookups, you need an initialized Hes‐
21       iod context; see hesiod(3) for details.  You may look up passwd  infor‐
22       mation by name or by uid; information is returned in the same format as
23       by getpwnam or getpwuid.  It is the  caller's  responsibility  to  call
24       hesiod_free_passwd with the returned passwd entry to free the resources
25       used by the passwd entry.
26
27       Hesiod queries for passwd information are made using the ``passwd''  or
28       ``uid'' Hesiod type, using either the username or the decimal represen‐
29       tation of the uid as the Hesiod name.  The corresponding records should
30       be  a  colon-separated  list  of  fields giving the username, encrypted
31       password, uid, gid, GECOS information, home directory, and shell of the
32       user.
33

RETURN VALUES

35       On failure, hesiod_getpwnam and hesiod_getpwuid return NULL and set the
36       global variable errno to indicate the error.
37

ERRORS

39       These calls may fail for any of the reasons the routine  hesiod_resolve
40       may fail.
41

SEE ALSO

43       hesiod(3)
44
45
46
47                               30 November 1996                      HESIOD(3)
Impressum