[sssd PR#5299][opened] dp: fix potential race condition in provider's sbus server
by pbrezina
URL: https://github.com/SSSD/sssd/pull/5299
Author: pbrezina
Title: #5299: dp: fix potential race condition in provider's sbus server
Action: opened
PR body:
"""
We can hit a segfault if provider start is somehow delayed.
- dp_init_send
- sbus_server_create_and_connect_send
- sbus_server_create (*)
- dp_init_done (callback for sbus_server_create_and_connect_send)
- sbus_server_create_and_connect_recv
- sbus_server_set_on_connection (sets clients data and creates dp_cli)
At (*) sbus server is already created and accepts new connections once
we get into tevent loop. So it is possible that the client connects to
server before sbus_server_set_on_connection is called and thus the client
is not properly initialized. However it should not happen in normal start
because providers are started before responders and it can happen only if
data provider startup is somehow delay.
You can use this diff to reproduce the crash:
```diff
--- a/src/providers/data_provider_be.c
+++ b/src/providers/data_provider_be.c
@@ -702,6 +702,8 @@ int main(int argc, const char *argv[])
uid_t uid;
gid_t gid;
+ sleep(5);
+
struct poptOption long_options[] = {
POPT_AUTOHELP
SSSD_MAIN_OPTS
```
Resolves:
https://github.com/SSSD/sssd/issues/5298
"""
To pull the PR as Git branch:
git remote add ghsssd https://github.com/SSSD/sssd
git fetch ghsssd pull/5299/head:pr5299
git checkout pr5299
2 years, 6 months
[sssd PR#5317][opened] CLIENT:PAM: fixed missed return check
by alexey-tikhonov
URL: https://github.com/SSSD/sssd/pull/5317
Author: alexey-tikhonov
Title: #5317: CLIENT:PAM: fixed missed return check
Action: opened
PR body:
"""
Return code of `prompt_2fa()` wasn't checked and
thus its fail wasn't properly processed.
Spotted with a help of following warning:
```
Error: CLANG_WARNING:
sssd-2.3.2/src/sss_client/pam_sss.c:2355:21: warning: Value stored to 'ret' is never read
# ret = prompt_2fa(pamh, pi, _("First Factor (Current Password): "),
# ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
"""
To pull the PR as Git branch:
git remote add ghsssd https://github.com/SSSD/sssd
git fetch ghsssd pull/5317/head:pr5317
git checkout pr5317
2 years, 6 months