summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/providers/ad/ad_gpo.c21
1 files changed, 20 insertions, 1 deletions
diff --git a/src/providers/ad/ad_gpo.c b/src/providers/ad/ad_gpo.c
index f609d2813..63c68ce35 100644
--- a/src/providers/ad/ad_gpo.c
+++ b/src/providers/ad/ad_gpo.c
@@ -3765,6 +3765,24 @@ done:
}
}
+static bool machine_ext_names_is_blank(char *attr_value)
+{
+ char *ptr;
+
+ if (attr_value == NULL) {
+ return true;
+ }
+
+ ptr = attr_value;
+ for (; *ptr != '\0'; ptr++) {
+ if (!isspace(*ptr)) {
+ return false;
+ }
+ }
+
+ return true;
+}
+
static errno_t
ad_gpo_sd_process_attrs(struct tevent_req *req,
char *smb_host,
@@ -3880,7 +3898,8 @@ ad_gpo_sd_process_attrs(struct tevent_req *req,
goto done;
}
- if ((ret == ENOENT) || (el->num_values == 0)) {
+ if ((ret == ENOENT) || (el->num_values == 0)
+ || machine_ext_names_is_blank((char *) el[0].values[0].data)) {
/*
* if gpo has no machine_ext_names (which is perfectly valid: it could
* have only user_ext_names, for example), we continue to next gpo