diff options
author | Pavel Březina <pbrezina@redhat.com> | 2012-01-17 12:28:33 +0100 |
---|---|---|
committer | Stephen Gallagher <sgallagh@redhat.com> | 2012-01-27 09:10:37 -0500 |
commit | f6171b2bc954a367f316853ab71090eb213bdee3 (patch) | |
tree | c3d3d9f63670d9f8237c7c21a4a964824a47f8dd /src/responder | |
parent | 3d55c65fbe50074f6a63dcb8ae866c038a9e6b2b (diff) | |
download | sssd-f6171b2bc954a367f316853ab71090eb213bdee3.tar.gz sssd-f6171b2bc954a367f316853ab71090eb213bdee3.tar.bz2 sssd-f6171b2bc954a367f316853ab71090eb213bdee3.zip |
SUDO Integration - make sysdb_get_sudo_filter() more configurable
https://fedorahosted.org/sssd/ticket/1143
Diffstat (limited to 'src/responder')
-rw-r--r-- | src/responder/sudo/sudosrv_get_sudorules.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/responder/sudo/sudosrv_get_sudorules.c b/src/responder/sudo/sudosrv_get_sudorules.c index fba8a85e..0b3b81e8 100644 --- a/src/responder/sudo/sudosrv_get_sudorules.c +++ b/src/responder/sudo/sudosrv_get_sudorules.c @@ -412,6 +412,7 @@ static errno_t sudosrv_get_sudorules_query_cache(TALLOC_CTX *mem_ctx, size_t count; struct sysdb_attrs **rules; struct ldb_message **msgs; + unsigned int flags = SYSDB_SUDO_FILTER_NONE; const char *attrs[] = { SYSDB_OBJECTCLASS SYSDB_SUDO_CACHE_AT_OC, SYSDB_SUDO_CACHE_AT_CN, @@ -429,9 +430,11 @@ static errno_t sudosrv_get_sudorules_query_cache(TALLOC_CTX *mem_ctx, tmp_ctx = talloc_new(NULL); if (tmp_ctx == NULL) return ENOMEM; + flags = SYSDB_SUDO_FILTER_USERINFO + | SYSDB_SUDO_FILTER_INCLUDE_ALL + | SYSDB_SUDO_FILTER_INCLUDE_DFL; ret = sysdb_get_sudo_filter(tmp_ctx, username, uid, groupnames, - (SYSDB_SUDO_FILTER_NGRS | SYSDB_SUDO_FILTER_INCLUDE_ALL | - SYSDB_SUDO_FILTER_INCLUDE_DFL), &filter); + flags, &filter); if (ret != EOK) { DEBUG(SSSDBG_CRIT_FAILURE, ("Could not construct the search filter [%d]: %s\n", |