summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--NEWS2
-rw-r--r--configure.in4
-rw-r--r--modules/pam_localuser/pam_localuser.8.xml2
-rw-r--r--modules/pam_mail/Makefile.am12
-rw-r--r--modules/pam_mail/README89
-rw-r--r--modules/pam_mail/README.xml41
-rw-r--r--modules/pam_mail/pam_mail.8113
-rw-r--r--modules/pam_mail/pam_mail.8.xml281
9 files changed, 525 insertions, 25 deletions
diff --git a/ChangeLog b/ChangeLog
index 7f09d432..ef9968fa 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
2006-06-02 Thorsten Kukuk <kukuk@thkukuk.de>
+ * modules/pam_mail/Makefile.am: Include Make.xml.rules.
+ * modules/pam_mail/pam_mail.8.xml: New.
+ * modules/pam_mail/pam_mail.8: New, generated from xml file.
+ * modules/pam_mail/README.xml: New.
+ * modules/pam_mail/README: Regenerated from xml file.
+
* modules/pam_localuser/Makefile.am: Include Make.xml.rules.
* modules/pam_localuser/pam_localuser.8.xml: New.
* modules/pam_localuser/pam_localuser.8: New, generated from xml file.
diff --git a/NEWS b/NEWS
index d49be76b..f6b346f0 100644
--- a/NEWS
+++ b/NEWS
@@ -5,7 +5,7 @@ Linux-PAM NEWS -- history of user-visible changes.
* Fixed all problems found by Coverity
* Add manual page for pam_mkhomedir, pam_umask, pam_filter,
pam_issue, pam_ftp, pam_group, pam_lastlog, pam_listfile,
- pam_localuser
+ pam_localuser, pam_mail
Release 0.99.4.0
diff --git a/configure.in b/configure.in
index 1a18305a..2478d41a 100644
--- a/configure.in
+++ b/configure.in
@@ -345,10 +345,6 @@ AC_CHECK_LIB([selinux],[getfilecon], LIBSELINUX="-lselinux", LIBSELINUX="")
AC_SUBST(LIBSELINUX)
AM_CONDITIONAL([HAVE_LIBSELINUX], [test ! -z "$LIBSELINUX"])
-dnl Check for xattr support
-AC_CHECK_HEADERS([sys/xattr.h])
-AC_CHECK_FUNCS(llistxattr lgetxattr lsetxattr)
-
dnl Checks for Libcap
AC_CHECK_LIB([cap], [cap_get_proc], LIBCAP="-lcap", LIBCAP="" )
AC_SUBST(LIBCAP)
diff --git a/modules/pam_localuser/pam_localuser.8.xml b/modules/pam_localuser/pam_localuser.8.xml
index f48c041d..4249780c 100644
--- a/modules/pam_localuser/pam_localuser.8.xml
+++ b/modules/pam_localuser/pam_localuser.8.xml
@@ -136,7 +136,7 @@ account required pam_wheel.so
</para>
</refsect1>
- <refsect1 id="pam_lastlog-files">
+ <refsect1 id="pam_localuser-files">
<title>FILES</title>
<variablelist>
<varlistentry>
diff --git a/modules/pam_mail/Makefile.am b/modules/pam_mail/Makefile.am
index 7ba95472..95a25a61 100644
--- a/modules/pam_mail/Makefile.am
+++ b/modules/pam_mail/Makefile.am
@@ -4,7 +4,10 @@
CLEANFILES = *~
-EXTRA_DIST = README tst-pam_mail
+EXTRA_DIST = README $(MANS) $(XMLS) tst-pam_mail
+
+man_MANS = pam_mail.8
+XMLS = README.xml pam_mail.8.xml
TESTS = tst-pam_mail
@@ -19,3 +22,10 @@ if HAVE_VERSIONING
endif
securelib_LTLIBRARIES = pam_mail.la
+
+if ENABLE_REGENERATE_MAN
+noinst_DATA = README
+README: pam_mail.8.xml
+-include $(top_srcdir)/Make.xml.rules
+endif
+
diff --git a/modules/pam_mail/README b/modules/pam_mail/README
index c236fa8c..a0a0b7d9 100644
--- a/modules/pam_mail/README
+++ b/modules/pam_mail/README
@@ -1,18 +1,71 @@
-This is the README for pam_mail
--------------------------------
-
-This PAM module tells the User that he has new/unread email.
-
-Options for:
-auth: for authentication it provides pam_authenticate() and
- pam_setcred() hooks.
-
- "debug" write more information to syslog
- "quit" only inform about new mail
- "standard" don't print name of mail
- "dir=maildir" users mailbox is maildir/<login>
- "hash=count" mail directory hash depth
- "close" print message also on logout
- "nopen" print message not on login
- "noenv" don't set the MAIL environment variable
- "empty" also print message if user has no mail
+pam_mail — Inform about available mail
+
+━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+DESCRIPTION
+
+The pam_mail PAM module provides the "you have new mail" service to the user.
+It can be plugged into any application that has credential or session hooks. It
+gives a single message indicating the newness of any mail it finds in the
+user's mail folder. This module also sets the PAM environment variable, MAIL,
+to the user's mail directory.
+
+If the mail spool file (be it /var/mail/$USER or a pathname given with the dir=
+parameter) is a directory then pam_mail assumes it is in the Maildir format.
+
+OPTIONS
+
+close
+
+ Indicate if the user has any mail also on logout.
+
+debug
+
+ Print debug information.
+
+dir=maildir
+
+ Look for the users' mail in an alternative location defined by maildir/
+ <login>. The default location for mail is /var/mail/<login>. Note, if the
+ supplied maildir is prefixed by a '~', the directory is interpreted as
+ indicating a file in the user's home directory.
+
+empty
+
+ Also print message if user has no mail.
+
+hash=count
+
+ Mail directory hash depth. For example, a hashcount of 2 would make the
+ mail file be /var/spool/mail/u/s/user.
+
+noenv
+
+ Do not set the MAIL environment variable.
+
+nopen
+
+ Don't print any mail information on login. This flag is useful to get the
+ MAIL environment variable set, but to not display any information about it.
+
+quiet
+
+ Only report when there is new mail.
+
+standard
+
+ Old style "You have..." format which doesn't show the mail spool being
+ used. This also implies "empty".
+
+EXAMPLES
+
+Add the following line to /etc/pam.d/login to indicate that the user has new
+mail when they login to the system.
+
+session optional pam_mail.so standard
+
+
+AUTHOR
+
+pam_mail was written by Andrew G. Morgan <morgan@kernel.org>.
+
diff --git a/modules/pam_mail/README.xml b/modules/pam_mail/README.xml
new file mode 100644
index 00000000..4165d857
--- /dev/null
+++ b/modules/pam_mail/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_mail.8.xml">
+-->
+]>
+
+<article>
+
+ <articleinfo>
+
+ <title>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
+ href="pam_mail.8.xml" xpointer='xpointer(//refnamediv[@id = "pam_mail-name"]/*)'/>
+ </title>
+
+ </articleinfo>
+
+ <section>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
+ href="pam_mail.8.xml" xpointer='xpointer(//refsect1[@id = "pam_mail-description"]/*)'/>
+ </section>
+
+ <section>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
+ href="pam_mail.8.xml" xpointer='xpointer(//refsect1[@id = "pam_mail-options"]/*)'/>
+ </section>
+
+ <section>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
+ href="pam_mail.8.xml" xpointer='xpointer(//refsect1[@id = "pam_mail-examples"]/*)'/>
+ </section>
+
+ <section>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
+ href="pam_mail.8.xml" xpointer='xpointer(//refsect1[@id = "pam_mail-author"]/*)'/>
+ </section>
+
+</article>
diff --git a/modules/pam_mail/pam_mail.8 b/modules/pam_mail/pam_mail.8
new file mode 100644
index 00000000..264f5b36
--- /dev/null
+++ b/modules/pam_mail/pam_mail.8
@@ -0,0 +1,113 @@
+.\" Title: pam_mail
+.\" Author:
+.\" Generator: DocBook XSL Stylesheets v1.70.1 <http://docbook.sf.net/>
+.\" Date: 06/02/2006
+.\" Manual: Linux\-PAM Manual
+.\" Source: Linux\-PAM Manual
+.\"
+.TH "PAM_MAIL" "8" "06/02/2006" "Linux\-PAM Manual" "Linux\-PAM Manual"
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.SH "NAME"
+pam_mail \- Inform about available mail
+.SH "SYNOPSIS"
+.HP 12
+\fBpam_mail.so\fR [close] [debug] [dir=\fImaildir\fR] [empty] [hash=\fIcount\fR] [noenv] [nopen] [quit] [standard]
+.SH "DESCRIPTION"
+.PP
+The pam_mail PAM module provides the "you have new mail" service to the user. It can be plugged into any application that has credential or session hooks. It gives a single message indicating the
+\fInewness\fR
+of any mail it finds in the user's mail folder. This module also sets the PAM environment variable,
+\fBMAIL\fR, to the user's mail directory.
+.PP
+If the mail spool file (be it
+\fI/var/mail/$USER\fR
+or a pathname given with the
+\fBdir=\fR
+parameter) is a directory then pam_mail assumes it is in the
+\fIMaildir\fR
+format.
+.SH "OPTIONS"
+.PP
+.TP 3n
+\fBclose\fR
+Indicate if the user has any mail also on logout.
+.TP 3n
+\fBdebug\fR
+Print debug information.
+.TP 3n
+\fBdir=\fR\fB\fImaildir\fR\fR
+Look for the users' mail in an alternative location defined by
+\fImaildir/<login>\fR. The default location for mail is
+\fI/var/mail/<login>\fR. Note, if the supplied
+\fImaildir\fR
+is prefixed by a '~', the directory is interpreted as indicating a file in the user's home directory.
+.TP 3n
+\fBempty\fR
+Also print message if user has no mail.
+.TP 3n
+\fBhash=\fR\fB\fIcount\fR\fR
+Mail directory hash depth. For example, a
+\fIhashcount\fR
+of 2 would make the mail file be
+\fI/var/spool/mail/u/s/user\fR.
+.TP 3n
+\fBnoenv\fR
+Do not set the
+\fBMAIL\fR
+environment variable.
+.TP 3n
+\fBnopen\fR
+Don't print any mail information on login. This flag is useful to get the
+\fBMAIL\fR
+environment variable set, but to not display any information about it.
+.TP 3n
+\fBquiet\fR
+Only report when there is new mail.
+.TP 3n
+\fBstandard\fR
+Old style "You have..." format which doesn't show the mail spool being used. This also implies "empty".
+.SH "MODULE SERVICES PROVIDED"
+.PP
+The
+\fBauth\fR
+and
+\fBaccount\fR
+services are supported.
+.SH "RETURN VALUES"
+.TP 3n
+PAM_BUF_ERR
+Memory buffer error.
+.TP 3n
+PAM_SERVICE_ERR
+Badly formed arguments.
+.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/login\fR
+to indicate that the user has new mail when they login to the system.
+.sp
+.RS 3n
+.nf
+session optional pam_mail.so standard
+
+.fi
+.RE
+.sp
+.SH "SEE ALSO"
+.PP
+
+\fBpam.conf\fR(5),
+\fBpam.d\fR(8),
+\fBpam\fR(8)
+.SH "AUTHOR"
+.PP
+pam_mail was written by Andrew G. Morgan <morgan@kernel.org>.
diff --git a/modules/pam_mail/pam_mail.8.xml b/modules/pam_mail/pam_mail.8.xml
new file mode 100644
index 00000000..8760f98a
--- /dev/null
+++ b/modules/pam_mail/pam_mail.8.xml
@@ -0,0 +1,281 @@
+<?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_mail">
+
+ <refmeta>
+ <refentrytitle>pam_mail</refentrytitle>
+ <manvolnum>8</manvolnum>
+ <refmiscinfo class="sectdesc">Linux-PAM Manual</refmiscinfo>
+ </refmeta>
+
+ <refnamediv id="pam_mail-name">
+ <refname>pam_mail</refname>
+ <refpurpose>Inform about available mail</refpurpose>
+ </refnamediv>
+
+ <refsynopsisdiv>
+ <cmdsynopsis id="pam_mail-cmdsynopsis">
+ <command>pam_mail.so</command>
+ <arg choice="opt">
+ close
+ </arg>
+ <arg choice="opt">
+ debug
+ </arg>
+ <arg choice="opt">
+ dir=<replaceable>maildir</replaceable>
+ </arg>
+ <arg choice="opt">
+ empty
+ </arg>
+ <arg choice="opt">
+ hash=<replaceable>count</replaceable>
+ </arg>
+ <arg choice="opt">
+ noenv
+ </arg>
+ <arg choice="opt">
+ nopen
+ </arg>
+ <arg choice="opt">
+ quit
+ </arg>
+ <arg choice="opt">
+ standard
+ </arg>
+ </cmdsynopsis>
+ </refsynopsisdiv>
+
+ <refsect1 id="pam_mail-description">
+
+ <title>DESCRIPTION</title>
+
+ <para>
+ The pam_mail PAM module provides the "you have new mail"
+ service to the user. It can be plugged into any application
+ that has credential or session hooks. It gives a single message
+ indicating the <emphasis>newness</emphasis> of any mail it finds
+ in the user's mail folder. This module also sets the PAM
+ environment variable, <emphasis remap='B'>MAIL</emphasis>, to the
+ user's mail directory.
+ </para>
+ <para>
+ If the mail spool file (be it <filename>/var/mail/$USER</filename>
+ or a pathname given with the <option>dir=</option> parameter) is
+ a directory then pam_mail assumes it is in the
+ <emphasis remap='I'>Maildir</emphasis> format.
+ </para>
+ </refsect1>
+
+ <refsect1 id="pam_mail-options">
+
+ <title>OPTIONS</title>
+ <para>
+ <variablelist>
+
+ <varlistentry>
+ <term>
+ <option>close</option>
+ </term>
+ <listitem>
+ <para>
+ Indicate if the user has any mail also on logout.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>
+ <option>debug</option>
+ </term>
+ <listitem>
+ <para>
+ Print debug information.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>
+ <option>dir=<replaceable>maildir</replaceable></option>
+ </term>
+ <listitem>
+ <para>
+ Look for the users' mail in an alternative location defined by
+ <filename>maildir/&lt;login&gt;</filename>. The default
+ location for mail is <filename>/var/mail/&lt;login&gt;</filename>.
+ Note, if the supplied
+ <filename>maildir</filename> is prefixed by a '~', the
+ directory is interpreted as indicating a file in the user's
+ home directory.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>
+ <option>empty</option>
+ </term>
+ <listitem>
+ <para>
+ Also print message if user has no mail.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>
+ <option>hash=<replaceable>count</replaceable></option>
+ </term>
+ <listitem>
+ <para>
+ Mail directory hash depth. For example, a
+ <emphasis>hashcount</emphasis> of 2 would
+ make the mail file be
+ <filename>/var/spool/mail/u/s/user</filename>.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>
+ <option>noenv</option>
+ </term>
+ <listitem>
+ <para>
+ Do not set the <emphasis remap='B'>MAIL</emphasis>
+ environment variable.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>
+ <option>nopen</option>
+ </term>
+ <listitem>
+ <para>
+ Don't print any mail information on login. This flag is
+ useful to get the <emphasis remap='B'>MAIL</emphasis>
+ environment variable set, but to not display any information
+ about it.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>
+ <option>quiet</option>
+ </term>
+ <listitem>
+ <para>
+ Only report when there is new mail.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>
+ <option>standard</option>
+ </term>
+ <listitem>
+ <para>
+ Old style "You have..." format which doesn't show the
+ mail spool being used. This also implies "empty".
+ </para>
+ </listitem>
+ </varlistentry>
+
+ </variablelist>
+
+ </para>
+ </refsect1>
+
+ <refsect1 id="pam_mail-services">
+ <title>MODULE SERVICES PROVIDED</title>
+ <para>
+ The <emphasis remap='B'>auth</emphasis> and
+ <emphasis remap='B'>account</emphasis> services are supported.
+ </para>
+ </refsect1>
+
+ <refsect1 id='pam_mail-return_values'>
+ <title>RETURN VALUES</title>
+ <variablelist>
+ <varlistentry>
+ <term>PAM_BUF_ERR</term>
+ <listitem>
+ <para>
+ Memory buffer error.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>PAM_SERVICE_ERR</term>
+ <listitem>
+ <para>
+ Badly formed arguments.
+ </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_mail-examples'>
+ <title>EXAMPLES</title>
+ <para>
+ Add the following line to <filename>/etc/pam.d/login</filename> to
+ indicate that the user has new mail when they login to the system.
+ <programlisting>
+session optional pam_mail.so standard
+ </programlisting>
+ </para>
+ </refsect1>
+
+ <refsect1 id='pam_mail-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_mail-author'>
+ <title>AUTHOR</title>
+ <para>
+ pam_mail was written by Andrew G. Morgan &lt;morgan@kernel.org&gt;.
+ </para>
+ </refsect1>
+
+</refentry>
+<!-- vim: sw=2
+-->