History log of /sssd/src/util/sss_sockets.c
Revision Date Author Comments Expand
bdadcaf271818e88e56e86c2bd90663a08fd9721 28-Jun-2016 Lukas Slebodnik <lslebodn@redhat.com>

UTIL: Revent connection handling in sssd_async_connect_send Even though the connect() man page says waiting on a non-blocking connect should be done by checking for writability, we need to check also for readability. Otherwise it slightly break offline mode. Changing password in offline mode is not supported by sssd and error message "System is offline, password change not possible" is printed. However without TEVENT_FD_READ for connect it takes much longer when sssd finds out that it cannot connect to a server. It fails after expiration of timeout (6 seconds). But meanwhile "passwd user" finished without logging the offline message. With TEVENT_FD_READ, connect fails much faster with errno 113/No route to host. The change was introduced in the commit e05d3f5872263aadfbc2f6a2a8c9735219922387 Reviewed-by: Simo Sorce <simo@redhat.com>

3108e0cce47ee168b86ac0de1deccee7e7f09119 28-Jun-2016 Lukas Slebodnik <lslebodn@redhat.com>

UTIL: Fix debug message in sssd_async_connect_done Function strerror does not expect negative values. There should be errno. [sssd_async_connect_done] (0x0020): connect failed [-1][Unknown error 18446744073709551615]. Reviewed-by: Simo Sorce <simo@redhat.com>

265c7b5e5333befdadd4ac8d09f4147f211959fd 14-Mar-2016 Lukas Slebodnik <lslebodn@redhat.com>

UTIL: Do not call stderr with negative number The function connect return -1 in case of error and we could call strerror with -1 instead of errno. Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>

e05d3f5872263aadfbc2f6a2a8c9735219922387 09-Mar-2016 Simo Sorce <simo@redhat.com>

Util Sockets: Tidy up connect() handling The connect() man page says waiting on a non-blocking connect should be done by checking for writability, so drop checking for readability. Also check for EALREADY as an acceptable error to retry on. Related: https://fedorahosted.org/sssd/ticket/2968 Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>

75e66c388862a4ba05afe0791c5503226395bad0 09-Mar-2016 Simo Sorce <simo@redhat.com>

Util: Set socket options and flags separately Reorganize functions to set options and flags, all flags can be set at once, and there is no need to keep old falgs around as nothing ever used that for anything useful. Related: https://fedorahosted.org/sssd/ticket/2968 Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>

5dbf360f2d6b0281c32f1bba6ebf5cc834c1716e 09-Mar-2016 Simo Sorce <simo@redhat.com>

Util: Move socket setup in a common utility file Other components may need to connect sockets, the code here is generic enough that with minimal modifications can be used for non-ldap connections too. So create a sss_sockets.c/h utility file with all the non-ldap specific socket setup functions and make them available for other uses. Resolves: https://fedorahosted.org/sssd/ticket/2968 Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>