Compare commits
12 Commits
| Author | SHA256 | Date | |
|---|---|---|---|
| ea998dc599 | |||
| 87b7175668 | |||
| 071977fd44 | |||
| 3d5e218c8a | |||
| 67e57c9e28 | |||
| 04a3e5eebe | |||
| 236b67f108 | |||
| e76575c74c | |||
| e6ce448d04 | |||
| d38ba0510d | |||
| 585cbae300 | |||
| c2853cc7a5 |
@@ -1,3 +1,28 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Sat Nov 1 15:48:03 UTC 2025 - Thorsten Kukuk <kukuk@suse.com>
|
||||||
|
|
||||||
|
- Remove dependency on chage
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Aug 28 15:16:04 UTC 2025 - Thorsten Kukuk <kukuk@suse.com>
|
||||||
|
|
||||||
|
- Fallback to useradd if systemd is older than v257 [bsc#1248855]
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Aug 27 06:56:02 UTC 2025 - Thorsten Kukuk <kukuk@suse.com>
|
||||||
|
|
||||||
|
- Don't set TZ=UTC for chage to avoid dependency on env.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Aug 26 09:45:05 UTC 2025 - Thorsten Kukuk <kukuk@suse.com>
|
||||||
|
|
||||||
|
- Use run macro for chage for log files/debugging.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Aug 25 07:17:30 UTC 2025 - Thorsten Kukuk <kukuk@suse.com>
|
||||||
|
|
||||||
|
- Generate provides for "u!".
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Jul 23 18:28:04 UTC 2025 - Marcus Meissner <meissner@suse.com>
|
Wed Jul 23 18:28:04 UTC 2025 - Marcus Meissner <meissner@suse.com>
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package sysuser-tools
|
# spec file for package sysuser-tools
|
||||||
#
|
#
|
||||||
# Copyright (c) 2025 SUSE LLC
|
# Copyright (c) 2025 SUSE LLC and contributors
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ parse()
|
|||||||
set -- $line
|
set -- $line
|
||||||
if [ "$1" = 'g' ]; then
|
if [ "$1" = 'g' ]; then
|
||||||
echo "group($2)"
|
echo "group($2)"
|
||||||
elif [ "$1" = 'u' ]; then
|
elif [ "$1" = 'u' ] || [ "$1" = 'u!' ] ; then
|
||||||
echo "user($2)"
|
echo "user($2)"
|
||||||
echo "group($2)"
|
echo "group($2)"
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -7,15 +7,19 @@ run() {
|
|||||||
"$@"
|
"$@"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SYSTEMD_VERSION=0
|
||||||
if [ -x /usr/bin/systemd-sysusers ] && [ -e /proc/version ]; then
|
if [ -x /usr/bin/systemd-sysusers ] && [ -e /proc/version ]; then
|
||||||
|
SYSTEMD_VERSION=$(systemd-sysusers --version | head -n1 | sed 's|systemd \([0-9]\+\).*|\1|g')
|
||||||
|
fi
|
||||||
|
|
||||||
|
# "u!" is only supported with systemd-sysusers v257 or newer
|
||||||
|
if [ -x /usr/bin/systemd-sysusers ] && [ -e /proc/version ] && [ $SYSTEMD_VERSION -ge 257 ]; then
|
||||||
|
|
||||||
if [ -n "$1" ] && [ "$1" != "%3" ]; then
|
if [ -n "$1" ] && [ "$1" != "%3" ]; then
|
||||||
REPLACE_ARG="--replace=/usr/lib/sysusers.d/$1"
|
REPLACE_ARG="--replace=/usr/lib/sysusers.d/$1"
|
||||||
fi
|
fi
|
||||||
# Use systemd-sysusers and let it read the input directly from stdin
|
# Use systemd-sysusers and let it read the input directly from stdin
|
||||||
if ! run /usr/bin/systemd-sysusers $REPLACE_ARG - ; then
|
run /usr/bin/systemd-sysusers $REPLACE_ARG -
|
||||||
run /usr/bin/systemd-sysusers -
|
|
||||||
fi
|
|
||||||
else
|
else
|
||||||
# Absolute path to busybox, if found
|
# Absolute path to busybox, if found
|
||||||
busybox=
|
busybox=
|
||||||
@@ -48,7 +52,7 @@ else
|
|||||||
;;
|
;;
|
||||||
u|u\!)
|
u|u\!)
|
||||||
if [ "${1}" = "u!" ]; then
|
if [ "${1}" = "u!" ]; then
|
||||||
EXPIRE_DATE="1970-01-02"
|
LOCK_ACCOUNT=1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
shift
|
shift
|
||||||
@@ -93,8 +97,8 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
run /usr/sbin/useradd -r -c "$3" -d "${homedir}" $ARGUMENTS
|
run /usr/sbin/useradd -r -c "$3" -d "${homedir}" $ARGUMENTS
|
||||||
if [ -n "$EXPIRE_DATE" ]; then
|
if [ -n "$LOCK_ACCOUNT" ] && [ -x /usr/sbin/usermod ]; then
|
||||||
TZ=UTC chage -E "$EXPIRE_DATE" "$1"
|
run /usr/sbin/usermod --expiredate 1 "$1"
|
||||||
fi
|
fi
|
||||||
elif [ -x "$busybox" ]; then
|
elif [ -x "$busybox" ]; then
|
||||||
if [ -n "$GROUP_ID" ] && [ "$GROUP_ID" != "-" ]; then
|
if [ -n "$GROUP_ID" ] && [ "$GROUP_ID" != "-" ]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user