summaryrefslogtreecommitdiff
path: root/src/providers/ad
diff options
context:
space:
mode:
authorPavel Březina <pbrezina@redhat.com>2013-05-03 14:47:23 +0200
committerJakub Hrozek <jhrozek@redhat.com>2013-05-03 16:53:13 +0200
commit9b077d62370190de714c6dbef8881841ae9f2e02 (patch)
tree36bda775792e16f4e29ff391f8ae3d2cbcfde95d /src/providers/ad
parent11fd679eb2edabd139c9016e2b7d2085ca3aac5d (diff)
downloadsssd-9b077d62370190de714c6dbef8881841ae9f2e02.tar.gz
sssd-9b077d62370190de714c6dbef8881841ae9f2e02.tar.bz2
sssd-9b077d62370190de714c6dbef8881841ae9f2e02.zip
AD SRV plugin: check if site name is empty
Diffstat (limited to 'src/providers/ad')
-rw-r--r--src/providers/ad/ad_srv.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/providers/ad/ad_srv.c b/src/providers/ad/ad_srv.c
index 5dd06f62..ef86471d 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;