Search
lxdream.org :: lxdream/test/include/pwd.h
lxdream 0.9.1
released Jun 29
Download Now
filename test/include/pwd.h
changeset 185:6755a04c447f
author nkeynes
date Tue Jul 11 01:35:27 2006 +0000 (17 years ago)
permissions -rw-r--r--
last change First commit of system test framework. 3 initial test cases (incomplete):
testide, testmath, and testta
file annotate diff log raw
nkeynes@185
     1
/*-
nkeynes@185
     2
 * Copyright (c) 1989 The Regents of the University of California.
nkeynes@185
     3
 * All rights reserved.
nkeynes@185
     4
 *
nkeynes@185
     5
 * Redistribution and use in source and binary forms, with or without
nkeynes@185
     6
 * modification, are permitted provided that the following conditions
nkeynes@185
     7
 * are met:
nkeynes@185
     8
 * 1. Redistributions of source code must retain the above copyright
nkeynes@185
     9
 *    notice, this list of conditions and the following disclaimer.
nkeynes@185
    10
 * 2. Redistributions in binary form must reproduce the above copyright
nkeynes@185
    11
 *    notice, this list of conditions and the following disclaimer in the
nkeynes@185
    12
 *    documentation and/or other materials provided with the distribution.
nkeynes@185
    13
 * 3. All advertising materials mentioning features or use of this software
nkeynes@185
    14
 *    must display the following acknowledgement:
nkeynes@185
    15
 *	This product includes software developed by the University of
nkeynes@185
    16
 *	California, Berkeley and its contributors.
nkeynes@185
    17
 * 4. Neither the name of the University nor the names of its contributors
nkeynes@185
    18
 *    may be used to endorse or promote products derived from this software
nkeynes@185
    19
 *    without specific prior written permission.
nkeynes@185
    20
 *
nkeynes@185
    21
 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
nkeynes@185
    22
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
nkeynes@185
    23
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
nkeynes@185
    24
 * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
nkeynes@185
    25
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
nkeynes@185
    26
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
nkeynes@185
    27
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
nkeynes@185
    28
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
nkeynes@185
    29
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
nkeynes@185
    30
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
nkeynes@185
    31
 * SUCH DAMAGE.
nkeynes@185
    32
 *
nkeynes@185
    33
 *	@(#)pwd.h	5.13 (Berkeley) 5/28/91
nkeynes@185
    34
 */
nkeynes@185
    35
nkeynes@185
    36
#ifndef _PWD_H_
nkeynes@185
    37
#ifdef __cplusplus
nkeynes@185
    38
extern "C" {
nkeynes@185
    39
#endif
nkeynes@185
    40
#define	_PWD_H_
nkeynes@185
    41
nkeynes@185
    42
#include <sys/types.h>
nkeynes@185
    43
nkeynes@185
    44
#ifndef _POSIX_SOURCE
nkeynes@185
    45
#define	_PATH_PASSWD		"/etc/passwd"
nkeynes@185
    46
nkeynes@185
    47
#define	_PASSWORD_LEN		128	/* max length, not counting NULL */
nkeynes@185
    48
#endif
nkeynes@185
    49
nkeynes@185
    50
struct passwd {
nkeynes@185
    51
	char	*pw_name;		/* user name */
nkeynes@185
    52
	char	*pw_passwd;		/* encrypted password */
nkeynes@185
    53
	int	pw_uid;			/* user uid */
nkeynes@185
    54
	int	pw_gid;			/* user gid */
nkeynes@185
    55
	char	*pw_comment;		/* comment */
nkeynes@185
    56
	char	*pw_gecos;		/* Honeywell login info */
nkeynes@185
    57
	char	*pw_dir;		/* home directory */
nkeynes@185
    58
	char	*pw_shell;		/* default shell */
nkeynes@185
    59
};
nkeynes@185
    60
nkeynes@185
    61
struct passwd	*getpwuid (uid_t);
nkeynes@185
    62
struct passwd	*getpwnam (const char *);
nkeynes@185
    63
int 		 getpwnam_r (const char *, struct passwd *,
nkeynes@185
    64
			char *, size_t , struct passwd **);
nkeynes@185
    65
int		 getpwuid_r (uid_t, struct passwd *, char *,
nkeynes@185
    66
			size_t, struct passwd **);
nkeynes@185
    67
#ifndef _POSIX_SOURCE
nkeynes@185
    68
struct passwd	*getpwent (void);
nkeynes@185
    69
void		 setpwent (void);
nkeynes@185
    70
void		 endpwent (void);
nkeynes@185
    71
#endif
nkeynes@185
    72
nkeynes@185
    73
#ifdef __cplusplus
nkeynes@185
    74
}
nkeynes@185
    75
#endif
nkeynes@185
    76
#endif /* _PWD_H_ */
.