Accepting request 864336 from home:kukuk:etc

- 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.

OBS-URL: https://build.opensuse.org/request/show/864336
OBS-URL: https://build.opensuse.org/package/show/Base:System/sysuser-tools?expand=0&rev=36
This commit is contained in:
Thorsten Kukuk 2021-01-19 15:20:59 +00:00 committed by Git OBS Bridge
parent 45d70a85d7
commit 8e3bfd4594
2 changed files with 15 additions and 1 deletions

View File

@ -1,3 +1,12 @@
-------------------------------------------------------------------
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>

View File

@ -11,7 +11,12 @@ 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