summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPavel Březina <pbrezina@redhat.com>2012-08-07 13:32:44 +0200
committerJakub Hrozek <jhrozek@redhat.com>2012-08-07 18:37:40 +0200
commitfb4e4c4eb6a6dc732370584f70d23dd4a2c5c7b6 (patch)
tree3891eeb210e552b70fc5e2482a80c2010d42c8a0
parent97b0dd25b0b62e57fdb7750b398181f953b2fd37 (diff)
downloadsssd-fb4e4c4eb6a6dc732370584f70d23dd4a2c5c7b6.tar.gz
sssd-fb4e4c4eb6a6dc732370584f70d23dd4a2c5c7b6.tar.bz2
sssd-fb4e4c4eb6a6dc732370584f70d23dd4a2c5c7b6.zip
Rename SYSDB_SUDO_CACHE_AT_OC to SYSDB_SUDO_CACHE_OC
It does not contain name of the object class attribute but the value itself. I renamed it to avoid confusion.
-rw-r--r--src/db/sysdb_sudo.c6
-rw-r--r--src/db/sysdb_sudo.h2
-rw-r--r--src/providers/ldap/ldap_opts.h2
-rw-r--r--src/providers/ldap/sdap_sudo.c4
-rw-r--r--src/responder/sudo/sudosrv_get_sudorules.c2
5 files changed, 8 insertions, 8 deletions
diff --git a/src/db/sysdb_sudo.c b/src/db/sysdb_sudo.c
index be101d8b..e10d18be 100644
--- a/src/db/sysdb_sudo.c
+++ b/src/db/sysdb_sudo.c
@@ -257,7 +257,7 @@ sysdb_get_sudo_filter(TALLOC_CTX *mem_ctx, const char *username,
/* build global filter */
filter = talloc_asprintf(tmp_ctx, "(&(%s=%s)",
- SYSDB_OBJECTCLASS, SYSDB_SUDO_CACHE_AT_OC);
+ SYSDB_OBJECTCLASS, SYSDB_SUDO_CACHE_OC);
NULL_CHECK(filter, ret, done);
if (specific_filter[0] != '\0') {
@@ -367,7 +367,7 @@ sysdb_save_sudorule(struct sysdb_ctx *sysdb_ctx,
DEBUG(SSSDBG_TRACE_FUNC, ("Adding sudo rule %s\n", rule_name));
ret = sysdb_attrs_add_string(attrs, SYSDB_OBJECTCLASS,
- SYSDB_SUDO_CACHE_AT_OC);
+ SYSDB_SUDO_CACHE_OC);
if (ret != EOK) {
DEBUG(SSSDBG_OP_FAILURE, ("Could not set rule object class [%d]: %s\n",
ret, strerror(ret)));
@@ -581,7 +581,7 @@ errno_t sysdb_sudo_purge_byfilter(struct sysdb_ctx *sysdb,
bool in_transaction = false;
const char *attrs[] = { SYSDB_OBJECTCLASS,
SYSDB_NAME,
- SYSDB_SUDO_CACHE_AT_OC,
+ SYSDB_SUDO_CACHE_OC,
SYSDB_SUDO_CACHE_AT_CN,
NULL };
diff --git a/src/db/sysdb_sudo.h b/src/db/sysdb_sudo.h
index 0d11b110..35b350c6 100644
--- a/src/db/sysdb_sudo.h
+++ b/src/db/sysdb_sudo.h
@@ -33,7 +33,7 @@
#define SYSDB_SUDO_AT_LAST_FULL_REFRESH "sudoLastFullRefreshTime"
/* sysdb attributes */
-#define SYSDB_SUDO_CACHE_AT_OC "sudoRule"
+#define SYSDB_SUDO_CACHE_OC "sudoRule"
#define SYSDB_SUDO_CACHE_AT_CN "cn"
#define SYSDB_SUDO_CACHE_AT_USER "sudoUser"
#define SYSDB_SUDO_CACHE_AT_HOST "sudoHost"
diff --git a/src/providers/ldap/ldap_opts.h b/src/providers/ldap/ldap_opts.h
index 4e876bdc..2868bb4a 100644
--- a/src/providers/ldap/ldap_opts.h
+++ b/src/providers/ldap/ldap_opts.h
@@ -303,7 +303,7 @@ struct sdap_attr_map netgroup_map[] = {
};
struct sdap_attr_map native_sudorule_map[] = {
- { "ldap_sudorule_object_class", "sudoRole", SYSDB_SUDO_CACHE_AT_OC, NULL },
+ { "ldap_sudorule_object_class", "sudoRole", SYSDB_SUDO_CACHE_OC, NULL },
{ "ldap_sudorule_name", "cn", SYSDB_SUDO_CACHE_AT_CN, NULL },
{ "ldap_sudorule_command", "sudoCommand", SYSDB_SUDO_CACHE_AT_COMMAND, NULL },
{ "ldap_sudorule_host", "sudoHost", SYSDB_SUDO_CACHE_AT_HOST, NULL },
diff --git a/src/providers/ldap/sdap_sudo.c b/src/providers/ldap/sdap_sudo.c
index ca41fca9..bfab32a0 100644
--- a/src/providers/ldap/sdap_sudo.c
+++ b/src/providers/ldap/sdap_sudo.c
@@ -552,7 +552,7 @@ static struct tevent_req *sdap_sudo_full_refresh_send(TALLOC_CTX *mem_ctx,
/* Remove all rules from cache */
sysdb_filter = talloc_asprintf(state, "(%s=%s)",
- SYSDB_OBJECTCLASS, SYSDB_SUDO_CACHE_AT_OC);
+ SYSDB_OBJECTCLASS, SYSDB_SUDO_CACHE_OC);
if (sysdb_filter == NULL) {
ret = ENOMEM;
goto immediately;
@@ -724,7 +724,7 @@ static struct tevent_req *sdap_sudo_rules_refresh_send(TALLOC_CTX *mem_ctx,
}
sysdb_filter = talloc_asprintf(tmp_ctx, "(&(%s=%s)(|%s))",
- SYSDB_OBJECTCLASS, SYSDB_SUDO_CACHE_AT_OC,
+ SYSDB_OBJECTCLASS, SYSDB_SUDO_CACHE_OC,
sysdb_filter);
if (sysdb_filter == NULL) {
ret = ENOMEM;
diff --git a/src/responder/sudo/sudosrv_get_sudorules.c b/src/responder/sudo/sudosrv_get_sudorules.c
index 10cef552..03308466 100644
--- a/src/responder/sudo/sudosrv_get_sudorules.c
+++ b/src/responder/sudo/sudosrv_get_sudorules.c
@@ -534,7 +534,7 @@ static errno_t sudosrv_get_sudorules_from_cache(struct sudo_cmd_ctx *cmd_ctx,
const char *debug_name = NULL;
unsigned int flags = SYSDB_SUDO_FILTER_NONE;
const char *attrs[] = { SYSDB_OBJECTCLASS
- SYSDB_SUDO_CACHE_AT_OC,
+ SYSDB_SUDO_CACHE_OC,
SYSDB_SUDO_CACHE_AT_CN,
SYSDB_SUDO_CACHE_AT_USER,
SYSDB_SUDO_CACHE_AT_HOST,