144 lines
4.6 KiB
HTML
144 lines
4.6 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<html>
|
|
<head>
|
|
<meta name="generator" content="HTML Tidy, see www.w3.org">
|
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
|
<link type="text/css" rel="stylesheet" href="style.css"><!-- Generated by The Open Group's rhtm tool v1.2.1 -->
|
|
<!-- Copyright (c) 2001 The Open Group, All Rights Reserved -->
|
|
<title><pwd.h></title>
|
|
</head>
|
|
<body bgcolor="white">
|
|
<script type="text/javascript" language="JavaScript" src="../jscript/codes.js">
|
|
</script>
|
|
|
|
<basefont size="3"> <a name="<pwd.h>"></a> <a name="tag_13_37"></a><!-- <pwd.h> -->
|
|
<!--header start-->
|
|
<center><font size="2">The Open Group Base Specifications Issue 6<br>
|
|
IEEE Std 1003.1-2001<br>
|
|
Copyright © 2001 The IEEE and The Open Group, All Rights reserved.</font></center>
|
|
|
|
<!--header end-->
|
|
<hr size="2" noshade>
|
|
<h4><a name="tag_13_37_01"></a>NAME</h4>
|
|
|
|
<blockquote>pwd.h - password structure</blockquote>
|
|
|
|
<h4><a name="tag_13_37_02"></a>SYNOPSIS</h4>
|
|
|
|
<blockquote class="synopsis">
|
|
<p><tt>#include <pwd.h></tt></p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_13_37_03"></a>DESCRIPTION</h4>
|
|
|
|
<blockquote>
|
|
<p>The <i><pwd.h></i> header shall provide a definition for <b>struct passwd</b>, which shall include at least the following
|
|
members:</p>
|
|
|
|
<pre>
|
|
<tt>char *pw_name </tt> User's login name. <tt>
|
|
uid_t pw_uid </tt> Numerical user ID. <tt>
|
|
gid_t pw_gid </tt> Numerical group ID. <tt>
|
|
char *pw_dir </tt> Initial working directory. <tt>
|
|
char *pw_shell </tt> Program to use as shell. <tt>
|
|
</tt>
|
|
</pre>
|
|
|
|
<p>The <b>gid_t</b> and <b>uid_t</b> types shall be defined as described in <a href=
|
|
"sys/types.h.html"><i><sys/types.h></i></a> .</p>
|
|
|
|
<p>The following shall be declared as functions and may also be defined as macros. Function prototypes shall be provided.</p>
|
|
|
|
<pre>
|
|
<tt>struct passwd *getpwnam(const char *);
|
|
struct passwd *getpwuid(uid_t);
|
|
<sup>[<a href="javascript:open_code('TSF')">TSF</a>]</sup><img src="../images/opt-start.gif" alt="[Option Start]" border="0">
|
|
int getpwnam_r(const char *, struct passwd *, char *,
|
|
size_t, struct passwd **);
|
|
int getpwuid_r(uid_t, struct passwd *, char *,
|
|
size_t, struct passwd **);
|
|
<img src="../images/opt-end.gif" alt="[Option End]" border="0">
|
|
<sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup><img src="../images/opt-start.gif" alt="[Option Start]" border="0">
|
|
void endpwent(void);
|
|
struct passwd *getpwent(void);
|
|
void setpwent(void);
|
|
<img src="../images/opt-end.gif" alt="[Option End]" border="0">
|
|
</tt>
|
|
</pre>
|
|
</blockquote>
|
|
|
|
<hr>
|
|
<div class="box"><em>The following sections are informative.</em></div>
|
|
|
|
<h4><a name="tag_13_37_04"></a>APPLICATION USAGE</h4>
|
|
|
|
<blockquote>
|
|
<p>None.</p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_13_37_05"></a>RATIONALE</h4>
|
|
|
|
<blockquote>
|
|
<p>None.</p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_13_37_06"></a>FUTURE DIRECTIONS</h4>
|
|
|
|
<blockquote>
|
|
<p>None.</p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_13_37_07"></a>SEE ALSO</h4>
|
|
|
|
<blockquote>
|
|
<p><a href="sys/types.h.html"><i><sys/types.h></i></a> , the System Interfaces volume of IEEE Std 1003.1-2001, <a
|
|
href="../functions/endpwent.html"><i>endpwent</i>()</a>, <a href="../functions/getpwnam.html"><i>getpwnam</i>()</a>, <a href=
|
|
"../functions/getpwuid.html"><i>getpwuid</i>()</a></p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_13_37_08"></a>CHANGE HISTORY</h4>
|
|
|
|
<blockquote>
|
|
<p>First released in Issue 1.</p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_13_37_09"></a>Issue 5</h4>
|
|
|
|
<blockquote>
|
|
<p>The DESCRIPTION is updated for alignment with the POSIX Threads Extension.</p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_13_37_10"></a>Issue 6</h4>
|
|
|
|
<blockquote>
|
|
<p>The following new requirements on POSIX implementations derive from alignment with the Single UNIX Specification:</p>
|
|
|
|
<ul>
|
|
<li>
|
|
<p>The <b>gid_t</b> and <b>uid_t</b> types are mandated.</p>
|
|
</li>
|
|
|
|
<li>
|
|
<p>The <a href="../functions/getpwnam_r.html"><i>getpwnam_r</i>()</a> and <a href=
|
|
"../functions/getpwuid_r.html"><i>getpwuid_r</i>()</a> functions are marked as part of the Thread-Safe Functions option.</p>
|
|
</li>
|
|
</ul>
|
|
</blockquote>
|
|
|
|
<div class="box"><em>End of informative text.</em></div>
|
|
|
|
<hr>
|
|
<hr size="2" noshade>
|
|
<center><font size="2"><!--footer start-->
|
|
UNIX ® is a registered Trademark of The Open Group.<br>
|
|
POSIX ® is a registered Trademark of The IEEE.<br>
|
|
[ <a href="../mindex.html">Main Index</a> | <a href="../basedefs/contents.html">XBD</a> | <a href=
|
|
"../utilities/contents.html">XCU</a> | <a href="../functions/contents.html">XSH</a> | <a href="../xrat/contents.html">XRAT</a>
|
|
]</font></center>
|
|
|
|
<!--footer end-->
|
|
<hr size="2" noshade>
|
|
</body>
|
|
</html>
|
|
|