os/ossrv/genericopenlibs/cstdlib/LINC/PWD.H
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200
changeset 0 bde4ae8d615e
permissions -rw-r--r--
First public contribution.
sl@0
     1
/* PWD.H
sl@0
     2
 * 
sl@0
     3
 * Portions Copyright (c) 1997-1999 Nokia Corporation and/or its subsidiary(-ies).
sl@0
     4
 * All rights reserved.
sl@0
     5
 */
sl@0
     6
sl@0
     7
/*-
sl@0
     8
 * Copyright (c) 1989 The Regents of the University of California.
sl@0
     9
 * All rights reserved.
sl@0
    10
 *
sl@0
    11
 * Redistribution and use in source and binary forms, with or without
sl@0
    12
 * modification, are permitted provided that the following conditions
sl@0
    13
 * are met:
sl@0
    14
 * 1. Redistributions of source code must retain the above copyright
sl@0
    15
 *    notice, this list of conditions and the following disclaimer.
sl@0
    16
 * 2. Redistributions in binary form must reproduce the above copyright
sl@0
    17
 *    notice, this list of conditions and the following disclaimer in the
sl@0
    18
 *    documentation and/or other materials provided with the distribution.
sl@0
    19
 * 3. All advertising materials mentioning features or use of this software
sl@0
    20
 *    must display the following acknowledgement:
sl@0
    21
 *	This product includes software developed by the University of
sl@0
    22
 *	California, Berkeley and its contributors.
sl@0
    23
 * 4. Neither the name of the University nor the names of its contributors
sl@0
    24
 *    may be used to endorse or promote products derived from this software
sl@0
    25
 *    without specific prior written permission.
sl@0
    26
 *
sl@0
    27
 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
sl@0
    28
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
sl@0
    29
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
sl@0
    30
 * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
sl@0
    31
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
sl@0
    32
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
sl@0
    33
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
sl@0
    34
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
sl@0
    35
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
sl@0
    36
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
sl@0
    37
 * SUCH DAMAGE.
sl@0
    38
 *
sl@0
    39
 *	@(#)pwd.h	5.13 (Berkeley) 5/28/91
sl@0
    40
 */
sl@0
    41
sl@0
    42
/** @file
sl@0
    43
@publishedAll
sl@0
    44
@released
sl@0
    45
*/
sl@0
    46
sl@0
    47
#ifndef _PWD_H_
sl@0
    48
#ifdef __cplusplus
sl@0
    49
extern "C" {
sl@0
    50
#endif
sl@0
    51
#define	_PWD_H_
sl@0
    52
sl@0
    53
#include <sys/types.h>
sl@0
    54
sl@0
    55
#ifndef _POSIX_SOURCE
sl@0
    56
#define	_PATH_PASSWD		"/etc/passwd"
sl@0
    57
/** max length, not counting NULL
sl@0
    58
 */
sl@0
    59
#define	_PASSWORD_LEN		128
sl@0
    60
#endif
sl@0
    61
sl@0
    62
/** password
sl@0
    63
*/
sl@0
    64
struct passwd {
sl@0
    65
	/**	user name
sl@0
    66
	*/
sl@0
    67
	char	*pw_name;	
sl@0
    68
	
sl@0
    69
	/** encrypted password
sl@0
    70
	 */	
sl@0
    71
	char	*pw_passwd;		
sl@0
    72
sl@0
    73
	/** user uid
sl@0
    74
	 */
sl@0
    75
	int	pw_uid;			
sl@0
    76
sl@0
    77
	/** user gid 
sl@0
    78
	*/
sl@0
    79
	int	pw_gid;		
sl@0
    80
	
sl@0
    81
	/**	comment
sl@0
    82
	*/
sl@0
    83
	char	*pw_comment;	
sl@0
    84
	
sl@0
    85
	/** Honeywell login info 
sl@0
    86
	*/	
sl@0
    87
	char	*pw_gecos;		
sl@0
    88
	
sl@0
    89
	/**	home directory 
sl@0
    90
	*/
sl@0
    91
	char	*pw_dir;	
sl@0
    92
sl@0
    93
	/** default shell 
sl@0
    94
	*/
sl@0
    95
	char	*pw_shell;		
sl@0
    96
};
sl@0
    97
sl@0
    98
extern struct passwd	*getpwuid (uid_t);
sl@0
    99
extern struct passwd	*getpwnam (const char *);
sl@0
   100
#ifndef _POSIX_SOURCE
sl@0
   101
extern struct passwd	*getpwent (void);
sl@0
   102
extern void		 setpwent (void);
sl@0
   103
extern void		 endpwent (void);
sl@0
   104
#endif
sl@0
   105
sl@0
   106
#ifdef __cplusplus
sl@0
   107
}
sl@0
   108
#endif
sl@0
   109
#endif /* _PWD_H_ */