Lines Matching refs:rule
73 static errno_t sysdb_sudo_check_time(struct sysdb_attrs *rule,
92 ret = sysdb_attrs_get_string(rule, SYSDB_SUDO_CACHE_AT_CN, &name);
111 ret = sysdb_attrs_get_string_array(rule, SYSDB_SUDO_CACHE_AT_NOTBEFORE,
117 DEBUG(SSSDBG_MINOR_FAILURE, "Invalid time format in rule [%s]!\n",
134 ret = sysdb_attrs_get_string_array(rule, SYSDB_SUDO_CACHE_AT_NOTAFTER,
140 DEBUG(SSSDBG_MINOR_FAILURE, "Invalid time format in rule [%s]!\n",
666 sysdb_sudo_get_rule_name(struct sysdb_attrs *rule)
671 ret = sysdb_attrs_get_string(rule, SYSDB_SUDO_CACHE_AT_CN, &name);
673 DEBUG(SSSDBG_MINOR_FAILURE, "Warning: found rule that contains none "
677 DEBUG(SSSDBG_OP_FAILURE, "Unable to obtain rule name [%d]: %s\n",
715 DEBUG(SSSDBG_TRACE_INTERNAL, "Deleting sudo rule %s\n", name);
742 DEBUG(SSSDBG_MINOR_FAILURE, "Failed to delete rule "
851 sysdb_sudo_add_sss_attrs(struct sysdb_attrs *rule,
859 ret = sysdb_attrs_add_string(rule, SYSDB_OBJECTCLASS, SYSDB_SUDO_CACHE_OC);
866 ret = sysdb_attrs_add_string(rule, SYSDB_NAME, name);
874 ret = sysdb_attrs_add_time_t(rule, SYSDB_CACHE_EXPIRE, expire);
885 struct sysdb_attrs *rule)
891 if (domain->case_sensitive == true || rule == NULL) {
900 ret = sysdb_attrs_get_string_array(rule, SYSDB_SUDO_CACHE_AT_USER, tmp_ctx,
915 ret = sysdb_attrs_add_lower_case_string(rule, true,
935 struct sysdb_attrs *rule,
942 name = sysdb_sudo_get_rule_name(rule);
947 DEBUG(SSSDBG_TRACE_FUNC, "Adding sudo rule %s\n", name);
949 ret = sysdb_sudo_add_lowered_users(domain, rule);
954 ret = sysdb_sudo_add_sss_attrs(rule, name, cache_timeout, now);
959 ret = sysdb_store_custom(domain, name, SUDORULE_SUBDIR, rule);
961 DEBUG(SSSDBG_OP_FAILURE, "Unable to store rule %s [%d]: %s\n",
997 * rule and save the others. Loud debug message is in logs. */