diff options
author | Pavel Březina <pbrezina@redhat.com> | 2011-12-07 17:20:47 +0100 |
---|---|---|
committer | Stephen Gallagher <sgallagh@redhat.com> | 2011-12-16 14:46:17 -0500 |
commit | 10b6b1fc57bb7c2edb4cfd0a0038303bd33722bc (patch) | |
tree | 3c5d97cdebe0a8b7e53e60d65d32dd4d0a0f1735 /src/providers/ldap/sdap.c | |
parent | 88c5d362804244a5a74785b94018ddf887094553 (diff) | |
download | sssd-10b6b1fc57bb7c2edb4cfd0a0038303bd33722bc.tar.gz sssd-10b6b1fc57bb7c2edb4cfd0a0038303bd33722bc.tar.bz2 sssd-10b6b1fc57bb7c2edb4cfd0a0038303bd33722bc.zip |
SUDO Integration - LDAP configuration options
Diffstat (limited to 'src/providers/ldap/sdap.c')
-rw-r--r-- | src/providers/ldap/sdap.c | 14 |
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: |