Blame SOURCES/pam-1.5.1-pam-pwhistory-load-conf-from-file.patch

93953e
diff -up Linux-PAM-1.5.1/modules/pam_pwhistory/Makefile.am.pam-pwhistory-load-conf-from-file Linux-PAM-1.5.1/modules/pam_pwhistory/Makefile.am
93953e
--- Linux-PAM-1.5.1/modules/pam_pwhistory/Makefile.am.pam-pwhistory-load-conf-from-file	2020-11-25 17:57:02.000000000 +0100
93953e
+++ Linux-PAM-1.5.1/modules/pam_pwhistory/Makefile.am	2022-08-22 09:08:48.916487811 +0200
93953e
@@ -9,9 +9,10 @@ MAINTAINERCLEANFILES = $(MANS) README
93953e
 EXTRA_DIST = $(XMLS)
93953e
 
93953e
 if HAVE_DOC
93953e
-dist_man_MANS = pam_pwhistory.8 pwhistory_helper.8
93953e
+dist_man_MANS = pam_pwhistory.8 pwhistory_helper.8 pwhistory.conf.5
93953e
 endif
93953e
-XMLS = README.xml pam_pwhistory.8.xml pwhistory_helper.8.xml
93953e
+XMLS = README.xml pam_pwhistory.8.xml pwhistory_helper.8.xml \
93953e
+  pwhistory.conf.5.xml
93953e
 dist_check_SCRIPTS = tst-pam_pwhistory
93953e
 TESTS = $(dist_check_SCRIPTS)
93953e
 
93953e
@@ -26,12 +27,14 @@ if HAVE_VERSIONING
93953e
   pam_pwhistory_la_LDFLAGS += -Wl,--version-script=$(srcdir)/../modules.map
93953e
 endif
93953e
 
93953e
-noinst_HEADERS = opasswd.h
93953e
+noinst_HEADERS = opasswd.h pwhistory_config.h
93953e
+
93953e
+dist_secureconf_DATA = pwhistory.conf
93953e
 
93953e
 securelib_LTLIBRARIES = pam_pwhistory.la
93953e
 pam_pwhistory_la_CFLAGS = $(AM_CFLAGS)
93953e
 pam_pwhistory_la_LIBADD = $(top_builddir)/libpam/libpam.la @LIBCRYPT@ @LIBSELINUX@
93953e
-pam_pwhistory_la_SOURCES = pam_pwhistory.c opasswd.c
93953e
+pam_pwhistory_la_SOURCES = pam_pwhistory.c opasswd.c pwhistory_config.c
93953e
 
93953e
 sbin_PROGRAMS = pwhistory_helper
93953e
 pwhistory_helper_CFLAGS = $(AM_CFLAGS) -DHELPER_COMPILE=\"pwhistory_helper\" @EXE_CFLAGS@
93953e
diff -up Linux-PAM-1.5.1/modules/pam_pwhistory/pam_pwhistory.8.xml.pam-pwhistory-load-conf-from-file Linux-PAM-1.5.1/modules/pam_pwhistory/pam_pwhistory.8.xml
93953e
--- Linux-PAM-1.5.1/modules/pam_pwhistory/pam_pwhistory.8.xml.pam-pwhistory-load-conf-from-file	2020-11-25 17:57:02.000000000 +0100
93953e
+++ Linux-PAM-1.5.1/modules/pam_pwhistory/pam_pwhistory.8.xml	2022-08-22 09:13:08.715628372 +0200
93953e
@@ -36,6 +36,9 @@
93953e
       <arg choice="opt">
93953e
         authtok_type=<replaceable>STRING</replaceable>
93953e
       </arg>
93953e
+      <arg choice="opt">
93953e
+	      conf=<replaceable>/path/to/config-file</replaceable>
93953e
+      </arg>
93953e
 
93953e
     </cmdsynopsis>
93953e
   </refsynopsisdiv>
93953e
@@ -104,7 +107,7 @@
93953e
         <listitem>
93953e
           <para>
93953e
             The last <replaceable>N</replaceable> passwords for each
93953e
-            user are saved in <filename>/etc/security/opasswd</filename>.
93953e
+            user are saved.
93953e
             The default is <emphasis>10</emphasis>. Value of
93953e
             <emphasis>0</emphasis> makes the module to keep the existing
93953e
             contents of the <filename>opasswd</filename> file unchanged.
93953e
@@ -137,7 +140,26 @@
93953e
           </listitem>
93953e
         </varlistentry>
93953e
 
93953e
+        <varlistentry>
93953e
+          <term>
93953e
+            <option>conf=<replaceable>/path/to/config-file</replaceable></option>
93953e
+          </term>
93953e
+          <listitem>
93953e
+            <para>
93953e
+              Use another configuration file instead of the default
93953e
+              <filename>/etc/security/pwhistory.conf</filename>.
93953e
+            </para>
93953e
+          </listitem>
93953e
+        </varlistentry>
93953e
+
93953e
     </variablelist>
93953e
+    <para>
93953e
+      The options for configuring the module behavior are described in the
93953e
+      <citerefentry><refentrytitle>pwhistory.conf</refentrytitle>
93953e
+      <manvolnum>5</manvolnum></citerefentry> manual page. The options
93953e
+      specified on the module command line override the values from the
93953e
+      configuration file.
93953e
+    </para>
93953e
   </refsect1>
93953e
 
93953e
   <refsect1 id="pam_pwhistory-types">
93953e
@@ -223,6 +245,9 @@ password     required       pam_unix.so
93953e
     <title>SEE ALSO</title>
93953e
     <para>
93953e
       <citerefentry>
93953e
+	<refentrytitle>pwhistory.conf</refentrytitle><manvolnum>5</manvolnum>
93953e
+      </citerefentry>,
93953e
+      <citerefentry>
93953e
 	<refentrytitle>pam.conf</refentrytitle><manvolnum>5</manvolnum>
93953e
       </citerefentry>,
93953e
       <citerefentry>
93953e
diff -up Linux-PAM-1.5.1/modules/pam_pwhistory/pam_pwhistory.c.pam-pwhistory-load-conf-from-file Linux-PAM-1.5.1/modules/pam_pwhistory/pam_pwhistory.c
93953e
--- Linux-PAM-1.5.1/modules/pam_pwhistory/pam_pwhistory.c.pam-pwhistory-load-conf-from-file	2020-11-25 17:57:02.000000000 +0100
93953e
+++ Linux-PAM-1.5.1/modules/pam_pwhistory/pam_pwhistory.c	2022-08-22 09:11:34.949855242 +0200
93953e
@@ -63,14 +63,8 @@
93953e
 
93953e
 #include "opasswd.h"
93953e
 #include "pam_inline.h"
93953e
+#include "pwhistory_config.h"
93953e
 
93953e
-struct options_t {
93953e
-  int debug;
93953e
-  int enforce_for_root;
93953e
-  int remember;
93953e
-  int tries;
93953e
-};
93953e
-typedef struct options_t options_t;
93953e
 
93953e
 
93953e
 static void
93953e
@@ -299,6 +293,8 @@ pam_sm_chauthtok (pam_handle_t *pamh, in
93953e
   options.remember = 10;
93953e
   options.tries = 1;
93953e
 
93953e
+  parse_config_file(pamh, argc, argv, &options);
93953e
+
93953e
   /* Parse parameters for module */
93953e
   for ( ; argc-- > 0; argv++)
93953e
     parse_option (pamh, *argv, &options);
93953e
@@ -306,7 +302,6 @@ pam_sm_chauthtok (pam_handle_t *pamh, in
93953e
   if (options.debug)
93953e
     pam_syslog (pamh, LOG_DEBUG, "pam_sm_chauthtok entered");
93953e
 
93953e
-
93953e
   if (options.remember == 0)
93953e
     return PAM_IGNORE;
93953e
 
93953e
diff -up Linux-PAM-1.5.1/modules/pam_pwhistory/pwhistory.conf.5.xml.pam-pwhistory-load-conf-from-file Linux-PAM-1.5.1/modules/pam_pwhistory/pwhistory.conf.5.xml
93953e
--- Linux-PAM-1.5.1/modules/pam_pwhistory/pwhistory.conf.5.xml.pam-pwhistory-load-conf-from-file	2022-08-22 09:08:48.916487811 +0200
93953e
+++ Linux-PAM-1.5.1/modules/pam_pwhistory/pwhistory.conf.5.xml	2022-08-22 09:08:48.916487811 +0200
93953e
@@ -0,0 +1,155 @@
93953e
+
93953e
+
93953e
+	"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd">
93953e
+
93953e
+<refentry id="pwhistory.conf">
93953e
+
93953e
+  <refmeta>
93953e
+    <refentrytitle>pwhistory.conf</refentrytitle>
93953e
+    <manvolnum>5</manvolnum>
93953e
+    <refmiscinfo class="sectdesc">Linux-PAM Manual</refmiscinfo>
93953e
+  </refmeta>
93953e
+
93953e
+  <refnamediv id="pwhistory.conf-name">
93953e
+    <refname>pwhistory.conf</refname>
93953e
+    <refpurpose>pam_pwhistory configuration file</refpurpose>
93953e
+  </refnamediv>
93953e
+
93953e
+  <refsect1 id="pwhistory.conf-description">
93953e
+
93953e
+    <title>DESCRIPTION</title>
93953e
+    <para>
93953e
+       <emphasis remap='B'>pwhistory.conf</emphasis> provides a way to configure the
93953e
+       default settings for saving the last passwords for each user.
93953e
+       This file is read by the <emphasis>pam_pwhistory</emphasis> module and is the
93953e
+       preferred method over configuring <emphasis>pam_pwhistory</emphasis> directly.
93953e
+    </para>
93953e
+    <para>
93953e
+       The file has a very simple <emphasis>name = value</emphasis> format with possible comments
93953e
+       starting with <emphasis>#</emphasis> character. The whitespace at the beginning of line, end
93953e
+       of line, and around the <emphasis>=</emphasis> sign is ignored.
93953e
+    </para>
93953e
+  </refsect1>
93953e
+
93953e
+  <refsect1 id="pwhistory.conf-options">
93953e
+
93953e
+    <title>OPTIONS</title>
93953e
+         <variablelist>
93953e
+            <varlistentry>
93953e
+              <term>
93953e
+                <option>debug</option>
93953e
+              </term>
93953e
+              <listitem>
93953e
+                <para>
93953e
+                  Turns on debugging via
93953e
+                  <citerefentry>
93953e
+                    <refentrytitle>syslog</refentrytitle><manvolnum>3</manvolnum>
93953e
+                  </citerefentry>.
93953e
+                </para>
93953e
+              </listitem>
93953e
+            </varlistentry>
93953e
+            <varlistentry>
93953e
+              <term>
93953e
+                <option>enforce_for_root</option>
93953e
+              </term>
93953e
+              <listitem>
93953e
+                <para>
93953e
+                  If this option is set, the check is enforced for root, too.
93953e
+                </para>
93953e
+              </listitem>
93953e
+            </varlistentry>
93953e
+            <varlistentry>
93953e
+              <term>
93953e
+                <option>remember=<replaceable>N</replaceable></option>
93953e
+              </term>
93953e
+              <listitem>
93953e
+                <para>
93953e
+                  The last <replaceable>N</replaceable> passwords for each
93953e
+                  user are saved.
93953e
+                  The default is <emphasis>10</emphasis>. Value of
93953e
+                  <emphasis>0</emphasis> makes the module to keep the existing
93953e
+                  contents of the <filename>opasswd</filename> file unchanged.
93953e
+                </para>
93953e
+              </listitem>
93953e
+            </varlistentry>
93953e
+            <varlistentry>
93953e
+              <term>
93953e
+                <option>retry=<replaceable>N</replaceable></option>
93953e
+              </term>
93953e
+              <listitem>
93953e
+                <para>
93953e
+                  Prompt user at most <replaceable>N</replaceable> times
93953e
+                  before returning with error. The default is 1.
93953e
+                </para>
93953e
+              </listitem>
93953e
+            </varlistentry>
93953e
+            <varlistentry>
93953e
+              <term>
93953e
+                <option>file=<replaceable>/path/filename</replaceable></option>
93953e
+              </term>
93953e
+              <listitem>
93953e
+                <para>
93953e
+                  Store password history in file
93953e
+                  <replaceable>/path/filename</replaceable> rather than the default
93953e
+                  location. The default location is
93953e
+	                <filename>/etc/security/opasswd</filename>.
93953e
+                </para>
93953e
+              </listitem>
93953e
+            </varlistentry>
93953e
+        </variablelist>
93953e
+  </refsect1>
93953e
+
93953e
+  <refsect1 id='pwhistory.conf-examples'>
93953e
+    <title>EXAMPLES</title>
93953e
+    <para>
93953e
+      /etc/security/pwhistory.conf file example:
93953e
+    </para>
93953e
+    <programlisting>
93953e
+debug
93953e
+remember=5
93953e
+file=/tmp/opasswd
93953e
+    </programlisting>
93953e
+  </refsect1>
93953e
+
93953e
+  <refsect1 id="pwhistory.conf-files">
93953e
+    <title>FILES</title>
93953e
+    <variablelist>
93953e
+      <varlistentry>
93953e
+        <term><filename>/etc/security/pwhistory.conf</filename></term>
93953e
+        <listitem>
93953e
+          <para>the config file for custom options</para>
93953e
+        </listitem>
93953e
+      </varlistentry>
93953e
+    </variablelist>
93953e
+  </refsect1>
93953e
+
93953e
+  <refsect1 id='pwhistory.conf-see_also'>
93953e
+    <title>SEE ALSO</title>
93953e
+    <para>
93953e
+      <citerefentry>
93953e
+        <refentrytitle>pwhistory</refentrytitle><manvolnum>8</manvolnum>
93953e
+      </citerefentry>,
93953e
+      <citerefentry>
93953e
+        <refentrytitle>pam_pwhistory</refentrytitle><manvolnum>8</manvolnum>
93953e
+      </citerefentry>,
93953e
+      <citerefentry>
93953e
+        <refentrytitle>pam.conf</refentrytitle><manvolnum>5</manvolnum>
93953e
+      </citerefentry>,
93953e
+      <citerefentry>
93953e
+        <refentrytitle>pam.d</refentrytitle><manvolnum>5</manvolnum>
93953e
+      </citerefentry>,
93953e
+      <citerefentry>
93953e
+        <refentrytitle>pam</refentrytitle><manvolnum>8</manvolnum>
93953e
+      </citerefentry>
93953e
+    </para>
93953e
+  </refsect1>
93953e
+
93953e
+  <refsect1 id='pwhistory.conf-author'>
93953e
+    <title>AUTHOR</title>
93953e
+      <para>
93953e
+        pam_pwhistory was written by Thorsten Kukuk. The support for
93953e
+        pwhistory.conf was written by Iker Pedrosa.
93953e
+      </para>
93953e
+  </refsect1>
93953e
+
93953e
+</refentry>
93953e
diff -up Linux-PAM-1.5.1/modules/pam_pwhistory/pwhistory_config.c.pam-pwhistory-load-conf-from-file Linux-PAM-1.5.1/modules/pam_pwhistory/pwhistory_config.c
93953e
--- Linux-PAM-1.5.1/modules/pam_pwhistory/pwhistory_config.c.pam-pwhistory-load-conf-from-file	2022-08-22 09:08:48.916487811 +0200
93953e
+++ Linux-PAM-1.5.1/modules/pam_pwhistory/pwhistory_config.c	2022-08-22 09:08:48.916487811 +0200
93953e
@@ -0,0 +1,115 @@
93953e
+/*
93953e
+ * Copyright (c) 2022 Iker Pedrosa <ipedrosa@redhat.com>
93953e
+ *
93953e
+ * Redistribution and use in source and binary forms, with or without
93953e
+ * modification, are permitted provided that the following conditions
93953e
+ * are met:
93953e
+ * 1. Redistributions of source code must retain the above copyright
93953e
+ *    notice, and the entire permission notice in its entirety,
93953e
+ *    including the disclaimer of warranties.
93953e
+ * 2. Redistributions in binary form must reproduce the above copyright
93953e
+ *    notice, this list of conditions and the following disclaimer in the
93953e
+ *    documentation and/or other materials provided with the distribution.
93953e
+ * 3. The name of the author may not be used to endorse or promote
93953e
+ *    products derived from this software without specific prior
93953e
+ *    written permission.
93953e
+ *
93953e
+ * ALTERNATIVELY, this product may be distributed under the terms of
93953e
+ * the GNU Public License, in which case the provisions of the GPL are
93953e
+ * required INSTEAD OF the above restrictions.  (This clause is
93953e
+ * necessary due to a potential bad interaction between the GPL and
93953e
+ * the restrictions contained in a BSD-style copyright.)
93953e
+ *
93953e
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
93953e
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
93953e
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
93953e
+ * DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
93953e
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
93953e
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
93953e
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
93953e
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
93953e
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
93953e
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
93953e
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
93953e
+ */
93953e
+
93953e
+#include "config.h"
93953e
+
93953e
+#include <stdio.h>
93953e
+#include <stdlib.h>
93953e
+#include <string.h>
93953e
+#include <syslog.h>
93953e
+
93953e
+#include <security/pam_modutil.h>
93953e
+
93953e
+#include "pam_inline.h"
93953e
+#include "pwhistory_config.h"
93953e
+
93953e
+#define PWHISTORY_DEFAULT_CONF "/etc/security/pwhistory.conf"
93953e
+
93953e
+void
93953e
+parse_config_file(pam_handle_t *pamh, int argc, const char **argv,
93953e
+                  struct options_t *options)
93953e
+{
93953e
+    const char *fname = NULL;
93953e
+    int i;
93953e
+    char *val;
93953e
+
93953e
+    for (i = 0; i < argc; ++i) {
93953e
+        const char *str = pam_str_skip_prefix(argv[i], "conf=");
93953e
+
93953e
+        if (str != NULL) {
93953e
+            fname = str;
93953e
+        }
93953e
+    }
93953e
+
93953e
+    if (fname == NULL) {
93953e
+        fname = PWHISTORY_DEFAULT_CONF;
93953e
+    }
93953e
+
93953e
+    val = pam_modutil_search_key (pamh, fname, "debug");
93953e
+    if (val != NULL) {
93953e
+        options->debug = 1;
93953e
+        free(val);
93953e
+    }
93953e
+
93953e
+    val = pam_modutil_search_key (pamh, fname, "enforce_for_root");
93953e
+    if (val != NULL) {
93953e
+        options->enforce_for_root = 1;
93953e
+        free(val);
93953e
+    }
93953e
+
93953e
+    val = pam_modutil_search_key (pamh, fname, "remember");
93953e
+    if (val != NULL) {
93953e
+        unsigned int temp;
93953e
+        if (sscanf(val, "%u", &temp) != 1) {
93953e
+            pam_syslog(pamh, LOG_ERR,
93953e
+                "Bad number supplied for remember argument");
93953e
+        } else {
93953e
+            options->remember = temp;
93953e
+        }
93953e
+        free(val);
93953e
+    }
93953e
+
93953e
+    val = pam_modutil_search_key (pamh, fname, "retry");
93953e
+    if (val != NULL) {
93953e
+        unsigned int temp;
93953e
+        if (sscanf(val, "%u", &temp) != 1) {
93953e
+            pam_syslog(pamh, LOG_ERR,
93953e
+                "Bad number supplied for retry argument");
93953e
+        } else {
93953e
+            options->tries = temp;
93953e
+        }
93953e
+        free(val);
93953e
+    }
93953e
+
93953e
+    val = pam_modutil_search_key (pamh, fname, "file");
93953e
+    if (val != NULL) {
93953e
+        if (*val != '/') {
93953e
+            pam_syslog (pamh, LOG_ERR,
93953e
+                "File path should be absolute: %s", val);
93953e
+        } else {
93953e
+            options->filename = val;
93953e
+        }
93953e
+    }
93953e
+}
93953e
diff -up Linux-PAM-1.5.1/modules/pam_pwhistory/pwhistory_config.h.pam-pwhistory-load-conf-from-file Linux-PAM-1.5.1/modules/pam_pwhistory/pwhistory_config.h
93953e
--- Linux-PAM-1.5.1/modules/pam_pwhistory/pwhistory_config.h.pam-pwhistory-load-conf-from-file	2022-08-22 09:08:48.916487811 +0200
93953e
+++ Linux-PAM-1.5.1/modules/pam_pwhistory/pwhistory_config.h	2022-08-22 09:08:48.916487811 +0200
93953e
@@ -0,0 +1,54 @@
93953e
+/*
93953e
+ * Copyright (c) 2022 Iker Pedrosa <ipedrosa@redhat.com>
93953e
+ *
93953e
+ * Redistribution and use in source and binary forms, with or without
93953e
+ * modification, are permitted provided that the following conditions
93953e
+ * are met:
93953e
+ * 1. Redistributions of source code must retain the above copyright
93953e
+ *    notice, and the entire permission notice in its entirety,
93953e
+ *    including the disclaimer of warranties.
93953e
+ * 2. Redistributions in binary form must reproduce the above copyright
93953e
+ *    notice, this list of conditions and the following disclaimer in the
93953e
+ *    documentation and/or other materials provided with the distribution.
93953e
+ * 3. The name of the author may not be used to endorse or promote
93953e
+ *    products derived from this software without specific prior
93953e
+ *    written permission.
93953e
+ *
93953e
+ * ALTERNATIVELY, this product may be distributed under the terms of
93953e
+ * the GNU Public License, in which case the provisions of the GPL are
93953e
+ * required INSTEAD OF the above restrictions.  (This clause is
93953e
+ * necessary due to a potential bad interaction between the GPL and
93953e
+ * the restrictions contained in a BSD-style copyright.)
93953e
+ *
93953e
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
93953e
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
93953e
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
93953e
+ * DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
93953e
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
93953e
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
93953e
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
93953e
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
93953e
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
93953e
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
93953e
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
93953e
+ */
93953e
+
93953e
+#ifndef _PWHISTORY_CONFIG_H
93953e
+#define _PWHISTORY_CONFIG_H
93953e
+
93953e
+#include <security/pam_ext.h>
93953e
+
93953e
+struct options_t {
93953e
+    int debug;
93953e
+    int enforce_for_root;
93953e
+    int remember;
93953e
+    int tries;
93953e
+    const char *filename;
93953e
+};
93953e
+typedef struct options_t options_t;
93953e
+
93953e
+void
93953e
+parse_config_file(pam_handle_t *pamh, int argc, const char **argv,
93953e
+                  struct options_t *options);
93953e
+
93953e
+#endif /* _PWHISTORY_CONFIG_H */
93953e
diff -up Linux-PAM-1.5.1/modules/pam_pwhistory/pwhistory.conf.pam-pwhistory-load-conf-from-file Linux-PAM-1.5.1/modules/pam_pwhistory/pwhistory.conf
93953e
--- Linux-PAM-1.5.1/modules/pam_pwhistory/pwhistory.conf.pam-pwhistory-load-conf-from-file	2022-08-22 09:08:48.916487811 +0200
93953e
+++ Linux-PAM-1.5.1/modules/pam_pwhistory/pwhistory.conf	2022-08-22 09:08:48.916487811 +0200
93953e
@@ -0,0 +1,21 @@
93953e
+# Configuration for remembering the last passwords used by a user.
93953e
+#
93953e
+# Enable the debugging logs.
93953e
+# Enabled if option is present.
93953e
+# debug
93953e
+#
93953e
+# root account's passwords are also remembered.
93953e
+# Enabled if option is present.
93953e
+# enforce_for_root
93953e
+#
93953e
+# Number of passwords to remember.
93953e
+# The default is 10.
93953e
+# remember = 10
93953e
+#
93953e
+# Number of times to prompt for the password.
93953e
+# The default is 1.
93953e
+# retry = 1
93953e
+#
93953e
+# The directory where the last passwords are kept.
93953e
+# The default is /etc/security/opasswd.
93953e
+# file = /etc/security/opasswd