1 .\" $Id: hesiod_getpwnam.3,v 1.1 1996/12/08 21:38:24 ghudson Exp $
3 .\" Copyright 1996 by the Massachusetts Institute of Technology.
5 .\" Permission to use, copy, modify, and distribute this
6 .\" software and its documentation for any purpose and without
7 .\" fee is hereby granted, provided that the above copyright
8 .\" notice appear in all copies and that both that copyright
9 .\" notice and this permission notice appear in supporting
10 .\" documentation, and that the name of M.I.T. not be used in
11 .\" advertising or publicity pertaining to distribution of the
12 .\" software without specific, written prior permission.
13 .\" M.I.T. makes no representations about the suitability of
14 .\" this software for any purpose. It is provided "as is"
15 .\" without express or implied warranty.
17 .TH HESIOD 3 "30 November 1996"
19 hesiod_getpwnam, hesiod_getpwuid, hesiod_free_passwd \- Hesiod functions for retrieving passwd information
22 .B #include <hesiod.h>
24 .B struct passwd *hesiod_getpwnam(void *\fIcontext\fP, const char *\fIname\fP)
25 .B struct passwd *hesiod_getpwuid(void *\fIcontext\fP, uid_t \fIuid\fP)
26 .B void hesiod_free_passwd(void *\fIcontext\fP, struct passwd *\fIpw\fP)
28 .B cc file.c \-lhesiod
31 This family of functions allows you to retrieve passwd database
32 information using Hesiod. To perform lookups, you need an initialized
33 Hesiod context; see hesiod(3) for details. You may look up passwd
34 information by name or by uid; information is returned in the same
39 It is the caller's responsibility to call
41 with the returned passwd entry to free the resources used by the
44 Hesiod queries for passwd information are made using the ``passwd'' or
45 ``uid'' Hesiod type, using either the username or the decimal
46 representation of the uid as the Hesiod name. The corresponding
47 records should be a colon-separated list of fields giving the
48 username, encrypted password, uid, gid, GECOS information, home
49 directory, and shell of the user.
55 return NULL and set the global variable
57 to indicate the error.
59 These calls may fail for any of the reasons the routine