summaryrefslogtreecommitdiffstats
path: root/src/providers/ldap/sdap_range.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/providers/ldap/sdap_range.c')
-rw-r--r--src/providers/ldap/sdap_range.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/providers/ldap/sdap_range.c b/src/providers/ldap/sdap_range.c
index a26443c82..c4bf43539 100644
--- a/src/providers/ldap/sdap_range.c
+++ b/src/providers/ldap/sdap_range.c
@@ -29,7 +29,8 @@
errno_t sdap_parse_range(TALLOC_CTX *mem_ctx,
const char *attr_desc,
char **base_attr,
- uint32_t *range_offset)
+ uint32_t *range_offset,
+ bool disable_range_retrieval)
{
errno_t ret;
TALLOC_CTX *tmp_ctx;
@@ -84,6 +85,16 @@ errno_t sdap_parse_range(TALLOC_CTX *mem_ctx,
("[%s] contains sub-attribute other than a range, returning whole\n",
attr_desc));
goto done;
+ } else if (disable_range_retrieval) {
+ /* This is range sub-attribute, but we want to ignore it.
+ */
+ *base_attr = talloc_strdup(mem_ctx, attr_desc);
+ if (!*base_attr) {
+ ret = ENOMEM;
+ } else {
+ ret = ECANCELED;
+ }
+ goto done;
}
/* Get the end of the range */