diff options
Diffstat (limited to 'modules/pam_mail')
-rw-r--r-- | modules/pam_mail/Makefile.am | 4 | ||||
-rw-r--r-- | modules/pam_mail/Makefile.in | 15 | ||||
-rw-r--r-- | modules/pam_mail/README.xml | 32 | ||||
-rw-r--r-- | modules/pam_mail/pam_mail.8 | 26 | ||||
-rw-r--r-- | modules/pam_mail/pam_mail.8.xml | 73 | ||||
-rw-r--r-- | modules/pam_mail/pam_mail.c | 14 |
6 files changed, 81 insertions, 83 deletions
diff --git a/modules/pam_mail/Makefile.am b/modules/pam_mail/Makefile.am index 6756f409..1f52bcd1 100644 --- a/modules/pam_mail/Makefile.am +++ b/modules/pam_mail/Makefile.am @@ -15,7 +15,11 @@ dist_check_SCRIPTS = tst-pam_mail TESTS = $(dist_check_SCRIPTS) securelibdir = $(SECUREDIR) +if HAVE_VENDORDIR +secureconfdir = $(VENDOR_SCONFIGDIR) +else secureconfdir = $(SCONFIGDIR) +endif AM_CFLAGS = -I$(top_srcdir)/libpam/include -I$(top_srcdir)/libpamc/include \ $(WARN_CFLAGS) diff --git a/modules/pam_mail/Makefile.in b/modules/pam_mail/Makefile.in index fbbffa78..36df81cd 100644 --- a/modules/pam_mail/Makefile.in +++ b/modules/pam_mail/Makefile.in @@ -428,6 +428,7 @@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ +DOCBOOK_RNG = @DOCBOOK_RNG@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ @@ -440,11 +441,13 @@ EXEEXT = @EXEEXT@ EXE_CFLAGS = @EXE_CFLAGS@ EXE_LDFLAGS = @EXE_LDFLAGS@ FGREP = @FGREP@ +FILECMD = @FILECMD@ FO2PDF = @FO2PDF@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ +HTML_STYLESHEET = @HTML_STYLESHEET@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -476,12 +479,14 @@ LIBSELINUX = @LIBSELINUX@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ +LOGIND_CFLAGS = @LOGIND_CFLAGS@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ +MAN_STYLESHEET = @MAN_STYLESHEET@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ @@ -504,6 +509,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PDF_STYLESHEET = @PDF_STYLESHEET@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ @@ -514,12 +520,16 @@ SECUREDIR = @SECUREDIR@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ -STRINGPARAM_HMAC = @STRINGPARAM_HMAC@ +STRINGPARAM_PROFILECONDITIONS = @STRINGPARAM_PROFILECONDITIONS@ STRINGPARAM_VENDORDIR = @STRINGPARAM_VENDORDIR@ STRIP = @STRIP@ +SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@ +SYSTEMD_LIBS = @SYSTEMD_LIBS@ TIRPC_CFLAGS = @TIRPC_CFLAGS@ TIRPC_LIBS = @TIRPC_LIBS@ +TXT_STYLESHEET = @TXT_STYLESHEET@ USE_NLS = @USE_NLS@ +VENDOR_SCONFIGDIR = @VENDOR_SCONFIGDIR@ VERSION = @VERSION@ WARN_CFLAGS = @WARN_CFLAGS@ XGETTEXT = @XGETTEXT@ @@ -593,7 +603,8 @@ XMLS = README.xml pam_mail.8.xml dist_check_SCRIPTS = tst-pam_mail TESTS = $(dist_check_SCRIPTS) securelibdir = $(SECUREDIR) -secureconfdir = $(SCONFIGDIR) +@HAVE_VENDORDIR_FALSE@secureconfdir = $(SCONFIGDIR) +@HAVE_VENDORDIR_TRUE@secureconfdir = $(VENDOR_SCONFIGDIR) AM_CFLAGS = -I$(top_srcdir)/libpam/include -I$(top_srcdir)/libpamc/include \ $(WARN_CFLAGS) diff --git a/modules/pam_mail/README.xml b/modules/pam_mail/README.xml index 4165d857..5dc89a85 100644 --- a/modules/pam_mail/README.xml +++ b/modules/pam_mail/README.xml @@ -1,41 +1,27 @@ -<?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 xmlns="http://docbook.org/ns/docbook" version="5.0"> -<article> - - <articleinfo> + <info> <title> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" - href="pam_mail.8.xml" xpointer='xpointer(//refnamediv[@id = "pam_mail-name"]/*)'/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="pam_mail.8.xml" xpointer='xpointer(id("pam_mail-name")/*)'/> </title> - </articleinfo> + </info> <section> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" - href="pam_mail.8.xml" xpointer='xpointer(//refsect1[@id = "pam_mail-description"]/*)'/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="pam_mail.8.xml" xpointer='xpointer(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"]/*)'/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="pam_mail.8.xml" xpointer='xpointer(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"]/*)'/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="pam_mail.8.xml" xpointer='xpointer(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"]/*)'/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="pam_mail.8.xml" xpointer='xpointer(id("pam_mail-author")/*)'/> </section> -</article> +</article>
\ No newline at end of file diff --git a/modules/pam_mail/pam_mail.8 b/modules/pam_mail/pam_mail.8 index a6f77667..36b95ba8 100644 --- a/modules/pam_mail/pam_mail.8 +++ b/modules/pam_mail/pam_mail.8 @@ -1,13 +1,13 @@ '\" t .\" Title: pam_mail .\" Author: [see the "AUTHOR" section] -.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/> -.\" Date: 09/03/2021 +.\" Generator: DocBook XSL Stylesheets v1.79.2 <http://docbook.sf.net/> +.\" Date: 05/07/2023 .\" Manual: Linux-PAM Manual -.\" Source: Linux-PAM Manual +.\" Source: Linux-PAM .\" Language: English .\" -.TH "PAM_MAIL" "8" "09/03/2021" "Linux-PAM Manual" "Linux\-PAM Manual" +.TH "PAM_MAIL" "8" "05/07/2023" "Linux\-PAM" "Linux\-PAM Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -49,17 +49,17 @@ format\&. .SH "OPTIONS" .PP .PP -\fBclose\fR +close .RS 4 Indicate if the user has any mail also on logout\&. .RE .PP -\fBdebug\fR +debug .RS 4 Print debug information\&. .RE .PP -\fBdir=\fR\fB\fImaildir\fR\fR +dir=maildir .RS 4 Look for the user\*(Aqs mail in an alternative location defined by maildir/<login>\&. The default location for mail is @@ -68,12 +68,12 @@ maildir is prefixed by a \*(Aq~\*(Aq, the directory is interpreted as indicating a file in the user\*(Aqs home directory\&. .RE .PP -\fBempty\fR +empty .RS 4 Also print message if user has no mail\&. .RE .PP -\fBhash=\fR\fB\fIcount\fR\fR +hash=count .RS 4 Mail directory hash depth\&. For example, a \fIhashcount\fR @@ -81,26 +81,26 @@ of 2 would make the mail file be /var/spool/mail/u/s/user\&. .RE .PP -\fBnoenv\fR +noenv .RS 4 Do not set the \fBMAIL\fR environment variable\&. .RE .PP -\fBnopen\fR +nopen .RS 4 Don\*(Aqt 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\&. .RE .PP -\fBquiet\fR +quiet .RS 4 Only report when there is new mail\&. .RE .PP -\fBstandard\fR +standard .RS 4 Old style "You have\&.\&.\&." format which doesn\*(Aqt show the mail spool being used\&. This also implies "empty"\&. .RE diff --git a/modules/pam_mail/pam_mail.8.xml b/modules/pam_mail/pam_mail.8.xml index 95216b6c..2c0c0543 100644 --- a/modules/pam_mail/pam_mail.8.xml +++ b/modules/pam_mail/pam_mail.8.xml @@ -1,54 +1,51 @@ -<?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"> +<refentry xmlns="http://docbook.org/ns/docbook" version="5.0" xml:id="pam_mail"> <refmeta> <refentrytitle>pam_mail</refentrytitle> <manvolnum>8</manvolnum> - <refmiscinfo class="sectdesc">Linux-PAM Manual</refmiscinfo> + <refmiscinfo class="source">Linux-PAM</refmiscinfo> + <refmiscinfo class="manual">Linux-PAM Manual</refmiscinfo> </refmeta> - <refnamediv id="pam_mail-name"> + <refnamediv xml:id="pam_mail-name"> <refname>pam_mail</refname> <refpurpose>Inform about available mail</refpurpose> </refnamediv> <refsynopsisdiv> - <cmdsynopsis id="pam_mail-cmdsynopsis"> + <cmdsynopsis xml:id="pam_mail-cmdsynopsis" sepchar=" "> <command>pam_mail.so</command> - <arg choice="opt"> + <arg choice="opt" rep="norepeat"> close </arg> - <arg choice="opt"> + <arg choice="opt" rep="norepeat"> debug </arg> - <arg choice="opt"> + <arg choice="opt" rep="norepeat"> dir=<replaceable>maildir</replaceable> </arg> - <arg choice="opt"> + <arg choice="opt" rep="norepeat"> empty </arg> - <arg choice="opt"> + <arg choice="opt" rep="norepeat"> hash=<replaceable>count</replaceable> </arg> - <arg choice="opt"> + <arg choice="opt" rep="norepeat"> noenv </arg> - <arg choice="opt"> + <arg choice="opt" rep="norepeat"> nopen </arg> - <arg choice="opt"> + <arg choice="opt" rep="norepeat"> quiet </arg> - <arg choice="opt"> + <arg choice="opt" rep="norepeat"> standard </arg> </cmdsynopsis> </refsynopsisdiv> - <refsect1 id="pam_mail-description"> + <refsect1 xml:id="pam_mail-description"> <title>DESCRIPTION</title> @@ -58,18 +55,18 @@ 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 + 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. + <emphasis remap="I">Maildir</emphasis> format. </para> </refsect1> - <refsect1 id="pam_mail-options"> + <refsect1 xml:id="pam_mail-options"> <title>OPTIONS</title> <para> @@ -77,7 +74,7 @@ <varlistentry> <term> - <option>close</option> + close </term> <listitem> <para> @@ -88,7 +85,7 @@ <varlistentry> <term> - <option>debug</option> + debug </term> <listitem> <para> @@ -99,7 +96,7 @@ <varlistentry> <term> - <option>dir=<replaceable>maildir</replaceable></option> + dir=maildir </term> <listitem> <para> @@ -116,7 +113,7 @@ <varlistentry> <term> - <option>empty</option> + empty </term> <listitem> <para> @@ -127,7 +124,7 @@ <varlistentry> <term> - <option>hash=<replaceable>count</replaceable></option> + hash=count </term> <listitem> <para> @@ -141,11 +138,11 @@ <varlistentry> <term> - <option>noenv</option> + noenv </term> <listitem> <para> - Do not set the <emphasis remap='B'>MAIL</emphasis> + Do not set the <emphasis remap="B">MAIL</emphasis> environment variable. </para> </listitem> @@ -153,12 +150,12 @@ <varlistentry> <term> - <option>nopen</option> + nopen </term> <listitem> <para> Don't print any mail information on login. This flag is - useful to get the <emphasis remap='B'>MAIL</emphasis> + useful to get the <emphasis remap="B">MAIL</emphasis> environment variable set, but to not display any information about it. </para> @@ -167,7 +164,7 @@ <varlistentry> <term> - <option>quiet</option> + quiet </term> <listitem> <para> @@ -178,7 +175,7 @@ <varlistentry> <term> - <option>standard</option> + standard </term> <listitem> <para> @@ -193,7 +190,7 @@ </para> </refsect1> - <refsect1 id="pam_mail-types"> + <refsect1 xml:id="pam_mail-types"> <title>MODULE TYPES PROVIDED</title> <para> The <option>session</option> and @@ -202,7 +199,7 @@ </para> </refsect1> - <refsect1 id='pam_mail-return_values'> + <refsect1 xml:id="pam_mail-return_values"> <title>RETURN VALUES</title> <variablelist> <varlistentry> @@ -244,7 +241,7 @@ </variablelist> </refsect1> - <refsect1 id='pam_mail-examples'> + <refsect1 xml:id="pam_mail-examples"> <title>EXAMPLES</title> <para> Add the following line to <filename>/etc/pam.d/login</filename> to @@ -255,7 +252,7 @@ session optional pam_mail.so standard </para> </refsect1> - <refsect1 id='pam_mail-see_also'> + <refsect1 xml:id="pam_mail-see_also"> <title>SEE ALSO</title> <para> <citerefentry> @@ -270,11 +267,11 @@ session optional pam_mail.so standard </para> </refsect1> - <refsect1 id='pam_mail-author'> + <refsect1 xml:id="pam_mail-author"> <title>AUTHOR</title> <para> pam_mail was written by Andrew G. Morgan <morgan@kernel.org>. </para> </refsect1> -</refentry> +</refentry>
\ No newline at end of file diff --git a/modules/pam_mail/pam_mail.c b/modules/pam_mail/pam_mail.c index 17383c7b..2b77e560 100644 --- a/modules/pam_mail/pam_mail.c +++ b/modules/pam_mail/pam_mail.c @@ -169,7 +169,7 @@ get_folder(pam_handle_t *pamh, int ctrl, hash[2 * i] = '\0'; rc = asprintf(&folder, MAIL_FILE_FORMAT, path, hash, pwd->pw_name); - _pam_overwrite(hash); + pam_overwrite_string(hash); _pam_drop(hash); if (rc < 0) goto get_folder_cleanup; @@ -211,7 +211,7 @@ get_mail_status(pam_handle_t *pamh, int ctrl, const char *folder) } i = scandir(dir, &namelist, 0, alphasort); save_errno = errno; - _pam_overwrite(dir); + pam_overwrite_string(dir); _pam_drop(dir); if (i < 0) { type = 0; @@ -232,7 +232,7 @@ get_mail_status(pam_handle_t *pamh, int ctrl, const char *folder) } i = scandir(dir, &namelist, 0, alphasort); save_errno = errno; - _pam_overwrite(dir); + pam_overwrite_string(dir); _pam_drop(dir); if (i < 0) { type = 0; @@ -264,7 +264,7 @@ get_mail_status(pam_handle_t *pamh, int ctrl, const char *folder) } get_mail_status_cleanup: - memset(&mail_st, 0, sizeof(mail_st)); + pam_overwrite_object(&mail_st); D(("user has %d mail in %s folder", type, folder)); return type; } @@ -286,7 +286,7 @@ report_mail(pam_handle_t *pamh, int ctrl, int type, const char *folder) switch (type) { case HAVE_NO_MAIL: - retval = pam_info (pamh, "%s", _("You have no mail.")); + retval = pam_info (pamh, "%s", _("You do not have any new mail.")); break; case HAVE_NEW_MAIL: retval = pam_info (pamh, "%s", _("You have new mail.")); @@ -415,7 +415,7 @@ static int _do_mail(pam_handle_t *pamh, int flags, int argc, } D(("setting env: %s", tmp)); retval = pam_putenv(pamh, tmp); - _pam_overwrite(tmp); + pam_overwrite_string(tmp); _pam_drop(tmp); if (retval != PAM_SUCCESS) { pam_syslog(pamh, LOG_CRIT, @@ -457,7 +457,7 @@ static int _do_mail(pam_handle_t *pamh, int flags, int argc, (void) pam_putenv(pamh, MAIL_ENV_NAME); do_mail_cleanup: - _pam_overwrite(folder); + pam_overwrite_string(folder); _pam_drop(folder); /* indicate success or failure */ |