summaryrefslogtreecommitdiff
path: root/src/providers/ldap/sdap.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/providers/ldap/sdap.c')
-rw-r--r--src/providers/ldap/sdap.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/providers/ldap/sdap.c b/src/providers/ldap/sdap.c
index afaa87f5..3ca2e286 100644
--- a/src/providers/ldap/sdap.c
+++ b/src/providers/ldap/sdap.c
@@ -709,6 +709,9 @@ static errno_t sdap_set_search_base(struct sdap_options *opts,
case SDAP_NETGROUP_SEARCH_BASE:
bases = &opts->netgroup_search_bases;
break;
+ case SDAP_SUDO_SEARCH_BASE:
+ bases = &opts->sudo_search_bases;
+ break;
default:
return EINVAL;
}
@@ -740,7 +743,8 @@ errno_t sdap_set_config_options_with_rootdse(struct sysdb_attrs *rootdse,
if (!opts->search_bases
||!opts->user_search_bases
|| !opts->group_search_bases
- || !opts->netgroup_search_bases) {
+ || !opts->netgroup_search_bases
+ || !opts->sudo_search_bases) {
naming_context = get_naming_context(opts->basic, rootdse);
if (naming_context == NULL) {
DEBUG(1, ("get_naming_context failed.\n"));
@@ -781,6 +785,14 @@ errno_t sdap_set_config_options_with_rootdse(struct sysdb_attrs *rootdse,
if (ret != EOK) goto done;
}
+ /* Sudo */
+ if (!opts->sudo_search_bases) {
+ ret = sdap_set_search_base(opts,
+ SDAP_SUDO_SEARCH_BASE,
+ naming_context);
+ if (ret != EOK) goto done;
+ }
+
ret = EOK;
done: