diff options
author | Thorsten Kukuk <kukuk@thkukuk.de> | 2006-06-09 16:44:06 +0000 |
---|---|---|
committer | Thorsten Kukuk <kukuk@thkukuk.de> | 2006-06-09 16:44:06 +0000 |
commit | 393585017d45cf174384530f57cb8bc5cec1b457 (patch) | |
tree | 3985421a45d437485de6eee26026beb3cecefbd1 /modules/pam_xauth | |
parent | deda060dfbfb989de28235617fc3a9149aaee1e3 (diff) | |
download | pam-393585017d45cf174384530f57cb8bc5cec1b457.tar.gz pam-393585017d45cf174384530f57cb8bc5cec1b457.tar.bz2 pam-393585017d45cf174384530f57cb8bc5cec1b457.zip |
Relevant BUGIDs:
Purpose of commit: new feature
Commit summary:
---------------
2006-06-09 Thorsten Kukuk <kukuk@thkukuk.de>
* modules/pam_wheel/Makefile.am: Include Make.xml.rules.
* modules/pam_wheel/pam_wheel.8.xml: New.
* modules/pam_wheel/pam_wheel.8: New, generated from xml file.
* modules/pam_wheel/README.xml: New.
* modules/pam_wheel/README: Regenerated from xml file.
* modules/pam_xauth/Makefile.am: Include Make.xml.rules.
* modules/pam_xauth/pam_xauth.8.xml: New.
* modules/pam_xauth/pam_xauth.8: Regenerated from xml file.
* modules/pam_xauth/README.xml: New.
* modules/pam_xauth/README: Regenerated from xml file.
* modules/pam_deny/pam_deny.8.xml: Fix syntax errors.
* modules/pam_deny/pam_deny.8: Regenerate from xml file.
* modules/pam_deny/README: Likewise.
* modules/pam_warn/Makefile.am: Include Make.xml.rules.
* modules/pam_warn/pam_warn.8.xml: New.
* modules/pam_warn/pam_warn.8: New, generated from xml file.
* modules/pam_warn/README.xml: New.
* modules/pam_warn/README: Regenerated from xml file.
* modules/pam_userdb/Makefile.am: Include Make.xml.rules.
* modules/pam_userdb/pam_userdb.8.xml: New.
* modules/pam_userdb/pam_userdb.8: New, generated from xml file.
* modules/pam_userdb/README.xml: New.
* modules/pam_userdb/README: Regenerated from xml file.
Diffstat (limited to 'modules/pam_xauth')
-rw-r--r-- | modules/pam_xauth/Makefile.am | 12 | ||||
-rw-r--r-- | modules/pam_xauth/README | 132 | ||||
-rw-r--r-- | modules/pam_xauth/README.xml | 46 | ||||
-rw-r--r-- | modules/pam_xauth/pam_xauth.8 | 216 | ||||
-rw-r--r-- | modules/pam_xauth/pam_xauth.8.xml | 293 |
5 files changed, 576 insertions, 123 deletions
diff --git a/modules/pam_xauth/Makefile.am b/modules/pam_xauth/Makefile.am index 78ff1d78..8f1d56b0 100644 --- a/modules/pam_xauth/Makefile.am +++ b/modules/pam_xauth/Makefile.am @@ -4,9 +4,10 @@ CLEANFILES = *~ -man_MANS = pam_xauth.8 +EXTRA_DIST = README ${MANS} $(XMLS) tst-pam_xauth -EXTRA_DIST = README ${MANS} tst-pam_xauth +man_MANS = pam_xauth.8 +XMLS = README.xml pam_xauth.8.xml TESTS = tst-pam_xauth @@ -21,3 +22,10 @@ if HAVE_VERSIONING endif securelib_LTLIBRARIES = pam_xauth.la + +if ENABLE_REGENERATE_MAN +noinst_DATA = README +README: pam_xauth.8.xml +-include $(top_srcdir)/Make.xml.rules +endif + diff --git a/modules/pam_xauth/README b/modules/pam_xauth/README index 97916b8f..1e134d70 100644 --- a/modules/pam_xauth/README +++ b/modules/pam_xauth/README @@ -1,42 +1,90 @@ -pam_xauth: - Forward xauth cookies from user to user, normally used by su, sudo, or - userhelper. - - Primitive access control is provided by ~/.xauth/export in the invoking - user's home directory and ~/.xauth/import in the target user's home - directory. - - If a user has a ~/.xauth/import file, the user will only receive cookies - from users listed in the file. If there is no ~/.xauth/import file, - the user will accept cookies from any other user. - - If a user has a .xauth/export file, the user will only forward cookies - to users listed in the file. If there is no ~/.xauth/export file, and - the invoking user is not "root", the user will forward cookies to - any other user. If there is no ~/.xauth/export file, and the invoking - user is "root", the user will NOT forward cookies to other users. - - Both the import and export files support wildcards (such as "*"). Both - the import and export files can be empty, signifying that no users are - allowed. - -RECOGNIZED ARGUMENTS: - debug write debugging messages to syslog - xauthpath= the path to the xauth program, by default - /usr/X11R6/bin/xauth, /usr/bin/xauth and - /usr/bin/X11/xauth - systemuser= highest user id assigned to system users, defaults - to 499 (pam_xauth will refuse to forward creds to - target users with id equal to or below this number, - except for root and possibly another specified user) - targetuser= a target user id which is excepted from the systemuser - checks - - -MODULE SERVICES PROVIDED: - session open session copies xauth cookie to new user - close session deletes copied xauth cookie - -AUTHOR: - Nalin Dahyabhai <nalin@redhat.com>, based on original version by - Michael K. Johnson <johnsonm@redhat.com> +pam_xauth — PAM module to forward xauth keys between users + +━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ + +DESCRIPTION + +The pam_xauth PAM module is designed to forward xauth keys (sometimes referred +to as "cookies") between users. + +Without pam_xauth, when xauth is enabled and a user uses the su(1) command to +assume another user's priviledges, that user is no longer able to access the +original user's X display because the new user does not have the key needed to +access the display. pam_xauth solves the problem by forwarding the key from the +user running su (the source user) to the user whose identity the source user is +assuming (the target user) when the session is created, and destroying the key +when the session is torn down. + +This means, for example, that when you run su(1) from an xterm sesssion, you +will be able to run X programs without explicitly dealing with the xauth(1) +xauth command or ~/.Xauthority files. + +pam_xauth will only forward keys if xauth can list a key connected to the +$DISPLAY environment variable. + +Primitive access control is provided by ~/.xauth/export in the invoking user's +home directory and ~/.xauth/import in the target user's home directory. + +If a user has a ~/.xauth/import file, the user will only receive cookies from +users listed in the file. If there is no ~/.xauth/import file, the user will +accept cookies from any other user. + +If a user has a .xauth/export file, the user will only forward cookies to users +listed in the file. If there is no ~/.xauth/export file, and the invoking user +is not root, the user will forward cookies to any other user. If there is no ~ +/.xauth/export file, and the invoking user is root, the user will not forward +cookies to other users. + +Both the import and export files support wildcards (such as *). Both the import +and export files can be empty, signifying that no users are allowed. + +OPTIONS + +debug + + Print debug information. + +xauthpath=/path/to/xauth + + Specify the path the xauth program (it is expected in /usr/X11R6/bin/xauth, + /usr/bin/xauth, or /usr/bin/X11/xauth by default). + +systemuser=UID + + Specify the highest UID which will be assumed to belong to a "system" user. + pam_xauth will refuse to forward credentials to users with UID less than or + equal to this number, except for root and the "targetuser", if specified. + +targetuser=UID + + Specify a single target UID which is exempt from the systemuser check. + +EXAMPLES + +Add the following line to /etc/pam.d/su to forward xauth keys between users +when calling su: + +session optional pam_xauth.so + + +IMPLEMENTATION DETAILS + +pam_xauth will work only if it is used from a setuid application in which the +getuid() call returns the id of the user running the application, and for which +PAM can supply the name of the account that the user is attempting to assume. +The typical application of this type is su(1). The application must call both +pam_open_session() and pam_close_session() with the ruid set to the uid of the +calling user and the euid set to root, and must have provided as the PAM_USER +item the name of the target user. + +pam_xauth calls xauth(1) the source user to extract the key for $DISPLAY, then +calls xauth as the target user to merge the key into the a temporary database +and later remove the database. + +pam_xauth cannot be told to not remove the keys when the session is closed. + +AUTHOR + +pam_xauth was written by Nalin Dahyabhai <nalin@redhat.com>, based on original +version by Michael K. Johnson <johnsonm@redhat.com>. + diff --git a/modules/pam_xauth/README.xml b/modules/pam_xauth/README.xml new file mode 100644 index 00000000..adefbd98 --- /dev/null +++ b/modules/pam_xauth/README.xml @@ -0,0 +1,46 @@ +<?xml version="1.0" encoding='UTF-8'?> +<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" +"http://www.docbook.org/xml/4.3/docbookx.dtd" +[ +<!-- +<!ENTITY pamaccess SYSTEM "pam_xauth.8.xml"> +--> +]> + +<article> + + <articleinfo> + + <title> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" + href="pam_xauth.8.xml" xpointer='xpointer(//refnamediv[@id = "pam_xauth-name"]/*)'/> + </title> + + </articleinfo> + + <section> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" + href="pam_xauth.8.xml" xpointer='xpointer(//refsect1[@id = "pam_xauth-description"]/*)'/> + </section> + + <section> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" + href="pam_xauth.8.xml" xpointer='xpointer(//refsect1[@id = "pam_xauth-options"]/*)'/> + </section> + + <section> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" + href="pam_xauth.8.xml" xpointer='xpointer(//refsect1[@id = "pam_xauth-examples"]/*)'/> + </section> + + <section> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" + href="pam_xauth.8.xml" xpointer='xpointer(//refsect1[@id = "pam_xauth-implementation"]/*)'/> + </section> + + <section> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" + href="pam_xauth.8.xml" xpointer='xpointer(//refsect1[@id = "pam_xauth-author"]/*)'/> + </section> + +</article> diff --git a/modules/pam_xauth/pam_xauth.8 b/modules/pam_xauth/pam_xauth.8 index 897b43fa..85f5dbf3 100644 --- a/modules/pam_xauth/pam_xauth.8 +++ b/modules/pam_xauth/pam_xauth.8 @@ -1,83 +1,141 @@ -.\" Copyright 2001,2003 Red Hat, Inc. -.\" Written by Nalin Dahyabhai <nalin@redhat.com>, based on the original -.\" version by Michael K. Johnson -.TH pam_xauth 8 2005/10/20 "Red Hat Linux" "System Administrator's Manual" -.SH NAME -pam_xauth \- forward xauth keys between users -.SH SYNOPSIS -.B session optional pam_xauth.so \fIarguments\fP -.SH DESCRIPTION -pam_xauth.so is designed to forward xauth keys (sometimes referred -to as "cookies") between users. - -Without pam_xauth, when xauth is enabled and a user uses the \fBsu\fP command -to assume another user's priviledges, that user is no longer able to access -the original user's X display because the new user does not have the key -needed to access the display. pam_xauth solves the problem by forwarding the -key from the user running su (the source user) to the user whose -identity the source user is assuming (the target user) when the session -is created, and destroying the key when the session is torn down. - -This means, for example, that when you run \fBsu\fP from an xterm sesssion, -you will be able to run X programs without explicitly dealing with the +.\" Title: pam_xauth +.\" Author: +.\" Generator: DocBook XSL Stylesheets v1.70.1 <http://docbook.sf.net/> +.\" Date: 06/09/2006 +.\" Manual: Linux\-PAM Manual +.\" Source: Linux\-PAM Manual +.\" +.TH "PAM_XAUTH" "8" "06/09/2006" "Linux\-PAM Manual" "Linux\-PAM Manual" +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.SH "NAME" +pam_xauth \- PAM module to forward xauth keys between users +.SH "SYNOPSIS" +.HP 13 +\fBpam_xauth.so\fR [debug] [xauthpath=\fI/path/to/xauth\fR] [systemuser=\fIUID\fR] [targetuser=\fIUID\fR] +.SH "DESCRIPTION" +.PP +The pam_xauth PAM module is designed to forward xauth keys (sometimes referred to as "cookies") between users. +.PP +Without pam_xauth, when xauth is enabled and a user uses the +\fBsu\fR(1) +command to assume another user's priviledges, that user is no longer able to access the original user's X display because the new user does not have the key needed to access the display. pam_xauth solves the problem by forwarding the key from the user running su (the source user) to the user whose identity the source user is assuming (the target user) when the session is created, and destroying the key when the session is torn down. +.PP +This means, for example, that when you run +\fBsu\fR(1) +from an xterm sesssion, you will be able to run X programs without explicitly dealing with the +\fBxauth\fR(1) xauth command or ~/.Xauthority files. - -pam_xauth will only forward keys if xauth can list a key connected -to the $DISPLAY environment variable. - -Primitive access control is provided by \fB~/.xauth/export\fP in the invoking -user's home directory and \fB~/.xauth/import\fP in the target user's home -directory. - -If a user has a \fB~/.xauth/import\fP file, the user will only receive cookies -from users listed in the file. If there is no \fB~/.xauth/import\fP file, -the user will accept cookies from any other user. - -If a user has a \fB.xauth/export\fP file, the user will only forward cookies -to users listed in the file. If there is no \fB~/.xauth/export\fP file, and -the invoking user is not \fBroot\fP, the user will forward cookies to -any other user. If there is no \fB~/.xauth/export\fP file, and the invoking -user is \fBroot\fP, the user will \fInot\fP forward cookies to other users. - -Both the import and export files support wildcards (such as \fI*\fP). Both -the import and export files can be empty, signifying that no users are allowed. - -.SH ARGUMENTS -.IP debug -Turns on debugging messages sent to syslog. -.IP xauthpath=\fI/path/to/xauth\fP -Specify the path the xauth program (it is expected in \fB/usr/X11R6/bin/xauth,\fP -or \fB/usr/bin/xauth\fP, or \fB/usr/bin/X11/xauth\fP by default). -.IP systemuser=\fInumber\fP -Specify the highest UID which will be assumed to belong to a "system" user. -pam_xauth will refuse to forward credentials to users with UID less than or -equal to this number, except for root and the "targetuser", if specified. -.IP targetuser=\fInumber\fP +.PP +pam_xauth will only forward keys if xauth can list a key connected to the $DISPLAY environment variable. +.PP +Primitive access control is provided by +\fI~/.xauth/export\fR +in the invoking user's home directory and +\fI~/.xauth/import\fR +in the target user's home directory. +.PP +If a user has a +\fI~/.xauth/import\fR +file, the user will only receive cookies from users listed in the file. If there is no +\fI~/.xauth/import\fR +file, the user will accept cookies from any other user. +.PP +If a user has a +\fI.xauth/export\fR +file, the user will only forward cookies to users listed in the file. If there is no +\fI~/.xauth/export\fR +file, and the invoking user is not +\fBroot\fR, the user will forward cookies to any other user. If there is no +\fI~/.xauth/export\fR +file, and the invoking user is +\fBroot\fR, the user will +\fInot\fR +forward cookies to other users. +.PP +Both the import and export files support wildcards (such as +\fI*\fR). Both the import and export files can be empty, signifying that no users are allowed. +.SH "OPTIONS" +.TP 3n +\fBdebug\fR +Print debug information. +.TP 3n +\fBxauthpath=\fR\fB\fI/path/to/xauth\fR\fR +Specify the path the xauth program (it is expected in +\fI/usr/X11R6/bin/xauth\fR, +\fI/usr/bin/xauth\fR, or +\fI/usr/bin/X11/xauth\fR +by default). +.TP 3n +\fBsystemuser=\fR\fB\fIUID\fR\fR +Specify the highest UID which will be assumed to belong to a "system" user. pam_xauth will refuse to forward credentials to users with UID less than or equal to this number, except for root and the "targetuser", if specified. +.TP 3n +\fBtargetuser=\fR\fB\fIUID\fR\fR Specify a single target UID which is exempt from the systemuser check. +.SH "MODULE SERVICES PROVIDED" +.PP +Only the +\fBsession\fR +service is supported. +.SH "RETURN VALUES" +.TP 3n +PAM_BUF_ERR +Memory buffer error. +.TP 3n +PAM_PERM_DENIED +Permission denied by import/export file. +.TP 3n +PAM_SESSION_ERR +Cannot determine user name, UID or access users home directory. +.TP 3n +PAM_SUCCESS +Success. +.TP 3n +PAM_USER_UNKNOWN +User not known. +.SH "EXAMPLES" +.PP +Add the following line to +\fI/etc/pam.d/su\fR +to forward xauth keys between users when calling su: +.sp +.RS 3n +.nf +session optional pam_xauth.so + +.fi +.RE +.sp .SH "IMPLEMENTATION DETAILS" -pam_xauth will work \fIonly\fP if it is used from a setuid application -in which the getuid() call returns the id of the user running the -application, and for which PAM can supply the name of the account that -the user is attempting to assume. The typical application of this -type is \fBsu\fP. The application must call both pam_open_session() and -pam_close_session() with the ruid set to the uid of the calling user -and the euid set to root, and must have provided as the PAM_USER item -the name of the target user. - -pam_xauth calls \fBxauth\fP as the source user to extract the key for -$DISPLAY, then calls xauth as the target user to merge the key -into the a temporary database and later remove the database. - -pam_xauth cannot be told not to remove the keys when the session -is closed. +.PP +pam_xauth will work +\fIonly\fR +if it is used from a setuid application in which the +\fBgetuid\fR() call returns the id of the user running the application, and for which PAM can supply the name of the account that the user is attempting to assume. The typical application of this type is +\fBsu\fR(1). The application must call both +\fBpam_open_session\fR() and +\fBpam_close_session\fR() with the ruid set to the uid of the calling user and the euid set to root, and must have provided as the PAM_USER item the name of the target user. +.PP +pam_xauth calls +\fBxauth\fR(1) +the source user to extract the key for $DISPLAY, then calls xauth as the target user to merge the key into the a temporary database and later remove the database. +.PP +pam_xauth cannot be told to not remove the keys when the session is closed. +.SH "FILES" +.TP 3n +\fI~/.xauth/import\fR +XXX +.TP 3n +\fI~/.xauth/export\fR +XXX .SH "SEE ALSO" -\fI/usr/share/doc/pam*/html/index.html\fP -.SH FILES -\fI~/.xauth/import\fP -\fI~/.xauth/export\fP -.SH BUGS -Let's hope not, but if you find any, please report them via the "Bug Track" -link at http://bugzilla.redhat.com/bugzilla/ -.SH AUTHOR -Nalin Dahyabhai <nalin@redhat.com>, based on original version by -Michael K. Johnson <johnsonm@redhat.com> +.PP + +\fBpam.conf\fR(5), +\fBpam.d\fR(8), +\fBpam\fR(8) +.SH "AUTHOR" +.PP +pam_xauth was written by Nalin Dahyabhai <nalin@redhat.com>, based on original version by Michael K. Johnson <johnsonm@redhat.com>. diff --git a/modules/pam_xauth/pam_xauth.8.xml b/modules/pam_xauth/pam_xauth.8.xml new file mode 100644 index 00000000..94453d00 --- /dev/null +++ b/modules/pam_xauth/pam_xauth.8.xml @@ -0,0 +1,293 @@ +<?xml version="1.0" encoding='UTF-8'?> +<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" + "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd"> + +<refentry id="pam_xauth"> + + <refmeta> + <refentrytitle>pam_xauth</refentrytitle> + <manvolnum>8</manvolnum> + <refmiscinfo class="sectdesc">Linux-PAM Manual</refmiscinfo> + </refmeta> + + <refnamediv id="pam_xauth-name"> + <refname>pam_xauth</refname> + <refpurpose>PAM module to forward xauth keys between users</refpurpose> + </refnamediv> + + <refsynopsisdiv> + <cmdsynopsis id="pam_xauth-cmdsynopsis"> + <command>pam_xauth.so</command> + <arg choice="opt"> + debug + </arg> + <arg choice="opt"> + xauthpath=<replaceable>/path/to/xauth</replaceable> + </arg> + <arg choice="opt"> + systemuser=<replaceable>UID</replaceable> + </arg> + <arg choice="opt"> + targetuser=<replaceable>UID</replaceable> + </arg> + </cmdsynopsis> + </refsynopsisdiv> + + <refsect1 id="pam_xauth-description"> + <title>DESCRIPTION</title> + <para> + The pam_xauth PAM module is designed to forward xauth keys + (sometimes referred to as "cookies") between users. + </para> + <para> + Without pam_xauth, when xauth is enabled and a user uses the + <citerefentry> + <refentrytitle>su</refentrytitle><manvolnum>1</manvolnum> + </citerefentry> command to assume another user's priviledges, + that user is no longer able to access the original user's X display + because the new user does not have the key needed to access the + display. pam_xauth solves the problem by forwarding the key from + the user running su (the source user) to the user whose identity the + source user is assuming (the target user) when the session is created, + and destroying the key when the session is torn down. + </para> + <para> + This means, for example, that when you run + <citerefentry> + <refentrytitle>su</refentrytitle><manvolnum>1</manvolnum> + </citerefentry> from an xterm sesssion, you will be able to run + X programs without explicitly dealing with the + <citerefentry> + <refentrytitle>xauth</refentrytitle><manvolnum>1</manvolnum> + </citerefentry> xauth command or ~/.Xauthority files. + </para> + <para> + pam_xauth will only forward keys if xauth can list a key connected + to the $DISPLAY environment variable. + </para> + <para> + Primitive access control is provided by + <filename>~/.xauth/export</filename> in the invoking user's home + directory and <filename>~/.xauth/import</filename> in the target + user's home directory. + </para> + <para> + If a user has a <filename>~/.xauth/import</filename> file, the user + will only receive cookies from users listed in the file. If there is + no <filename>~/.xauth/import</filename> file, the user will accept + cookies from any other user. + </para> + <para> + If a user has a <filename>.xauth/export</filename> file, the user will + only forward cookies to users listed in the file. If there is no + <filename>~/.xauth/export</filename> file, and the invoking user is + not <emphasis remap='B'>root</emphasis>, the user will forward cookies + to any other user. If there is no <filename>~/.xauth/export</filename> + file, and the invoking user is <emphasis remap='B'>root</emphasis>, + the user will <emphasis remap='I'>not</emphasis> forward cookies to + other users. + </para> + <para> + Both the import and export files support wildcards (such as + <emphasis remap='I'>*</emphasis>). Both the import and export files + can be empty, signifying that no users are allowed. + </para> + </refsect1> + + <refsect1 id="pam_xauth-options"> + <title>OPTIONS</title> + <variablelist> + <varlistentry> + <term> + <option>debug</option> + </term> + <listitem> + <para> + Print debug information. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term> + <option>xauthpath=<replaceable>/path/to/xauth</replaceable></option> + </term> + <listitem> + <para> + Specify the path the xauth program (it is expected in + <filename>/usr/X11R6/bin/xauth</filename>, + <filename>/usr/bin/xauth</filename>, or + <filename>/usr/bin/X11/xauth</filename> by default). + </para> + </listitem> + </varlistentry> + <varlistentry> + <term> + <option>systemuser=<replaceable>UID</replaceable></option> + </term> + <listitem> + <para> + Specify the highest UID which will be assumed to belong to a + "system" user. pam_xauth will refuse to forward credentials to + users with UID less than or equal to this number, except for + root and the "targetuser", if specified. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term> + <option>targetuser=<replaceable>UID</replaceable></option> + </term> + <listitem> + <para> + Specify a single target UID which is exempt from the + systemuser check. + </para> + </listitem> + </varlistentry> + </variablelist> + </refsect1> + + <refsect1 id="pam_xauth-services"> + <title>MODULE SERVICES PROVIDED</title> + <para> + Only the <emphasis remap='B'>session</emphasis> service is supported. + </para> + </refsect1> + + <refsect1 id='pam_xauth-return_values'> + <title>RETURN VALUES</title> + <variablelist> + <varlistentry> + <term>PAM_BUF_ERR</term> + <listitem> + <para> + Memory buffer error. + </para> + </listitem> + </varlistentry> + + <varlistentry> + <term>PAM_PERM_DENIED</term> + <listitem> + <para> + Permission denied by import/export file. + </para> + </listitem> + </varlistentry> + + <varlistentry> + <term>PAM_SESSION_ERR</term> + <listitem> + <para> + Cannot determine user name, UID or access users home directory. + </para> + </listitem> + </varlistentry> + + <varlistentry> + <term>PAM_SUCCESS</term> + <listitem> + <para> + Success. + </para> + </listitem> + </varlistentry> + + <varlistentry> + <term>PAM_USER_UNKNOWN</term> + <listitem> + <para> + User not known. + </para> + </listitem> + </varlistentry> + + </variablelist> + </refsect1> + + <refsect1 id='pam_xauth-examples'> + <title>EXAMPLES</title> + <para> + Add the following line to <filename>/etc/pam.d/su</filename> to + forward xauth keys between users when calling su: + <programlisting> +session optional pam_xauth.so + </programlisting> + </para> + </refsect1> + + <refsect1 id="pam_xauth-implementation"> + <title>IMPLEMENTATION DETAILS</title> + <para> + pam_xauth will work <emphasis remap='I'>only</emphasis> if it is + used from a setuid application in which the + <function>getuid</function>() call returns the id of the user + running the application, and for which PAM can supply the name + of the account that the user is attempting to assume. The typical + application of this type is + <citerefentry> + <refentrytitle>su</refentrytitle><manvolnum>1</manvolnum> + </citerefentry>. + The application must call both <function>pam_open_session</function>() + and <function>pam_close_session</function>() with the ruid set to the + uid of the calling user and the euid set to root, and must have + provided as the PAM_USER item the name of the target user. + </para> + <para> + pam_xauth calls + <citerefentry> + <refentrytitle>xauth</refentrytitle><manvolnum>1</manvolnum> + </citerefentry> the source user to extract the key for $DISPLAY, + then calls xauth as the target user to merge the key into the a + temporary database and later remove the database. + </para> + <para> + pam_xauth cannot be told to not remove the keys when the session + is closed. + </para> + </refsect1> + + <refsect1 id="pam_lastlog-files"> + <title>FILES</title> + <variablelist> + <varlistentry> + <term><filename>~/.xauth/import</filename></term> + <listitem> + <para>XXX</para> + </listitem> + </varlistentry> + <varlistentry> + <term><filename>~/.xauth/export</filename></term> + <listitem> + <para>XXX</para> + </listitem> + </varlistentry> + </variablelist> + </refsect1> + + + <refsect1 id='pam_xauth-see_also'> + <title>SEE ALSO</title> + <para> + <citerefentry> + <refentrytitle>pam.conf</refentrytitle><manvolnum>5</manvolnum> + </citerefentry>, + <citerefentry> + <refentrytitle>pam.d</refentrytitle><manvolnum>8</manvolnum> + </citerefentry>, + <citerefentry> + <refentrytitle>pam</refentrytitle><manvolnum>8</manvolnum> + </citerefentry> + </para> + </refsect1> + + <refsect1 id='pam_xauth-author'> + <title>AUTHOR</title> + <para> + pam_xauth was written by Nalin Dahyabhai <nalin@redhat.com>, + based on original version by + Michael K. Johnson <johnsonm@redhat.com>. + </para> + </refsect1> + +</refentry> |