Skip to content

Commit

Permalink
shadow: update to 4.17.0
Browse files Browse the repository at this point in the history
- Sync login.defs with upstream.
- Change decade-old umask value to 022.
  • Loading branch information
Cyanoxygen committed Dec 30, 2024
1 parent 4486825 commit 697f657
Show file tree
Hide file tree
Showing 2 changed files with 93 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
From a0b84a56792bf351eb4693d1cda4dbbcdc000664 Mon Sep 17 00:00:00 2001
From: Xinhui Yang <[email protected]>
Date: Mon, 30 Dec 2024 22:12:24 +0800
Subject: [PATCH] login.defs: Adapt to AOSC configuration

---
etc/login.defs | 25 +++++++++++++++----------
1 file changed, 15 insertions(+), 10 deletions(-)

diff --git a/etc/login.defs b/etc/login.defs
index 33622c29..8a325098 100644
--- a/etc/login.defs
+++ b/etc/login.defs
@@ -86,8 +86,8 @@ CONSOLE /etc/securetty
#
# If defined, ":" delimited list of "message of the day" files to
# be displayed upon login.
-#
-MOTD_FILE /etc/motd
+# AOSC: this variable was empty in the previous login.defs file.
+MOTD_FILE
#MOTD_FILE /etc/motd:/usr/lib/news/news-motd

#
@@ -158,8 +158,9 @@ ENV_HZ HZ=100
# *REQUIRED* The default PATH settings, for superuser and normal users.
#
# (they are minimal, add the rest in the shell startup files)
-ENV_SUPATH PATH=/sbin:/bin:/usr/sbin:/usr/bin
-ENV_PATH PATH=/bin:/usr/bin
+# AOSC: These settings are overridden by /etc/bashrc.
+ENV_SUPATH PATH=/usr/bin
+ENV_PATH PATH=/usr/bin

#
# Terminal permissions
@@ -188,9 +189,10 @@ TTYPERM 0600
#
# Prefix these values with "0" to get octal, "0x" to get hexadecimal.
#
-ERASECHAR 0177
+# AOSC: ERASECHAR is commented by commit cb4fbfd199e7002dabbf341adaac47c318d564ed.
+# ERASECHAR 0177
KILLCHAR 025
-#ULIMIT 2097152
+# ULIMIT 2097152

# Default initial "umask" value used by login(1) on non-PAM enabled systems.
# Default "umask" value for pam_umask(8) on PAM enabled systems.
@@ -216,7 +218,8 @@ UMASK 022
#
PASS_MAX_DAYS 99999
PASS_MIN_DAYS 0
-PASS_MIN_LEN 5
+# AOSC: This was previously undefined. Setting to 1 to keep the previous behavior.
+PASS_MIN_LEN 1
PASS_WARN_AGE 7

#
@@ -233,7 +236,8 @@ SU_WHEEL_ONLY no
UID_MIN 1000
UID_MAX 60000
# System accounts
-SYS_UID_MIN 101
+# AOSC: SYS_UID_MIN and SYS_GID_MIN was previously 500 instead of 101.
+SYS_UID_MIN 500
SYS_UID_MAX 999
# Extra per user uids
SUB_UID_MIN 100000
@@ -246,7 +250,7 @@ SUB_UID_COUNT 65536
GID_MIN 1000
GID_MAX 60000
# System accounts
-SYS_GID_MIN 101
+SYS_GID_MIN 500
SYS_GID_MAX 999
# Extra per user group ids
SUB_GID_MIN 100000
@@ -329,7 +333,8 @@ CHFN_RESTRICT rwh
# Note: If you use PAM, it is recommended to use a value consistent with
# the PAM modules configuration.
#
-#ENCRYPT_METHOD DES
+# AOSC: This was previously SHA512.
+ENCRYPT_METHOD SHA512

#
# Only works if ENCRYPT_METHOD is set to SHA256 or SHA512.
--
2.47.1

5 changes: 2 additions & 3 deletions app-admin/shadow/spec
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
VER=4.15.1
VER=4.17.0
SRCS="tbl::https://github.com/shadow-maint/shadow/releases/download/$VER/shadow-$VER.tar.xz"
CHKSUMS="sha256::bb5f70639a0581f9d626f227ce45b31ac137daa7c451c0f672ce14f2731a96ee"
CHKSUMS="sha256::df0d29d09ed1db609234aaec670f55ebf724bc7bd0b377c8a299913669b7878e"
CHKUPDATE="anitya::id=4802"
REL=2

0 comments on commit 697f657

Please sign in to comment.