]> granicus.if.org Git - linux-pam/commitdiff
Relevant BUGIDs:
authorThorsten Kukuk <kukuk@thkukuk.de>
Tue, 30 May 2006 07:48:36 +0000 (07:48 +0000)
committerThorsten Kukuk <kukuk@thkukuk.de>
Tue, 30 May 2006 07:48:36 +0000 (07:48 +0000)
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.

ChangeLog
NEWS
modules/pam_umask/Makefile.am
modules/pam_umask/README
modules/pam_umask/README.xml [new file with mode: 0644]
modules/pam_umask/pam_umask.8 [new file with mode: 0644]
modules/pam_umask/pam_umask.8.xml [new file with mode: 0644]

index 6a402b37d13ede729b957394ec6bfa30588dd4cc..c635f9687882e1370b371f9aebcbb8c448b961e9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+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.
+
 2006-05-29  Thorsten Kukuk  <kukuk@thkukuk.de>
 
        * modules/pam_mkhomedir/Makefile.am: Include Make.xml.rules.
diff --git a/NEWS b/NEWS
index 1b91099d290d14b6601b1d063f13251850717e4f..5c55617fd1c0d99fdf69bbb4ccc816774ba0e689 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -3,7 +3,7 @@ Linux-PAM NEWS -- history of user-visible changes.
 
 * pam_tally: Fix support for large UIDs
 * Fixed all problems found by Coverity
-* pam_mkhomedir: Add manual page
+* Add manual page for pam_mkhomedir, pam_umask
 
 Release 0.99.4.0
 
index dc2a3a3b7493d08739a5a6f91f9473d8efe65800..56fa63b4f5d32613e14158853a2cf62bd26e0202 100644 (file)
@@ -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
+
index 3fd4f7f0ee103b708b2bc1d7a734a003dc2fccde..2a4f264146ba508c6821d24b718801e2256cb0d4 100644 (file)
@@ -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 (file)
index 0000000..9afbe54
--- /dev/null
@@ -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 (file)
index 0000000..8e0cbb7
--- /dev/null
@@ -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 (file)
index 0000000..4edbb18
--- /dev/null
@@ -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
+-->