1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/ossrv/genericopenlibs/cstdlib/LINC/PWD.H Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,109 @@
1.4 +/* PWD.H
1.5 + *
1.6 + * Portions Copyright (c) 1997-1999 Nokia Corporation and/or its subsidiary(-ies).
1.7 + * All rights reserved.
1.8 + */
1.9 +
1.10 +/*-
1.11 + * Copyright (c) 1989 The Regents of the University of California.
1.12 + * All rights reserved.
1.13 + *
1.14 + * Redistribution and use in source and binary forms, with or without
1.15 + * modification, are permitted provided that the following conditions
1.16 + * are met:
1.17 + * 1. Redistributions of source code must retain the above copyright
1.18 + * notice, this list of conditions and the following disclaimer.
1.19 + * 2. Redistributions in binary form must reproduce the above copyright
1.20 + * notice, this list of conditions and the following disclaimer in the
1.21 + * documentation and/or other materials provided with the distribution.
1.22 + * 3. All advertising materials mentioning features or use of this software
1.23 + * must display the following acknowledgement:
1.24 + * This product includes software developed by the University of
1.25 + * California, Berkeley and its contributors.
1.26 + * 4. Neither the name of the University nor the names of its contributors
1.27 + * may be used to endorse or promote products derived from this software
1.28 + * without specific prior written permission.
1.29 + *
1.30 + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
1.31 + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1.32 + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
1.33 + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
1.34 + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1.35 + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
1.36 + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
1.37 + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
1.38 + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
1.39 + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
1.40 + * SUCH DAMAGE.
1.41 + *
1.42 + * @(#)pwd.h 5.13 (Berkeley) 5/28/91
1.43 + */
1.44 +
1.45 +/** @file
1.46 +@publishedAll
1.47 +@released
1.48 +*/
1.49 +
1.50 +#ifndef _PWD_H_
1.51 +#ifdef __cplusplus
1.52 +extern "C" {
1.53 +#endif
1.54 +#define _PWD_H_
1.55 +
1.56 +#include <sys/types.h>
1.57 +
1.58 +#ifndef _POSIX_SOURCE
1.59 +#define _PATH_PASSWD "/etc/passwd"
1.60 +/** max length, not counting NULL
1.61 + */
1.62 +#define _PASSWORD_LEN 128
1.63 +#endif
1.64 +
1.65 +/** password
1.66 +*/
1.67 +struct passwd {
1.68 + /** user name
1.69 + */
1.70 + char *pw_name;
1.71 +
1.72 + /** encrypted password
1.73 + */
1.74 + char *pw_passwd;
1.75 +
1.76 + /** user uid
1.77 + */
1.78 + int pw_uid;
1.79 +
1.80 + /** user gid
1.81 + */
1.82 + int pw_gid;
1.83 +
1.84 + /** comment
1.85 + */
1.86 + char *pw_comment;
1.87 +
1.88 + /** Honeywell login info
1.89 + */
1.90 + char *pw_gecos;
1.91 +
1.92 + /** home directory
1.93 + */
1.94 + char *pw_dir;
1.95 +
1.96 + /** default shell
1.97 + */
1.98 + char *pw_shell;
1.99 +};
1.100 +
1.101 +extern struct passwd *getpwuid (uid_t);
1.102 +extern struct passwd *getpwnam (const char *);
1.103 +#ifndef _POSIX_SOURCE
1.104 +extern struct passwd *getpwent (void);
1.105 +extern void setpwent (void);
1.106 +extern void endpwent (void);
1.107 +#endif
1.108 +
1.109 +#ifdef __cplusplus
1.110 +}
1.111 +#endif
1.112 +#endif /* _PWD_H_ */