/
usr
/
share
/
doc
/
pam-devel
/
html
/
/usr/share/doc/pam-devel/html
mkdir
upload
Name
Size
Mode
Actions
adg-author.html
3098
0644
edit
dl
rm
adg-copyright.html
3624
0644
edit
dl
rm
adg-example.html
3676
0644
edit
dl
rm
adg-files.html
2239
0644
edit
dl
rm
adg-glossary.html
3286
0644
edit
dl
rm
adg-interface-by-app-expected.html
62472
0644
edit
dl
rm
adg-interface-of-app-expected.html
8457
0644
edit
dl
rm
adg-interface-programming-notes.html
2614
0644
edit
dl
rm
adg-interface.html
5019
0644
edit
dl
rm
adg-introduction-description.html
3373
0644
edit
dl
rm
adg-introduction-synopsis.html
2683
0644
edit
dl
rm
adg-introduction.html
2064
0644
edit
dl
rm
adg-libpam-functions.html
13449
0644
edit
dl
rm
adg-libpam_misc.html
3421
0644
edit
dl
rm
adg-overview.html
8357
0644
edit
dl
rm
adg-porting.html
4306
0644
edit
dl
rm
adg-security-conv-function.html
2346
0644
edit
dl
rm
adg-security-library-calls.html
3203
0644
edit
dl
rm
adg-security-resources.html
2903
0644
edit
dl
rm
adg-security-service-name.html
4535
0644
edit
dl
rm
adg-security-user-identity.html
5512
0644
edit
dl
rm
adg-security.html
3824
0644
edit
dl
rm
adg-see-also.html
2214
0644
edit
dl
rm
Linux-PAM_ADG.html
8613
0644
edit
dl
rm
Linux-PAM_MWG.html
8803
0644
edit
dl
rm
mwg-author.html
3075
0644
edit
dl
rm
mwg-copyright.html
3603
0644
edit
dl
rm
mwg-example.html
2005
0644
edit
dl
rm
mwg-expected-by-module-item.html
46457
0644
edit
dl
rm
mwg-expected-by-module-other.html
8352
0644
edit
dl
rm
mwg-expected-by-module.html
4117
0644
edit
dl
rm
mwg-expected-of-module-acct.html
6187
0644
edit
dl
rm
mwg-expected-of-module-auth.html
10968
0644
edit
dl
rm
mwg-expected-of-module-chauthtok.html
7977
0644
edit
dl
rm
mwg-expected-of-module-overview.html
6437
0644
edit
dl
rm
mwg-expected-of-module-session.html
7126
0644
edit
dl
rm
mwg-expected-of-module.html
4374
0644
edit
dl
rm
mwg-introduction-description.html
3971
0644
edit
dl
rm
mwg-introduction-synopsis.html
2028
0644
edit
dl
rm
mwg-introduction.html
2032
0644
edit
dl
rm
mwg-see-also.html
2231
0644
edit
dl
rm
mwg-see-options.html
2996
0644
edit
dl
rm
mwg-see-programming-libs.html
3015
0644
edit
dl
rm
mwg-see-programming-sec.html
9141
0644
edit
dl
rm
mwg-see-programming-syslog.html
4741
0644
edit
dl
rm
mwg-see-programming.html
3078
0644
edit
dl
rm
Edit:
/usr/share/doc/pam-devel/html/adg-security-user-identity.html
(5512B)
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>4.4. The identity of the user</title><meta name="generator" content="DocBook XSL Stylesheets Vsnapshot"><link rel="home" href="Linux-PAM_ADG.html" title="The Linux-PAM Application Developers' Guide"><link rel="up" href="adg-security.html" title="Chapter 4. Security issues of Linux-PAM"><link rel="prev" href="adg-security-conv-function.html" title="4.3. The conversation function"><link rel="next" href="adg-security-resources.html" title="4.5. Sufficient resources"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">4.4. The identity of the user</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="adg-security-conv-function.html">Prev</a> </td><th width="60%" align="center">Chapter 4. Security issues of <span class="emphasis"><em>Linux-PAM</em></span> </th><td width="20%" align="right"> <a accesskey="n" href="adg-security-resources.html">Next</a></td></tr></table><hr></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="adg-security-user-identity"></a>4.4. The identity of the user</h2></div></div></div><p> The <span class="emphasis"><em>Linux-PAM</em></span> modules will need to determine the identity of the user who requests a service, and the identity of the user who grants the service. These two users will seldom be the same. Indeed there is generally a third user identity to be considered, the new (assumed) identity of the user once the service is granted. </p><p> The need for keeping tabs on these identities is clearly an issue of security. One convention that is actively used by some modules is that the identity of the user requesting a service should be the current <span class="emphasis"><em>UID</em></span> (user ID) of the running process; the identity of the privilege granting user is the <span class="emphasis"><em>EUID</em></span> (effective user ID) of the running process; the identity of the user, under whose name the service will be executed, is given by the contents of the <span class="emphasis"><em>PAM_USER</em></span> <span class="citerefentry"><span class="refentrytitle">pam_get_item</span>(3)</span>. Note, modules can change the values of <span class="emphasis"><em>PAM_USER</em></span> and <span class="emphasis"><em>PAM_RUSER</em></span> during any of the <code class="function">pam_*()</code> library calls. For this reason, the application should take care to use the <code class="function">pam_get_item()</code> every time it wishes to establish who the authenticated user is (or will currently be). </p><p> For network-serving databases and other applications that provide their own security model (independent of the OS kernel) the above scheme is insufficient to identify the requesting user. </p><p> A more portable solution to storing the identity of the requesting user is to use the <span class="emphasis"><em>PAM_RUSER</em></span> <span class="citerefentry"><span class="refentrytitle">pam_get_item</span>(3)</span>. The application should supply this value before attempting to authenticate the user with <code class="function">pam_authenticate()</code>. How well this name can be trusted will ultimately be at the discretion of the local administrator (who configures PAM for your application) and a selected module may attempt to override the value where it can obtain more reliable data. If an application is unable to determine the identity of the requesting entity/user, it should not call <span class="citerefentry"><span class="refentrytitle">pam_set_item</span>(3)</span> to set <span class="emphasis"><em>PAM_RUSER</em></span>. </p><p> In addition to the <span class="emphasis"><em>PAM_RUSER</em></span> item, the application should supply the <span class="emphasis"><em>PAM_RHOST</em></span> (<span class="emphasis"><em>requesting host</em></span>) item. As a general rule, the following convention for its value can be assumed: NULL = unknown; localhost = invoked directly from the local system; <span class="emphasis"><em>other.place.xyz</em></span> = some component of the user's connection originates from this remote/requesting host. At present, PAM has no established convention for indicating whether the application supports a trusted path to communication from this host. </p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="adg-security-conv-function.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="adg-security.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="adg-security-resources.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">4.3. The conversation function </td><td width="20%" align="center"><a accesskey="h" href="Linux-PAM_ADG.html">Home</a></td><td width="40%" align="right" valign="top"> 4.5. Sufficient resources</td></tr></table></div></body></html>
Save
cmd:
run