summaryrefslogtreecommitdiff
path: root/src/providers
diff options
context:
space:
mode:
authorPavel Březina <pbrezina@redhat.com>2012-01-12 09:41:52 +0100
committerStephen Gallagher <sgallagh@redhat.com>2012-01-17 11:38:15 -0500
commitf643754db81eeade60485bbe3d80324d889cc4f3 (patch)
tree7810f368bf11fdc3ea98f9de642dd3ef0fca3271 /src/providers
parent2be3039b8fc8ec07a323d15060123366da786dc5 (diff)
downloadsssd-f643754db81eeade60485bbe3d80324d889cc4f3.tar.gz
sssd-f643754db81eeade60485bbe3d80324d889cc4f3.tar.bz2
sssd-f643754db81eeade60485bbe3d80324d889cc4f3.zip
SUDO Integration review issues
Diffstat (limited to 'src/providers')
-rw-r--r--src/providers/data_provider_be.c8
-rw-r--r--src/providers/ipa/ipa_common.c4
-rw-r--r--src/providers/ldap/ldap_common.c2
-rw-r--r--src/providers/ldap/sdap_sudo.c3
4 files changed, 8 insertions, 9 deletions
diff --git a/src/providers/data_provider_be.c b/src/providers/data_provider_be.c
index bf77c5f6..e30395de 100644
--- a/src/providers/data_provider_be.c
+++ b/src/providers/data_provider_be.c
@@ -696,11 +696,11 @@ static int be_sudo_handler(DBusMessage *message, struct sbus_connection *conn)
DBUS_TYPE_STRING, &(be_sudo_req->username),
DBUS_TYPE_INVALID);
- if (dbus_error_is_set(&dbus_error)) {
- dbus_error_free(&dbus_error);
- }
-
if (!dbus_ret) {
+ if (dbus_error_is_set(&dbus_error)) {
+ dbus_error_free(&dbus_error);
+ }
+
DEBUG(SSSDBG_CRIT_FAILURE, ("dbus_message_get_args failed.\n"));
ret = EINVAL;
goto fail;
diff --git a/src/providers/ipa/ipa_common.c b/src/providers/ipa/ipa_common.c
index 4f90b185..c3ea8c37 100644
--- a/src/providers/ipa/ipa_common.c
+++ b/src/providers/ipa/ipa_common.c
@@ -468,14 +468,14 @@ int ipa_get_id_options(struct ipa_options *ipa_opts,
if (NULL == dp_opt_get_string(ipa_opts->id->basic,
SDAP_SUDO_SEARCH_BASE)) {
#if 0
- ret = dp_opt_set_string(ipa_opts->id->basic, SDAP_NETGROUP_SEARCH_BASE,
+ ret = dp_opt_set_string(ipa_opts->id->basic, SDAP_SUDO_SEARCH_BASE,
dp_opt_get_string(ipa_opts->id->basic,
SDAP_SEARCH_BASE));
if (ret != EOK) {
goto done;
}
#else
- /* We don't yet have support for the native representation
+ /* We don't yet have support for the representation
* of sudo in IPA. For now, we need to point at the
* compat tree
*/
diff --git a/src/providers/ldap/ldap_common.c b/src/providers/ldap/ldap_common.c
index 71921963..6ca6f346 100644
--- a/src/providers/ldap/ldap_common.c
+++ b/src/providers/ldap/ldap_common.c
@@ -271,7 +271,7 @@ int ldap_get_options(TALLOC_CTX *memctx,
/* Handle search bases */
search_base = dp_opt_get_string(opts->basic, SDAP_SEARCH_BASE);
if (search_base != NULL) {
- /* set user/group/netgroup/sudo search bases if they are not */
+ /* set user/group/netgroup search bases if they are not */
for (o = 0; search_base_options[o] != -1; o++) {
if (NULL == dp_opt_get_string(opts->basic, search_base_options[o])) {
ret = dp_opt_set_string(opts->basic, search_base_options[o],
diff --git a/src/providers/ldap/sdap_sudo.c b/src/providers/ldap/sdap_sudo.c
index 68cb47cd..387cf0c1 100644
--- a/src/providers/ldap/sdap_sudo.c
+++ b/src/providers/ldap/sdap_sudo.c
@@ -408,8 +408,6 @@ void sdap_sudo_load_sudoers_done(struct tevent_req *req)
DEBUG(SSSDBG_TRACE_FUNC, ("Received %d rules\n", rules_count));
/* purge cache */
- /* TODO purge with filter */
- DEBUG(SSSDBG_TRACE_FUNC, ("Purging sudo cache with filter %s\n", ""));
ret = sdap_sudo_purge_sudoers(sudo_ctx);
if (ret != EOK) {
goto done;
@@ -448,6 +446,7 @@ int sdap_sudo_purge_sudoers(struct sdap_sudo_ctx *sudo_ctx)
}
/* Purge rules */
+ DEBUG(SSSDBG_TRACE_FUNC, ("Purging sudo cache with filter [%s]\n", filter));
ret = sysdb_purge_sudorule_subtree(sysdb_ctx, sudo_ctx->be_ctx->domain,
filter);
if (ret != EOK) {