/
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-service-name.html
(4535B)
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>4.2. Choice of a service name</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-library-calls.html" title="4.1. Care about standard library calls"><link rel="next" href="adg-security-conv-function.html" title="4.3. The conversation function"></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.2. Choice of a service name</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="adg-security-library-calls.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-conv-function.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-service-name"></a>4.2. Choice of a service name</h2></div></div></div><p> When picking the <span class="emphasis"><em>service-name</em></span> that corresponds to the first entry in the <span class="emphasis"><em>Linux-PAM</em></span> configuration file, the application programmer should <span class="emphasis"><em>avoid</em></span> the temptation of choosing something related to <code class="varname">argv[0]</code>. It is a trivial matter for any user to invoke any application on a system under a different name and this should not be permitted to cause a security breach. </p><p> In general, this is always the right advice if the program is setuid, or otherwise more privileged than the user that invokes it. In some cases, avoiding this advice is convenient, but as an author of such an application, you should consider well the ways in which your program will be installed and used. (Its often the case that programs are not intended to be setuid, but end up being installed that way for convenience. If your program falls into this category, don't fall into the trap of making this mistake.) </p><p> To invoke some <span class="emphasis"><em>target</em></span> application by another name, the user may symbolically link the target application with the desired name. To be precise all the user need do is, <span class="command"><strong>ln -s /target/application ./preferred_name</strong></span> and then run <span class="command"><strong>./preferred_name</strong></span>. </p><p> By studying the <span class="emphasis"><em>Linux-PAM</em></span> configuration file(s), an attacker can choose the <span class="command"><strong>preferred_name</strong></span> to be that of a service enjoying minimal protection; for example a game which uses <span class="emphasis"><em>Linux-PAM</em></span> to restrict access to certain hours of the day. If the service-name were to be linked to the filename under which the service was invoked, it is clear that the user is effectively in the position of dictating which authentication scheme the service uses. Needless to say, this is not a secure situation. </p><p> The conclusion is that the application developer should carefully define the service-name of an application. The safest thing is to make it a single hard-wired name. </p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="adg-security-library-calls.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-conv-function.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">4.1. Care about standard library calls </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.3. The conversation function</td></tr></table></div></body></html>
Save
cmd:
run