summaryrefslogtreecommitdiff
path: root/modules/pam_umask
diff options
context:
space:
mode:
authorThorsten Kukuk <kukuk@thkukuk.de>2006-05-30 07:48:36 +0000
committerThorsten Kukuk <kukuk@thkukuk.de>2006-05-30 07:48:36 +0000
commit9a611ad9d88dfe3950889277881aa2057c9429d3 (patch)
tree520b5bdab46399660c7127c9ebd370c072bbf714 /modules/pam_umask
parent7ae17137a9dc034d96fff82777330d6a44a82d00 (diff)
Relevant BUGIDs:
Purpose of commit: new feature Commit summary: --------------- 2006-05-30 Thorsten Kukuk <kukuk@thkukuk.de> * modules/pam_umask/Makefile.am: Include Make.xml.rules. * modules/pam_umask/pam_umask.8.xml: New. * modules/pam_umask/pam_umask.8: New, generated from xml file. * modules/pam_umask/README.xml: New. * modules/pam_umask/README: Regenerated from xml file.
Diffstat (limited to 'modules/pam_umask')
-rw-r--r--modules/pam_umask/Makefile.am13
-rw-r--r--modules/pam_umask/README66
-rw-r--r--modules/pam_umask/README.xml41
-rw-r--r--modules/pam_umask/pam_umask.885
-rw-r--r--modules/pam_umask/pam_umask.8.xml208
5 files changed, 399 insertions, 14 deletions
diff --git a/modules/pam_umask/Makefile.am b/modules/pam_umask/Makefile.am
index dc2a3a3b..56fa63b4 100644
--- a/modules/pam_umask/Makefile.am
+++ b/modules/pam_umask/Makefile.am
@@ -4,7 +4,11 @@
CLEANFILES = *~
-EXTRA_DIST = README tst-pam_umask
+EXTRA_DIST = README $(MANS) $(XMLS) tst-pam_umask
+
+man_MANS = pam_umask.8
+
+XMLS = README.xml pam_umask.8.xml
TESTS = tst-pam_umask
@@ -19,3 +23,10 @@ if HAVE_VERSIONING
endif
securelib_LTLIBRARIES = pam_umask.la
+
+if ENABLE_REGENERATE_MAN
+noinst_DATA = README
+README: pam_umask.8.xml
+-include $(top_srcdir)/Make.xml.rules
+endif
+
diff --git a/modules/pam_umask/README b/modules/pam_umask/README
index 3fd4f7f0..2a4f2641 100644
--- a/modules/pam_umask/README
+++ b/modules/pam_umask/README
@@ -1,14 +1,54 @@
-This is the README for pam_umask
---------------------------------
-
-pam_umask sets the set the file mode creation mask of the current
-environment. It tries to get the umask value from the following
-files in the following priority:
-
-- umask= argument
-- umask= entry of the users GECOS field
-- pri= entry of the users GECOS field
-- ulimit= entry of the users GECOS field
-- UMASK= entry from /etc/default/login
-- UMASK entry from /etc/login.defs
+pam_umask — PAM module to set the file mode creation mask
+
+━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+DESCRIPTION
+
+pam_umask is a PAM module to set the file mode creation mask of the current
+environment. The umask affects the default permissions assigned to newly
+created files.
+
+The PAM module tries to get the umask value from the following places in the
+following order:
+
+ ● umask= argument
+
+ ● umask= entry of the users GECOS field
+
+ ● pri= entry of the users GECOS field
+
+ ● ulimit= entry of the users GECOS field
+
+ ● UMASK= entry from /etc/default/login
+
+ ● UMASK entry from /etc/login.defs
+
+OPTIONS
+
+debug
+
+ Print debug information.
+
+usergroups
+
+ If the user is not root, and the user ID is equal to the group ID, and the
+ username is the same as primary group name, the umask group bits are set to
+ be the same as owner bits (examples: 022 -> 002, 077 -> 007).
+
+umask=mask
+
+ Sets the calling process's file mode creation mask (umask) to mask & 0777.
+ The value is interpreted as Octal.
+
+EXAMPLES
+
+Add the following line to /etc/pam.d/login to set the user specific umask at
+login:
+
+ session optional pam_umask.so umask=0022
+
+
+AUTHOR
+
+pam_umask was written by Thorsten Kukuk <kukuk@thkukuk.de>.
diff --git a/modules/pam_umask/README.xml b/modules/pam_umask/README.xml
new file mode 100644
index 00000000..9afbe543
--- /dev/null
+++ b/modules/pam_umask/README.xml
@@ -0,0 +1,41 @@
+<?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_umask.8.xml">
+-->
+]>
+
+<article>
+
+ <articleinfo>
+
+ <title>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
+ href="pam_umask.8.xml" xpointer='xpointer(//refnamediv[@id = "pam_umask-name"]/*)'/>
+ </title>
+
+ </articleinfo>
+
+ <section>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
+ href="pam_umask.8.xml" xpointer='xpointer(//refsect1[@id = "pam_umask-description"]/*)'/>
+ </section>
+
+ <section>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
+ href="pam_umask.8.xml" xpointer='xpointer(//refsect1[@id = "pam_umask-options"]/*)'/>
+ </section>
+
+ <section>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
+ href="pam_umask.8.xml" xpointer='xpointer(//refsect1[@id = "pam_umask-examples"]/*)'/>
+ </section>
+
+ <section>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
+ href="pam_umask.8.xml" xpointer='xpointer(//refsect1[@id = "pam_umask-author"]/*)'/>
+ </section>
+
+</article>
diff --git a/modules/pam_umask/pam_umask.8 b/modules/pam_umask/pam_umask.8
new file mode 100644
index 00000000..8e0cbb7c
--- /dev/null
+++ b/modules/pam_umask/pam_umask.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_UMASK" "8" "05/30/2006" "Linux\-PAM Manual" "Linux\-PAM Manual"
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.SH "NAME"
+pam_umask \- PAM module to set the file mode creation mask
+.SH "SYNOPSIS"
+.HP 13
+\fBpam_umask.so\fR [debug] [usergroups] [umask=\fImask\fR]
+.SH "DESCRIPTION"
+.PP
+pam_umask is a PAM module to set the file mode creation mask of the current environment. The umask affects the default permissions assigned to newly created files.
+.PP
+The PAM module tries to get the umask value from the following places in the following order:
+.TP 3
+\(bu
+umask= argument
+.TP
+\(bu
+umask= entry of the users GECOS field
+.TP
+\(bu
+pri= entry of the users GECOS field
+.TP
+\(bu
+ulimit= entry of the users GECOS field
+.TP
+\(bu
+UMASK= entry from /etc/default/login
+.TP
+\(bu
+UMASK entry from /etc/login.defs
+.SH "OPTIONS"
+.PP
+.TP
+\fBdebug\fR
+Print debug information.
+.TP
+\fBusergroups\fR
+If the user is not root, and the user ID is equal to the group ID, and the username is the same as primary group name, the umask group bits are set to be the same as owner bits (examples: 022 \-> 002, 077 \-> 007).
+.TP
+\fBumask=\fR\fB\fImask\fR\fR
+Sets the calling process's file mode creation mask (umask) to
+\fBmask\fR
+& 0777. The value is interpreted as Octal.
+.SH "MODULE SERVICES PROVIDED"
+.PP
+Only the
+\fBsession\fR
+service is supported.
+.SH "RETURN VALUES"
+.PP
+.TP
+PAM_SUCCESS
+The new umask was set successfull.
+.TP
+PAM_SERVICE_ERR
+No username was given.
+.TP
+PAM_USER_UNKNOWN
+User not known.
+.SH "EXAMPLES"
+.PP
+Add the following line to
+\fI/etc/pam.d/login\fR
+to set the user specific umask at login:
+.sp
+.nf
+ session optional pam_umask.so umask=0022
+
+.fi
+.sp
+.SH "SEE ALSO"
+.PP
+\fBpam.conf\fR(5),
+\fBpam.d\fR(8),
+\fBpam\fR(8)
+.SH "AUTHOR"
+.PP
+pam_umask was written by Thorsten Kukuk <kukuk@thkukuk.de>.
diff --git a/modules/pam_umask/pam_umask.8.xml b/modules/pam_umask/pam_umask.8.xml
new file mode 100644
index 00000000..4edbb18e
--- /dev/null
+++ b/modules/pam_umask/pam_umask.8.xml
@@ -0,0 +1,208 @@
+<?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_umask">
+
+ <refmeta>
+ <refentrytitle>pam_umask</refentrytitle>
+ <manvolnum>8</manvolnum>
+ <refmiscinfo class="sectdesc">Linux-PAM Manual</refmiscinfo>
+ </refmeta>
+
+ <refnamediv id="pam_umask-name">
+ <refname>pam_umask</refname>
+ <refpurpose>PAM module to set the file mode creation mask</refpurpose>
+ </refnamediv>
+
+ <refsynopsisdiv>
+ <cmdsynopsis id="pam_umask-cmdsynopsis">
+ <command>pam_umask.so</command>
+ <arg choice="opt">
+ debug
+ </arg>
+ <arg choice="opt">
+ usergroups
+ </arg>
+ <arg choice="opt">
+ umask=<replaceable>mask</replaceable>
+ </arg>
+ </cmdsynopsis>
+ </refsynopsisdiv>
+
+ <refsect1 id="pam_umask-description">
+
+ <title>DESCRIPTION</title>
+
+ <para>
+ pam_umask is a PAM module to set the file mode creation mask
+ of the current environment. The umask affects the default
+ permissions assigned to newly created files.
+ </para>
+ <para>
+ The PAM module tries to get the umask value from the
+ following places in the following order:
+ <itemizedlist>
+ <listitem>
+ <para>
+ umask= argument
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ umask= entry of the users GECOS field
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ pri= entry of the users GECOS field
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ ulimit= entry of the users GECOS field
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ UMASK= entry from /etc/default/login
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ UMASK entry from /etc/login.defs
+ </para>
+ </listitem>
+ </itemizedlist>
+ </para>
+
+ </refsect1>
+
+ <refsect1 id="pam_umask-options">
+
+ <title>OPTIONS</title>
+ <para>
+ <variablelist>
+
+ <varlistentry>
+ <term>
+ <option>debug</option>
+ </term>
+ <listitem>
+ <para>
+ Print debug information.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>
+ <option>usergroups</option>
+ </term>
+ <listitem>
+ <para>
+ If the user is not root, and the user ID is equal to the
+ group ID, and the username is the same as primary group name,
+ the umask group bits are set to be the same as
+ owner bits (examples: 022 -> 002, 077 -> 007).
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>
+ <option>umask=<replaceable>mask</replaceable></option>
+ </term>
+ <listitem>
+ <para>
+ Sets the calling process's file mode creation mask (umask)
+ to <option>mask</option> &amp; 0777. The value is interpreted
+ as Octal.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ </variablelist>
+
+ </para>
+ </refsect1>
+
+ <refsect1 id="pam_umask-services">
+ <title>MODULE SERVICES PROVIDED</title>
+ <para>
+ Only the <option>session</option> service is supported.
+ </para>
+ </refsect1>
+
+ <refsect1 id='pam_umask-return_values'>
+ <title>RETURN VALUES</title>
+ <para>
+ <variablelist>
+
+ <varlistentry>
+ <term>PAM_SUCCESS</term>
+ <listitem>
+ <para>
+ The new umask was set successfull.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>PAM_SERVICE_ERR</term>
+ <listitem>
+ <para>
+ No username was given.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>PAM_USER_UNKNOWN</term>
+ <listitem>
+ <para>
+ User not known.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ </variablelist>
+ </para>
+ </refsect1>
+
+ <refsect1 id='pam_umask-examples'>
+ <title>EXAMPLES</title>
+ <para>
+ Add the following line to <filename>/etc/pam.d/login</filename> to
+ set the user specific umask at login:
+ <programlisting>
+ session optional pam_umask.so umask=0022
+ </programlisting>
+ </para>
+ </refsect1>
+
+ <refsect1 id='pam_umask-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_umask-author'>
+ <title>AUTHOR</title>
+ <para>
+ pam_umask was written by Thorsten Kukuk &lt;kukuk@thkukuk.de&gt;.
+ </para>
+ </refsect1>
+
+</refentry>
+<!-- vim: sw=2
+-->