[sssd PR#5801][opened] util/inotify: fixed bug in inotify event processing - 1.16 backport
by alexey-tikhonov
URL: https://github.com/SSSD/sssd/pull/5801
Author: alexey-tikhonov
Title: #5801: util/inotify: fixed bug in inotify event processing - 1.16 backport
Action: opened
PR body:
"""
Error was spotted with the help of the following warning:
```
Error: CLANG_WARNING:
sssd-2.3.1/src/util/inotify.c:327:21: warning: Value stored to 'rewatch' is never read
# rewatch = true;
# ^ ~~~~
```
First part of the issue was that EAGAIN returned by the process_dir_event()
didn't trigger snotify_rewatch() (as suggested by the comments).
Fixing this part is already enough to resolve issue #1031 (as it was
reported).
Another part of the issue was that process_file_event() return code wasn't
checked against EAGAIN (again, as suggested by the DEBUG message).
Strictly speaking, I'm not sure if this part is really required or
if processing DIR events would cover all cases, but rebuilding watches
on IN_IGNORED won't hurt.
Resolves: https://github.com/SSSD/sssd/issues/1031
Reviewed-by: Tomáš Halman <thalman(a)redhat.com>
(cherry picked from commit 0c5711f9bae1cb46d4cd3fbe5d86d8688087be13)
"""
To pull the PR as Git branch:
git remote add ghsssd https://github.com/SSSD/sssd
git fetch ghsssd pull/5801/head:pr5801
git checkout pr5801
2 years, 6 months
[sssd PR#5722][opened] NSS client: avoid using NETDB_INTERNAL if daemon is not available
by grawity
URL: https://github.com/SSSD/sssd/pull/5722
Author: grawity
Title: #5722: NSS client: avoid using NETDB_INTERNAL if daemon is not available
Action: opened
PR body:
"""
It seems that returning NETDB_INTERNAL as h_errno will cause glibc's
getaddrinfo() to immediately return EAI_SYSTEM *without* falling through
to other configured NSS modules.
This means that if /etc/nsswitch.conf has 'sss' listed before 'dns' (for
example), hostname resolution will be completely broken whenever SSSD is
not running.
(Even hostname lookups done by SSSD itself will fail, as the _SSS_LOOPS
environment variable merely forces errno=0 but the getaddrinfo() call as
a whole still returns EAI_SYSTEM.)
This commit makes the NSS client return h_errno=NO_RECOVERY, as that's
what systemd's nss-resolve and nss-mymachines seem to be doing.
"""
To pull the PR as Git branch:
git remote add ghsssd https://github.com/SSSD/sssd
git fetch ghsssd pull/5722/head:pr5722
git checkout pr5722
2 years, 6 months