summaryrefslogtreecommitdiff
path: root/Linux-PAM/doc/man/pam_set_item.3
diff options
context:
space:
mode:
Diffstat (limited to 'Linux-PAM/doc/man/pam_set_item.3')
-rw-r--r--Linux-PAM/doc/man/pam_set_item.3167
1 files changed, 118 insertions, 49 deletions
diff --git a/Linux-PAM/doc/man/pam_set_item.3 b/Linux-PAM/doc/man/pam_set_item.3
index ddd081fe..fa802747 100644
--- a/Linux-PAM/doc/man/pam_set_item.3
+++ b/Linux-PAM/doc/man/pam_set_item.3
@@ -1,55 +1,124 @@
-.\" Hey Emacs! This file is -*- nroff -*- source.
-.\" $Id: pam_set_item.3,v 1.1 2001/12/08 19:02:48 agmorgan Exp $
-.\" Copyright (c) Andrew G. Morgan 1996,1997 <morgan@kernel.org>
-.TH PAM_SET_ITEM 3 "2001 Jan 21" "Linux-PAM" "App. Programmers' Manual"
-.SH NAME
-
-pam_set_item, pam_get_item \- item manipulation under PAM
-
-.SH SYNOPSIS
-.B #include <security/pam_appl.h>
-.br
-or
-.br
-.B #include <secruity/pam_modules.h>
+.\" Title: pam_set_item
+.\" Author:
+.\" Generator: DocBook XSL Stylesheets v1.70.1 <http://docbook.sf.net/>
+.\" Date: 06/27/2006
+.\" Manual: Linux\-PAM Manual
+.\" Source: Linux\-PAM Manual
+.\"
+.TH "PAM_SET_ITEM" "3" "06/27/2006" "Linux\-PAM Manual" "Linux\-PAM Manual"
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.SH "NAME"
+pam_set_item \- set and update PAM informations
+.SH "SYNOPSIS"
.sp
-.BI "int pam_set_item(pam_handle_t " *pamh ", int " item_type ", void " *item ");"
+.ft B
+.nf
+#include <security/pam_modules.h>
+.fi
+.ft
+.HP 17
+.BI "int pam_set_item(pam_handle_t\ *" "pamh" ", int\ " "item_type" ", const\ void\ *" "item" ");"
+.SH "DESCRIPTION"
+.PP
+The
+\fBpam_set_item\fR
+function allows applications and PAM service modules to access and to update PAM informations of
+\fIitem_type\fR. For this a copy of the object pointed to by the
+\fIitem\fR
+argument is created. The following
+\fIitem_type\fRs are supported:
+.TP 3n
+PAM_SERVICE
+The service name (which identifies that PAM stack that the PAM functions will use to authenticate the program).
+.TP 3n
+PAM_USER
+The username of the entity under whose identity service will be given. That is, following authentication,
+\fIPAM_USER\fR
+identifies the local entity that gets to use the service. Note, this value can be mapped from something (eg., "anonymous") to something else (eg. "guest119") by any module in the PAM stack. As such an application should consult the value of
+\fIPAM_USER\fR
+after each call to a PAM function.
+.TP 3n
+PAM_USER_PROMPT
+The string used when prompting for a user's name. The default value for this string is a localized version of "login: ".
+.TP 3n
+PAM_TTY
+The terminal name: prefixed by
+\fI/dev/\fR
+if it is a device file; for graphical, X\-based, applications the value for this item should be the
+\fI$DISPLAY\fR
+variable.
+.TP 3n
+PAM_RUSER
+The requesting user name: local name for a locally requesting user or a remote user name for a remote requesting user.
.sp
-.BI "int pam_get_item(const pam_handle_t " *pamh ", int " item_type ", const void " **item_p ");"
-.sp 2
-.SH DESCRIPTION
-.B pam_set_item
+Generally an application or module will attempt to supply the value that is most strongly authenticated (a local account before a remote one. The level of trust in this value is embodied in the actual authentication stack associated with the application, so it is ultimately at the discretion of the system administrator.
.sp
-.B pam_set_item
-
-These functions are currently undocumented in a man page, but see the
-end of this man page for more information (the PAM guides).
-
-On success
-.BR PAM_SUCCESS
-is returned, all other return values should be treated as errors.
-
-.SH ERRORS
-May be translated to text with
-.BR pam_strerror "(3). "
-
-.SH "CONFORMING TO"
-DCE-RFC 86.0, October 1995.
-.SH BUGS
-.sp 2
-none known.
-
-.SH "SEE ALSO"
-
-.BR pam (8)
+\fIPAM_RUSER@PAM_RHOST\fR
+should always identify the requesting user. In some cases,
+\fIPAM_RUSER\fR
+may be NULL. In such situations, it is unclear who the requesting entity is.
+.TP 3n
+PAM_RHOST
+The requesting hostname (the hostname of the machine from which the
+\fIPAM_RUSER\fR
+entity is requesting service). That is
+\fIPAM_RUSER@PAM_RHOST\fR
+does identify the requesting user. In some applications,
+\fIPAM_RHOST\fR
+may be NULL. In such situations, it is unclear where the authentication request is originating from.
+.TP 3n
+PAM_AUTHTOK
+The authentication token (often a password). This token should be ignored by all module functions besides
+\fBpam_sm_authenticate\fR(3)
and
-.BR pam_strerror "(3)."
+\fBpam_sm_chauthtok\fR(3). In the former function it is used to pass the most recent authentication token from one stacked module to another. In the latter function the token is used for another purpose. It contains the currently active authentication token.
+.TP 3n
+PAM_OLDAUTHTOK
+The old authentication token. This token should be ignored by all module functions except
+\fBpam_sm_chauthtok\fR(3).
+.TP 3n
+PAM_CONV
+The pam_conv structure. See
+\fBpam_conv\fR(3).
+.TP 3n
+PAM_FAIL_DELAY
+A function pointer to redirect centrally managed failure delays. See
+\fBpam_fail_delay\fR(3).
+.PP
+For all
+\fIitem_type\fRs, other than PAM_CONV and PAM_FAIL_DELAY,
+\fIitem\fR
+is a pointer to a <NUL> terminated character string. In the case of PAM_CONV,
+\fIitem\fR
+points to an initialized
+\fIpam_conv\fR
+structure. In the case of PAM_FAIL_DELAY,
+\fIitem\fR
+is a function pointer:
+\fBvoid (*delay_fn)(int retval, unsigned usec_delay, void *appdata_ptr)\fR
+.PP
+Both, PAM_AUTHTOK and PAM_OLDAUTHTOK, will be reseted before returning to the application. Which means an application is not able to access the authentication tokens.
+.SH "RETURN VALUES"
+.TP 3n
+PAM_BAD_ITEM
+The application attempted to set an undefined or inaccessible item.
+.TP 3n
+PAM_BUF_ERR
+Memory buffer error.
+.TP 3n
+PAM_SUCCESS
+Data was successful updated.
+.TP 3n
+PAM_SYSTEM_ERR
+The
+\fIpam_handle_t\fR
+passed as first argument was invalid.
+.SH "SEE ALSO"
+.PP
-Also, see the three
-.BR Linux-PAM
-Guides, for
-.BR "System administrators" ", "
-.BR "module developers" ", "
-and
-.BR "application developers" ". "
+\fBpam_get_item\fR(3),
+\fBpam_strerror\fR(3)