summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorStephen Gallagher <sgallagh@redhat.com>2011-02-14 10:09:44 -0500
committerStephen Gallagher <sgallagh@redhat.com>2011-02-14 16:11:33 -0500
commitfb0df854f9be51892173ba299cab88bf628d2b30 (patch)
tree333578aa092b31430159c7cfaee5d9860d87ca07 /src
parentbd880fde928e0cb0eee5d59e2fd5f26d75698b5c (diff)
downloadsssd-fb0df854f9be51892173ba299cab88bf628d2b30.tar.gz
sssd-fb0df854f9be51892173ba299cab88bf628d2b30.tar.bz2
sssd-fb0df854f9be51892173ba299cab88bf628d2b30.zip
Verify LDAP file descriptor validity
Diffstat (limited to 'src')
-rw-r--r--src/providers/ldap/sdap_fd_events.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/providers/ldap/sdap_fd_events.c b/src/providers/ldap/sdap_fd_events.c
index c3f9e118..ebec544f 100644
--- a/src/providers/ldap/sdap_fd_events.c
+++ b/src/providers/ldap/sdap_fd_events.c
@@ -38,7 +38,7 @@ int get_fd_from_ldap(LDAP *ldap, int *fd)
int ret;
ret = ldap_get_option(ldap, LDAP_OPT_DESC, fd);
- if (ret != LDAP_OPT_SUCCESS) {
+ if (ret != LDAP_OPT_SUCCESS || *fd < 0) {
DEBUG(1, ("Failed to get fd from ldap!!\n"));
*fd = -1;
return EIO;