Dominique Leuenberger 2021-01-25 09:30:35 +00:00 committed by Git OBS Bridge
parent 0f53e6b246
commit c35adb65ba
4 changed files with 50 additions and 91 deletions

View File

@ -1,30 +1,3 @@
-------------------------------------------------------------------
Wed Jan 20 15:06:51 UTC 2021 - Thorsten Kukuk <kukuk@suse.com>
- Ignore nscd return code
-------------------------------------------------------------------
Tue Jan 19 15:15:41 UTC 2021 - Thorsten Kukuk <kukuk@suse.com>
- If systemd-sysusers is used to create a new user/group, invalidate
the nscd passwd and group cache to make the new user/group
visible immediately as workaround [bsc#1181121].
Needs to be removed after sytemd-sysusers get's fixed, since we
invalidate the cache even if the user/group file wasn't changed.
-------------------------------------------------------------------
Sun Jan 17 21:16:25 UTC 2021 - Thorsten Kukuk <kukuk@suse.com>
- An "u" in a sysusers.d file will create an user and a group.
Create provides for both, user and group.
-------------------------------------------------------------------
Thu Jan 14 14:30:20 UTC 2021 - Thorsten Kukuk <kukuk@suse.com>
- Use systemd-sysusers as default to create and update the user
account. Fixes the problem that a modified sysusers config file
get's ignored by useradd and adduser [bsc#1180549].
------------------------------------------------------------------- -------------------------------------------------------------------
Fri Dec 4 10:54:00 UTC 2020 - Ludwig Nussel <lnussel@suse.de> Fri Dec 4 10:54:00 UTC 2020 - Ludwig Nussel <lnussel@suse.de>

View File

@ -1,7 +1,7 @@
# #
# spec file for package sysuser-tools # spec file for package sysuser-tools
# #
# Copyright (c) 2021 SUSE LLC # Copyright (c) 2020 SUSE LLC
# #
# 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
@ -38,7 +38,7 @@ Generate auto provides for system users.
%package -n sysuser-shadow %package -n sysuser-shadow
Summary: Tool to execute sysusers.d with shadow utilities Summary: Tool to execute sysusers.d with shadow utilities
Group: System/Packages Group: System/Packages
Requires(pre): (/usr/sbin/useradd or busybox or /usr/bin/systemd-sysusers) PreReq: useradd_or_adduser_dep
# prefer original shadow over busybox by default # prefer original shadow over busybox by default
Suggests: shadow Suggests: shadow

View File

@ -11,7 +11,6 @@ parse()
echo "group($2)" echo "group($2)"
elif [ "$1" = 'u' ]; then elif [ "$1" = 'u' ]; then
echo "user($2)" echo "user($2)"
echo "group($2)"
fi fi
done done
} }

View File

@ -7,18 +7,6 @@ run() {
"$@" "$@"
} }
if [ -x /usr/bin/systemd-sysusers ]; then
# Use systemd-sysusers and let it read the input directly from stdin
/usr/bin/systemd-sysusers -
# We need to clear the nscd cache, as systemd-sysusers could have
# triggered a negative cache entry
if [ -x /usr/sbin/nscd ]; then
/usr/sbin/nscd -i passwd ||:
/usr/sbin/nscd -i group ||:
fi
else
# Absolute path to busybox, if found # Absolute path to busybox, if found
busybox= busybox=
for i in /bin/busybox /usr/bin/busybox; do [ -x "$i" ] && busybox=$i; done for i in /bin/busybox /usr/bin/busybox; do [ -x "$i" ] && busybox=$i; done
@ -101,4 +89,3 @@ else
;; ;;
esac esac
done done
fi