Refresh patches

This commit is contained in:
Chris Hofstaedtler
2025-03-16 13:48:32 +01:00
parent 0e6f426896
commit 6360940c7f
2 changed files with 18 additions and 21 deletions
+13 -16
View File
@@ -7,8 +7,8 @@ Remove settings only applicable without PAM support enabled.
Remove obscure commented-out settings.
Remove explanation about write(1), which Debian does not ship anymore.
---
etc/login.defs | 375 ++++++++-------------------------------------------------
1 file changed, 47 insertions(+), 328 deletions(-)
etc/login.defs | 369 +++++++--------------------------------------------------
1 file changed, 44 insertions(+), 325 deletions(-)
diff --git a/etc/login.defs b/etc/login.defs
index 33622c2..91d3ec4 100644
@@ -21,22 +21,14 @@ index 33622c2..91d3ec4 100644
-# $Id$
-#
-#
-# Delay in seconds before being allowed another attempt after a login failure
-# Note: When PAM is used, some modules may enforce a minimum delay (e.g.
-# pam_unix(8) enforces a 2s delay)
-#
-FAIL_DELAY 3
-
-#
-# Enable logging and display of /var/log/faillog login(1) failure info.
-#
-FAILLOG_ENAB yes
+# REQUIRED for useradd/userdel/usermod
+# Directory where mailboxes reside, _or_ name of file, relative to the
+# home directory. If you _do_ define MAIL_DIR and MAIL_FILE,
+# MAIL_DIR takes precedence.
+#
#
-# Delay in seconds before being allowed another attempt after a login failure
-# Note: When PAM is used, some modules may enforce a minimum delay (e.g.
-# pam_unix(8) enforces a 2s delay)
+# Essentially:
+# - MAIL_DIR defines the location of users mail spool files
+# (for mbox use) by appending the username to MAIL_DIR as defined
@@ -44,13 +36,18 @@ index 33622c2..91d3ec4 100644
+# - MAIL_FILE defines the location of the users mail spool files as the
+# fully-qualified filename obtained by prepending the user home
+# directory before $MAIL_FILE
+#
#
-FAIL_DELAY 3
-
+# NOTE: This is no more used for setting up users MAIL environment variable
+# which is, starting from shadow 4.0.12-1 in Debian, entirely the
+# job of the pam_mail PAM modules
+# See default PAM configuration files provided for
+# login, su, etc.
+#
#
-# Enable logging and display of /var/log/faillog login(1) failure info.
-#
-FAILLOG_ENAB yes
+# This is a temporary situation: setting these variables will soon
+# move to /etc/default/useradd and the variables will then be
+# no more supported
@@ -30,17 +30,17 @@ index 4c96fba..f06cb44 100644
*/
static char *copy_field (char *in, char *out, char *extra)
{
- while (NULL != in) {
- char *f;
+ char *cp = NULL;
- f = strsep(&in, ",");
+ while (NULL != in) {
+
while (NULL != in) {
- char *f;
+ cp = strchr (in, ',');
+ if (NULL != cp) {
+ *cp++ = '\0';
+ }
- f = strsep(&in, ",");
-
- if (strchr(f, '=') == NULL)
+ if (strchr (in, '=') == NULL) {
break;