Compare commits
10 Commits
Author | SHA256 | Date | |
---|---|---|---|
071977fd44 | |||
3d5e218c8a | |||
67e57c9e28 | |||
04a3e5eebe | |||
236b67f108 | |||
e76575c74c | |||
e6ce448d04 | |||
d38ba0510d | |||
585cbae300 | |||
c2853cc7a5 |
@@ -1,3 +1,23 @@
|
||||
-------------------------------------------------------------------
|
||||
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>
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# 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
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
|
@@ -9,7 +9,7 @@ parse()
|
||||
set -- $line
|
||||
if [ "$1" = 'g' ]; then
|
||||
echo "group($2)"
|
||||
elif [ "$1" = 'u' ]; then
|
||||
elif [ "$1" = 'u' ] || [ "$1" = 'u!' ] ; then
|
||||
echo "user($2)"
|
||||
echo "group($2)"
|
||||
fi
|
||||
|
@@ -7,15 +7,19 @@ run() {
|
||||
"$@"
|
||||
}
|
||||
|
||||
SYSTEMD_VERSION=0
|
||||
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
|
||||
REPLACE_ARG="--replace=/usr/lib/sysusers.d/$1"
|
||||
fi
|
||||
# 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 -
|
||||
fi
|
||||
run /usr/bin/systemd-sysusers $REPLACE_ARG -
|
||||
else
|
||||
# Absolute path to busybox, if found
|
||||
busybox=
|
||||
@@ -94,7 +98,7 @@ else
|
||||
|
||||
run /usr/sbin/useradd -r -c "$3" -d "${homedir}" $ARGUMENTS
|
||||
if [ -n "$EXPIRE_DATE" ]; then
|
||||
TZ=UTC chage -E "$EXPIRE_DATE" "$1"
|
||||
run chage -E "$EXPIRE_DATE" "$1"
|
||||
fi
|
||||
elif [ -x "$busybox" ]; then
|
||||
if [ -n "$GROUP_ID" ] && [ "$GROUP_ID" != "-" ]; then
|
||||
|
Reference in New Issue
Block a user