Search
lxdream.org :: lxdream/test/include/pwd.h :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename test/include/pwd.h
changeset 185:6755a04c447f
author nkeynes
date Wed Aug 02 04:13:15 2006 +0000 (17 years ago)
permissions -rw-r--r--
last change Add many more TA test cases (a couple of corner cases aren't 100% correct
yet, TBA)
Add new test "testregs" to check register masks (currently just PVR registers)
file annotate diff log raw
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/test/include/pwd.h Wed Aug 02 04:13:15 2006 +0000
1.3 @@ -0,0 +1,76 @@
1.4 +/*-
1.5 + * Copyright (c) 1989 The Regents of the University of California.
1.6 + * All rights reserved.
1.7 + *
1.8 + * Redistribution and use in source and binary forms, with or without
1.9 + * modification, are permitted provided that the following conditions
1.10 + * are met:
1.11 + * 1. Redistributions of source code must retain the above copyright
1.12 + * notice, this list of conditions and the following disclaimer.
1.13 + * 2. Redistributions in binary form must reproduce the above copyright
1.14 + * notice, this list of conditions and the following disclaimer in the
1.15 + * documentation and/or other materials provided with the distribution.
1.16 + * 3. All advertising materials mentioning features or use of this software
1.17 + * must display the following acknowledgement:
1.18 + * This product includes software developed by the University of
1.19 + * California, Berkeley and its contributors.
1.20 + * 4. Neither the name of the University nor the names of its contributors
1.21 + * may be used to endorse or promote products derived from this software
1.22 + * without specific prior written permission.
1.23 + *
1.24 + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
1.25 + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1.26 + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
1.27 + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
1.28 + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1.29 + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
1.30 + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
1.31 + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
1.32 + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
1.33 + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
1.34 + * SUCH DAMAGE.
1.35 + *
1.36 + * @(#)pwd.h 5.13 (Berkeley) 5/28/91
1.37 + */
1.38 +
1.39 +#ifndef _PWD_H_
1.40 +#ifdef __cplusplus
1.41 +extern "C" {
1.42 +#endif
1.43 +#define _PWD_H_
1.44 +
1.45 +#include <sys/types.h>
1.46 +
1.47 +#ifndef _POSIX_SOURCE
1.48 +#define _PATH_PASSWD "/etc/passwd"
1.49 +
1.50 +#define _PASSWORD_LEN 128 /* max length, not counting NULL */
1.51 +#endif
1.52 +
1.53 +struct passwd {
1.54 + char *pw_name; /* user name */
1.55 + char *pw_passwd; /* encrypted password */
1.56 + int pw_uid; /* user uid */
1.57 + int pw_gid; /* user gid */
1.58 + char *pw_comment; /* comment */
1.59 + char *pw_gecos; /* Honeywell login info */
1.60 + char *pw_dir; /* home directory */
1.61 + char *pw_shell; /* default shell */
1.62 +};
1.63 +
1.64 +struct passwd *getpwuid (uid_t);
1.65 +struct passwd *getpwnam (const char *);
1.66 +int getpwnam_r (const char *, struct passwd *,
1.67 + char *, size_t , struct passwd **);
1.68 +int getpwuid_r (uid_t, struct passwd *, char *,
1.69 + size_t, struct passwd **);
1.70 +#ifndef _POSIX_SOURCE
1.71 +struct passwd *getpwent (void);
1.72 +void setpwent (void);
1.73 +void endpwent (void);
1.74 +#endif
1.75 +
1.76 +#ifdef __cplusplus
1.77 +}
1.78 +#endif
1.79 +#endif /* _PWD_H_ */
.