summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSumit Bose <sbose@redhat.com>2010-07-23 15:45:46 +0200
committerStephen Gallagher <sgallagh@redhat.com>2010-07-23 10:14:29 -0400
commit8c02b001383aa9d9060076ac170d1b97761d7b60 (patch)
tree4b8bec069eeb28eb0d0094c39d0c30e4aa80ca73
parent3e4a95a5aa1bed0a31f55232a1bcc179f2801f4a (diff)
downloadsssd-8c02b001383aa9d9060076ac170d1b97761d7b60.tar.gz
sssd-8c02b001383aa9d9060076ac170d1b97761d7b60.tar.bz2
sssd-8c02b001383aa9d9060076ac170d1b97761d7b60.zip
Allow sssd clients to reconnect
Currently the PAM and NSS client just return an error if there are problems on an open socket. This will lead to problems in long running programs like gdm if sssd is restarted, e.g. during an update. With this patch the socket is closed and reopened.
-rw-r--r--src/sss_client/common.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/sss_client/common.c b/src/sss_client/common.c
index a4856e08..6b79c783 100644
--- a/src/sss_client/common.c
+++ b/src/sss_client/common.c
@@ -607,12 +607,11 @@ static enum sss_status sss_cli_check_socket(int *errnop, const char *socket_name
*errnop = EBADF;
break;
}
- if (*errnop) {
- sss_cli_close_socket();
- return SSS_STATUS_UNAVAIL;
+ if (*errnop == 0) {
+ return SSS_STATUS_SUCCESS;
}
- return SSS_STATUS_SUCCESS;
+ sss_cli_close_socket();
}
mysd = sss_nss_open_socket(errnop, socket_name);