1 /*- 2 * Copyright (c) 1989, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * %sccs.include.redist.c% 6 * 7 * @(#)pwd.h 8.1 (Berkeley) 06/02/93 8 */ 9 10 #ifndef _PWD_H_ 11 #define _PWD_H_ 12 13 #include <sys/types.h> 14 15 #ifndef _POSIX_SOURCE 16 #define _PATH_PASSWD "/etc/passwd" 17 #define _PATH_MASTERPASSWD "/etc/master.passwd" 18 19 #define _PATH_MP_DB "/etc/pwd.db" 20 #define _PATH_SMP_DB "/etc/spwd.db" 21 22 #define _PATH_PWD_MKDB "/usr/sbin/pwd_mkdb" 23 24 #define _PW_KEYBYNAME '1' /* stored by name */ 25 #define _PW_KEYBYNUM '2' /* stored by entry in the "file" */ 26 #define _PW_KEYBYUID '3' /* stored by uid */ 27 28 #define _PASSWORD_EFMT1 '_' /* extended encryption format */ 29 30 #define _PASSWORD_LEN 128 /* max length, not counting NULL */ 31 #endif 32 33 struct passwd { 34 char *pw_name; /* user name */ 35 char *pw_passwd; /* encrypted password */ 36 int pw_uid; /* user uid */ 37 int pw_gid; /* user gid */ 38 time_t pw_change; /* password change time */ 39 char *pw_class; /* user access class */ 40 char *pw_gecos; /* Honeywell login info */ 41 char *pw_dir; /* home directory */ 42 char *pw_shell; /* default shell */ 43 time_t pw_expire; /* account expiration */ 44 }; 45 46 #include <sys/cdefs.h> 47 48 __BEGIN_DECLS 49 struct passwd *getpwuid __P((uid_t)); 50 struct passwd *getpwnam __P((const char *)); 51 #ifndef _POSIX_SOURCE 52 struct passwd *getpwent __P((void)); 53 int setpassent __P((int)); 54 int setpwent __P((void)); 55 void endpwent __P((void)); 56 #endif 57 __END_DECLS 58 59 #endif /* !_PWD_H_ */ 60