From a6a981f6c746bf27da9fab021baee009c049d4d5 Mon Sep 17 00:00:00 2001 From: Thorsten Kukuk Date: Fri, 17 Feb 2006 19:16:12 +0000 Subject: Relevant BUGIDs: Purpose of commit: new feature Commit summary: --------------- More manual page updates/new manual pages 2006-02-17 Thorsten Kukuk * doc/man/Makefile.am: Add new manual pages. * doc/man/pam_end.3: Regenerated from xml file. * doc/man/pam_end.3.xml: Document freeing of item data. * doc/man/pam_get_user.3: New. * doc/man/pam_get_user.3.xml: New. * modules/pam_access/access.conf.5.xml: Fix typos. * modules/pam_env/Makefile.am: Add new manual pages. * modules/pam_env/README: Regenerate from xml file. * modules/pam_env/README.xml: New. * modules/pam_env/pam_env.8: New. * modules/pam_env/pam_env.8.xml: New. * modules/pam_env/pam_env.conf.5: New. * modules/pam_env/pam_env.conf.5.xml New. --- modules/pam_env/Makefile.am | 13 ++- modules/pam_env/README | 146 +++++++++++++------------- modules/pam_env/README.xml | 39 +++++++ modules/pam_env/pam_env.8 | 85 +++++++++++++++ modules/pam_env/pam_env.8.xml | 206 +++++++++++++++++++++++++++++++++++++ modules/pam_env/pam_env.conf.5 | 78 ++++++++++++++ modules/pam_env/pam_env.conf.5.xml | 129 +++++++++++++++++++++++ 7 files changed, 623 insertions(+), 73 deletions(-) create mode 100644 modules/pam_env/README.xml create mode 100644 modules/pam_env/pam_env.8 create mode 100644 modules/pam_env/pam_env.8.xml create mode 100644 modules/pam_env/pam_env.conf.5 create mode 100644 modules/pam_env/pam_env.conf.5.xml (limited to 'modules/pam_env') diff --git a/modules/pam_env/Makefile.am b/modules/pam_env/Makefile.am index d113ac33..fe9ba068 100644 --- a/modules/pam_env/Makefile.am +++ b/modules/pam_env/Makefile.am @@ -4,7 +4,11 @@ CLEANFILES = *~ -EXTRA_DIST = README pam_env.conf +EXTRA_DIST = README pam_env.conf $(MANS) $(XMLS) + +man_MANS = pam_env.conf.5 pam_env.8 + +XMLS = README.xml pam_env.conf.5.xml pam_env.8.xml securelibdir = $(SECUREDIR) secureconfdir = $(SCONFIGDIR) @@ -20,3 +24,10 @@ endif securelib_LTLIBRARIES = pam_env.la secureconf_DATA = pam_env.conf + +if ENABLE_REGENERATE_MAN +noinst_DATA = README +README: pam_env.8.xml pam_env.conf.5.xml +-include $(top_srcdir)/Make.xml.rules +endif + diff --git a/modules/pam_env/README b/modules/pam_env/README index 04df323b..81c63154 100644 --- a/modules/pam_env/README +++ b/modules/pam_env/README @@ -1,72 +1,74 @@ -# $Date$ -# $Author$ -# $Id$ -# -# This is the configuration file for pam_env, a PAM module to load in -# a configurable list of environment variables for a -# -# The original idea for this came from Andrew G. Morgan ... -# -# Mmm. Perhaps you might like to write a pam_env module that reads a -# default environment from a file? I can see that as REALLY -# useful... Note it would be an "auth" module that returns PAM_IGNORE -# for the auth part and sets the environment returning PAM_SUCCESS in -# the setcred function... -# -# -# What I wanted was the REMOTEHOST variable set, purely for selfish -# reasons, and AGM didn't want it added to the SimpleApps login -# program (which is where I added the patch). So, my first concern is -# that variable, from there there are numerous others that might/would -# be useful to be set: NNTPSERVER, LESS, PATH, PAGER, MANPAGER ..... -# -# Of course, these are a different kind of variable than REMOTEHOST in -# that they are things that are likely to be configured by -# administrators rather than set by logging in, how to treat them both -# in the same config file? -# -# Here is my idea: -# -# Each line starts with the variable name, there are then two possible -# options for each variable DEFAULT and OVERRIDE. -# DEFAULT allows and administrator to set the value of the -# variable to some default value, if none is supplied then the empty -# string is assumed. The OVERRIDE option tells pam_env that it should -# enter in its value (overriding the default value) if there is one -# to use. OVERRIDE is not used, "" is assumed and no override will be -# done. -# -# VARIABLE [DEFAULT=[value]] [OVERRIDE=[value]] -# -# (Possibly non-existent) environment variables may be used in values -# using the ${string} syntax and (possibly non-existent) PAM_ITEMs may -# be used in values using the @{string} syntax. Both the $ and @ -# characters can be backslash escaped to be used as literal values -# values can be delimited with "", escaped " not supported. -# -# -# First, some special variables -# -# Set the REMOTEHOST variable for any hosts that are remote, default -# to "localhost" rather than not being set at all -REMOTEHOST DEFAULT=localhost OVERRIDE=@{PAM_RHOST} -# -# Set the DISPLAY variable if it seems reasonable -DISPLAY DEFAULT=${REMOTEHOST}:0.0 OVERRIDE=${DISPLAY} -# -# -# Now some simple variables -# -PAGER DEFAULT=less -MANPAGER DEFAULT=less -LESS DEFAULT="M q e h15 z23 b80" -NNTPSERVER DEFAULT=localhost -PATH DEFAULT=${HOME}/bin:/usr/local/bin:/bin\ -:/usr/bin:/usr/local/bin/X11:/usr/bin/X11 -# -# silly examples of escaped variables, just to show how they work. -# -DOLLAR DEFAULT=\$ -DOLLARDOLLAR DEFAULT= OVERRIDE=\$${DOLLAR} -DOLLARPLUS DEFAULT=\${REMOTEHOST}${REMOTEHOST} -ATSIGN DEFAULT="" OVERRIDE=\@ +pam_env — PAM module to set/unset environment variables + +━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ + +DESCRIPTION + +The pam_env PAM module allows the (un)setting of environment variables. +Supported is the use of previously set environment variables as well as +PAM_ITEMs such as PAM_RHOST. + +By default rules for (un)setting of variables is taken from the config file / +etc/security/pam_env.conf if no other file is specified. + +This module can also parse a file with simple KEY=VAL pairs on seperate lines +(/etc/environment by default). You can change the default file to parse, with +the envfile flag and turn it on or off by setting the readenv flag to 1 or 0 +respectively. + +OPTIONS + +conffile=/path/to/pam_env.conf + + Indicate an alternative pam_env.conf style configuration file to override + the default. This can be useful when different services need different + environments. + +debug + + A lot of debug informations are printed with syslog(3). + +envfile=/path/to/environment + + Indicate an alternative environment file to override the default. This can + be useful when different services need different environments. + +readenv=0|1 + + Turns on or off the reading of the file specified by envfile (0 is off, 1 + is on). By default this option is on. + +EXAMPLES + +These are some example lines which might be specified in /etc/security/ +pam_env.conf. + +Set the REMOTEHOST variable for any hosts that are remote, default to +"localhost" rather than not being set at all + + REMOTEHOST DEFAULT=localhost OVERRIDE=@{PAM_RHOST} + + +Set the DISPLAY variable if it seems reasonable + + DISPLAY DEFAULT=${REMOTEHOST}:0.0 OVERRIDE=${DISPLAY} + + +Now some simple variables + + PAGER DEFAULT=less + MANPAGER DEFAULT=less + LESS DEFAULT="M q e h15 z23 b80" + NNTPSERVER DEFAULT=localhost + PATH DEFAULT=${HOME}/bin:/usr/local/bin:/bin\ + :/usr/bin:/usr/local/bin/X11:/usr/bin/X11 + + +Silly examples of escaped variables, just to show how they work. + + DOLLAR DEFAULT=\$ + DOLLARDOLLAR DEFAULT= OVERRIDE=\$${DOLLAR} + DOLLARPLUS DEFAULT=\${REMOTEHOST}${REMOTEHOST} + ATSIGN DEFAULT="" OVERRIDE=\@ + + diff --git a/modules/pam_env/README.xml b/modules/pam_env/README.xml new file mode 100644 index 00000000..21a9b855 --- /dev/null +++ b/modules/pam_env/README.xml @@ -0,0 +1,39 @@ + + +--> + +]> + +
+ + + + + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" + href="pam_env.8.xml" xpointer='xpointer(//refnamediv[@id = "pam_env-name"]/*)'/> + + + + +
+ +
+ +
+ +
+ +
+ +
+ +
diff --git a/modules/pam_env/pam_env.8 b/modules/pam_env/pam_env.8 new file mode 100644 index 00000000..566396f1 --- /dev/null +++ b/modules/pam_env/pam_env.8 @@ -0,0 +1,85 @@ +.\" ** You probably do not want to edit this file directly ** +.\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). +.\" Instead of manually editing it, you probably should edit the DocBook XML +.\" source for it and then use the DocBook XSL Stylesheets to regenerate it. +.TH "PAM_ENV" "8" "02/17/2006" "Linux\-PAM Manual" "Linux\-PAM Manual" +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.SH "NAME" +pam_env \- PAM module to set/unset environment variables +.SH "SYNOPSIS" +.HP 11 +\fBpam_env.so\fR [debug] [conffile=\fIconf\-file\fR] [envfile=\fIenv\-file\fR] [readenv=\fI0|1\fR] +.SH "DESCRIPTION" +.PP +The pam_env PAM module allows the (un)setting of environment variables. Supported is the use of previously set environment variables as well as +\fIPAM_ITEM\fRs such as +\fIPAM_RHOST\fR. +.PP +By default rules for (un)setting of variables is taken from the config file +\fI/etc/security/pam_env.conf\fR +if no other file is specified. +.PP +This module can also parse a file with simple +\fIKEY=VAL\fR +pairs on seperate lines (\fI/etc/environment\fR +by default). You can change the default file to parse, with the +\fIenvfile\fR +flag and turn it on or off by setting the +\fIreadenv\fR +flag to 1 or 0 respectively. +.SH "OPTIONS" +.TP +\fBconffile=\fR\fB\fI/path/to/pam_env.conf\fR\fR +Indicate an alternative +\fIpam_env.conf\fR +style configuration file to override the default. This can be useful when different services need different environments. +.TP +\fBdebug\fR +A lot of debug informations are printed with +\fBsyslog\fR(3). +.TP +\fBenvfile=\fR\fB\fI/path/to/environment\fR\fR +Indicate an alternative +\fIenvironment\fR +file to override the default. This can be useful when different services need different environments. +.TP +\fBreadenv=\fR\fB\fI0|1\fR\fR +Turns on or off the reading of the file specified by envfile (0 is off, 1 is on). By default this option is on. +.SH "MODULE SERVICES PROVIDED" +.PP +The +\fBauth\fR +and +\fBsession\fR +services are supported. +.SH "RETURN VALUES" +.TP +PAM_ABORT +Not all relevant data or options could be gotten. +.TP +PAM_BUF_ERR +Memory buffer error. +.TP +PAM_IGNORE +No pam_env.conf and environment file was found. +.TP +PAM_SUCCESS +Environment variables were set. +.SH "FILES" +.TP +\fI/etc/security/pam_env.conf\fR +Default configuration file +.TP +\fI/etc/environment\fR +Default environment file +.SH "SEE ALSO" +.PP +\fBpam_env.conf\fR(5), +\fBpam.d\fR(8), +\fBpam\fR(8). +.SH "AUTHORS" +.PP +pam_env was written by Dave Kinchlea . diff --git a/modules/pam_env/pam_env.8.xml b/modules/pam_env/pam_env.8.xml new file mode 100644 index 00000000..4ab305ec --- /dev/null +++ b/modules/pam_env/pam_env.8.xml @@ -0,0 +1,206 @@ + + + + + + + pam_env + 8 + Linux-PAM Manual + + + + pam_env + + PAM module to set/unset environment variables + + + + + + + + pam_env.so + + debug + + + conffile=conf-file + + + envfile=env-file + + + readenv=0|1 + + + + + + + DESCRIPTION + + The pam_env PAM module allows the (un)setting of environment + variables. Supported is the use of previously set environment + variables as well as PAM_ITEMs such as + PAM_RHOST. + + + By default rules for (un)setting of variables is taken from the + config file /etc/security/pam_env.conf if + no other file is specified. + + + This module can also parse a file with simple + KEY=VAL pairs on seperate lines + (/etc/environment by default). You can + change the default file to parse, with the envfile + flag and turn it on or off by setting the readenv + flag to 1 or 0 respectively. + + + + + OPTIONS + + + + + + + + + Indicate an alternative pam_env.conf + style configuration file to override the default. This can + be useful when different services need different environments. + + + + + + + + + + + A lot of debug informations are printed with + syslog3. + + + + + + + + + + + Indicate an alternative environment + file to override the default. This can be useful when different + services need different environments. + + + + + + + + + + + Turns on or off the reading of the file specified by envfile + (0 is off, 1 is on). By default this option is on. + + + + + + + + + MODULE SERVICES PROVIDED + + The and services + are supported. + + + + + RETURN VALUES + + + PAM_ABORT + + + Not all relevant data or options could be gotten. + + + + + PAM_BUF_ERR + + + Memory buffer error. + + + + + PAM_IGNORE + + + No pam_env.conf and environment file was found. + + + + + PAM_SUCCESS + + + Environment variables were set. + + + + + + + + FILES + + + /etc/security/pam_env.conf + + Default configuration file + + + + /etc/environment + + Default environment file + + + + + + + SEE ALSO + + + pam_env.conf5 + , + + pam.d8 + , + + pam8 + . + + + + + AUTHORS + + pam_env was written by Dave Kinchlea <kinch@kinch.ark.com>. + + + diff --git a/modules/pam_env/pam_env.conf.5 b/modules/pam_env/pam_env.conf.5 new file mode 100644 index 00000000..edf1fe2f --- /dev/null +++ b/modules/pam_env/pam_env.conf.5 @@ -0,0 +1,78 @@ +.\" ** You probably do not want to edit this file directly ** +.\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). +.\" Instead of manually editing it, you probably should edit the DocBook XML +.\" source for it and then use the DocBook XSL Stylesheets to regenerate it. +.TH "PAM_ENV.CONF" "5" "02/17/2006" "Linux\-PAM Manual" "Linux\-PAM Manual" +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.SH "NAME" +pam_env.conf \- the environment variables config file +.SH "DESCRIPTION" +.PP +The +\fIpam_env\fR +module allows the (un)setting of environment variables. Supported is the use of previously set environment variables as well as +\fIPAM_ITEM\fRs such as PAM_RHOST. +.PP +The +\fI/etc/security/pam_env.conf\fR +file specifies the environment variables to be set, unset or modified. When someone logs in, this file is read and the environment variables are set according. +.PP +Each line starts with the variable name, there are then two possible options for each variable DEFAULT and OVERRIDE. DEFAULT allows and administrator to set the value of the variable to some default value, if none is supplied then the empty string is assumed. The OVERRIDE option tells pam_env that it should enter in its value (overriding the default value) if there is one to use. OVERRIDE is not used, "" is assumed and no override will be done. +.PP +\fIVARIABLE\fR +[\fIDEFAULT=[value]\fR] [\fIOVERRIDE=[value]\fR] +.PP +(Possibly non\-existent) environment variables may be used in values using the ${string} syntax and (possibly non\-existent) PAM_ITEMs may be used in values using the @{string} syntax. Both the $ and @ characters can be backslash escaped to be used as literal values values can be delimited with "", escaped " not supported. Note that many environment variables that you would like to use may not be set by the time the module is called. For example, HOME is used below several times, but many PAM applications don't make it available by the time you need it. +.PP +The "\fI#\fR" character at start of line (no space at front) can be used to mark this line as a comment line. +.SH "EXAMPLES" +.PP +These are some example lines which might be specified in +\fI/etc/security/pam_env.conf\fR. +.PP +Set the REMOTEHOST variable for any hosts that are remote, default to "localhost" rather than not being set at all +.sp +.nf + REMOTEHOST DEFAULT=localhost OVERRIDE=@{PAM_RHOST} + +.fi +.PP +Set the DISPLAY variable if it seems reasonable +.sp +.nf + DISPLAY DEFAULT=${REMOTEHOST}:0.0 OVERRIDE=${DISPLAY} + +.fi +.PP +Now some simple variables +.sp +.nf + PAGER DEFAULT=less + MANPAGER DEFAULT=less + LESS DEFAULT="M q e h15 z23 b80" + NNTPSERVER DEFAULT=localhost + PATH DEFAULT=${HOME}/bin:/usr/local/bin:/bin\\ + :/usr/bin:/usr/local/bin/X11:/usr/bin/X11 + +.fi +.PP +Silly examples of escaped variables, just to show how they work. +.sp +.nf + DOLLAR DEFAULT=\\$ + DOLLARDOLLAR DEFAULT= OVERRIDE=\\$${DOLLAR} + DOLLARPLUS DEFAULT=\\${REMOTEHOST}${REMOTEHOST} + ATSIGN DEFAULT="" OVERRIDE=\\@ + +.fi +.SH "SEE ALSO" +.PP +\fBpam_env\fR(8), +\fBpam.d\fR(5), +\fBpam\fR(8) +.SH "AUTHORS" +.PP +pam_env was written by Dave Kinchlea . diff --git a/modules/pam_env/pam_env.conf.5.xml b/modules/pam_env/pam_env.conf.5.xml new file mode 100644 index 00000000..7d12cfe1 --- /dev/null +++ b/modules/pam_env/pam_env.conf.5.xml @@ -0,0 +1,129 @@ + + + + + + + pam_env.conf + 5 + Linux-PAM Manual + + + + pam_env.conf + the environment variables config file + + + + + DESCRIPTION + + + The pam_env module allows the (un)setting + of environment variables. Supported is the use of previously set + environment variables as well as PAM_ITEMs + such as PAM_RHOST. + + + + The /etc/security/pam_env.conf file specifies + the environment variables to be set, unset or modified. + When someone logs in, this file is + read and the environment variables are set according. + + + Each line starts with the variable name, there are then two possible + options for each variable DEFAULT and OVERRIDE. DEFAULT allows and + administrator to set the value of the variable to some default + value, if none is supplied then the empty string is assumed. The + OVERRIDE option tells pam_env that it should enter in its value + (overriding the default value) if there is one to use. OVERRIDE is + not used, "" is assumed and no override will be done. + + + VARIABLE + [DEFAULT=[value]] + [OVERRIDE=[value]] + + + + (Possibly non-existent) environment variables may be used in values + using the ${string} syntax and (possibly non-existent) PAM_ITEMs may + be used in values using the @{string} syntax. Both the $ and @ + characters can be backslash escaped to be used as literal values + values can be delimited with "", escaped " not supported. + Note that many environment variables that you would like to use + may not be set by the time the module is called. + For example, HOME is used below several times, but + many PAM applications don't make it available by the time you need it. + + + + The "#" character at start of line (no space + at front) can be used to mark this line as a comment line. + + + + + + EXAMPLES + + These are some example lines which might be specified in + /etc/security/pam_env.conf. + + + + Set the REMOTEHOST variable for any hosts that are remote, default + to "localhost" rather than not being set at all + + + REMOTEHOST DEFAULT=localhost OVERRIDE=@{PAM_RHOST} + + + + Set the DISPLAY variable if it seems reasonable + + + DISPLAY DEFAULT=${REMOTEHOST}:0.0 OVERRIDE=${DISPLAY} + + + + Now some simple variables + + + PAGER DEFAULT=less + MANPAGER DEFAULT=less + LESS DEFAULT="M q e h15 z23 b80" + NNTPSERVER DEFAULT=localhost + PATH DEFAULT=${HOME}/bin:/usr/local/bin:/bin\ + :/usr/bin:/usr/local/bin/X11:/usr/bin/X11 + + + + Silly examples of escaped variables, just to show how they work. + + + DOLLAR DEFAULT=\$ + DOLLARDOLLAR DEFAULT= OVERRIDE=\$${DOLLAR} + DOLLARPLUS DEFAULT=\${REMOTEHOST}${REMOTEHOST} + ATSIGN DEFAULT="" OVERRIDE=\@ + + + + + SEE ALSO + + pam_env8, + pam.d5, + pam8 + + + + + AUTHORS + + pam_env was written by Dave Kinchlea <kinch@kinch.ark.com>. + + + -- cgit v1.2.3