nkeynes@185: /*- nkeynes@185: * Copyright (c) 1989 The Regents of the University of California. nkeynes@185: * All rights reserved. nkeynes@185: * nkeynes@185: * Redistribution and use in source and binary forms, with or without nkeynes@185: * modification, are permitted provided that the following conditions nkeynes@185: * are met: nkeynes@185: * 1. Redistributions of source code must retain the above copyright nkeynes@185: * notice, this list of conditions and the following disclaimer. nkeynes@185: * 2. Redistributions in binary form must reproduce the above copyright nkeynes@185: * notice, this list of conditions and the following disclaimer in the nkeynes@185: * documentation and/or other materials provided with the distribution. nkeynes@185: * 3. All advertising materials mentioning features or use of this software nkeynes@185: * must display the following acknowledgement: nkeynes@185: * This product includes software developed by the University of nkeynes@185: * California, Berkeley and its contributors. nkeynes@185: * 4. Neither the name of the University nor the names of its contributors nkeynes@185: * may be used to endorse or promote products derived from this software nkeynes@185: * without specific prior written permission. nkeynes@185: * nkeynes@185: * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND nkeynes@185: * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE nkeynes@185: * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE nkeynes@185: * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE nkeynes@185: * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL nkeynes@185: * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS nkeynes@185: * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) nkeynes@185: * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT nkeynes@185: * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY nkeynes@185: * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF nkeynes@185: * SUCH DAMAGE. nkeynes@185: * nkeynes@185: * @(#)pwd.h 5.13 (Berkeley) 5/28/91 nkeynes@185: */ nkeynes@185: nkeynes@185: #ifndef _PWD_H_ nkeynes@185: #ifdef __cplusplus nkeynes@185: extern "C" { nkeynes@185: #endif nkeynes@185: #define _PWD_H_ nkeynes@185: nkeynes@185: #include nkeynes@185: nkeynes@185: #ifndef _POSIX_SOURCE nkeynes@185: #define _PATH_PASSWD "/etc/passwd" nkeynes@185: nkeynes@185: #define _PASSWORD_LEN 128 /* max length, not counting NULL */ nkeynes@185: #endif nkeynes@185: nkeynes@185: struct passwd { nkeynes@185: char *pw_name; /* user name */ nkeynes@185: char *pw_passwd; /* encrypted password */ nkeynes@185: int pw_uid; /* user uid */ nkeynes@185: int pw_gid; /* user gid */ nkeynes@185: char *pw_comment; /* comment */ nkeynes@185: char *pw_gecos; /* Honeywell login info */ nkeynes@185: char *pw_dir; /* home directory */ nkeynes@185: char *pw_shell; /* default shell */ nkeynes@185: }; nkeynes@185: nkeynes@185: struct passwd *getpwuid (uid_t); nkeynes@185: struct passwd *getpwnam (const char *); nkeynes@185: int getpwnam_r (const char *, struct passwd *, nkeynes@185: char *, size_t , struct passwd **); nkeynes@185: int getpwuid_r (uid_t, struct passwd *, char *, nkeynes@185: size_t, struct passwd **); nkeynes@185: #ifndef _POSIX_SOURCE nkeynes@185: struct passwd *getpwent (void); nkeynes@185: void setpwent (void); nkeynes@185: void endpwent (void); nkeynes@185: #endif nkeynes@185: nkeynes@185: #ifdef __cplusplus nkeynes@185: } nkeynes@185: #endif nkeynes@185: #endif /* _PWD_H_ */