diff options
author | Pavel Březina <pbrezina@redhat.com> | 2013-05-03 14:47:23 +0200 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2013-05-03 16:53:13 +0200 |
commit | 9b077d62370190de714c6dbef8881841ae9f2e02 (patch) | |
tree | 36bda775792e16f4e29ff391f8ae3d2cbcfde95d /src | |
parent | 11fd679eb2edabd139c9016e2b7d2085ca3aac5d (diff) | |
download | sssd-9b077d62370190de714c6dbef8881841ae9f2e02.tar.gz sssd-9b077d62370190de714c6dbef8881841ae9f2e02.tar.xz sssd-9b077d62370190de714c6dbef8881841ae9f2e02.zip |
AD SRV plugin: check if site name is empty
Diffstat (limited to 'src')
-rw-r--r-- | src/providers/ad/ad_srv.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/providers/ad/ad_srv.c b/src/providers/ad/ad_srv.c index 5dd06f623..ef86471d3 100644 --- a/src/providers/ad/ad_srv.c +++ b/src/providers/ad/ad_srv.c @@ -360,9 +360,11 @@ static errno_t ad_get_client_site_parse_ndr(TALLOC_CTX *mem_ctx, goto done; } - if (response.data.nt5_ex.client_site != NULL) { + if (response.data.nt5_ex.client_site != NULL + && response.data.nt5_ex.client_site[0] != '\0') { site = talloc_strdup(tmp_ctx, response.data.nt5_ex.client_site); - } else if (response.data.nt5_ex.next_closest_site != NULL) { + } else if (response.data.nt5_ex.next_closest_site != NULL + && response.data.nt5_ex.next_closest_site[0] != '\0') { site = talloc_strdup(tmp_ctx, response.data.nt5_ex.next_closest_site); } else { ret = ENOENT; |