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",
637 sysdb_sudo_get_rule_name(struct sysdb_attrs *rule)
642 ret = sysdb_attrs_get_string(rule, SYSDB_SUDO_CACHE_AT_CN, &name);
644 DEBUG(SSSDBG_MINOR_FAILURE, "Warning: found rule that contains none "
648 DEBUG(SSSDBG_OP_FAILURE, "Unable to obtain rule name [%d]: %s\n",
686 DEBUG(SSSDBG_TRACE_INTERNAL, "Deleting sudo rule %s\n", name);
713 DEBUG(SSSDBG_MINOR_FAILURE, "Failed to delete rule "
822 sysdb_sudo_add_sss_attrs(struct sysdb_attrs *rule,
830 ret = sysdb_attrs_add_string(rule, SYSDB_OBJECTCLASS, SYSDB_SUDO_CACHE_OC);
837 ret = sysdb_attrs_add_string(rule, SYSDB_NAME, name);
845 ret = sysdb_attrs_add_time_t(rule, SYSDB_CACHE_EXPIRE, expire);
856 struct sysdb_attrs *rule)
863 if (domain->case_sensitive == true || rule == NULL) {
872 ret = sysdb_attrs_get_string_array(rule, SYSDB_SUDO_CACHE_AT_USER, tmp_ctx,
899 ret = sysdb_attrs_add_string(rule, SYSDB_SUDO_CACHE_AT_USER, lowered);
917 struct sysdb_attrs *rule,
924 name = sysdb_sudo_get_rule_name(rule);
929 DEBUG(SSSDBG_TRACE_FUNC, "Adding sudo rule %s\n", name);
931 ret = sysdb_sudo_add_lowered_users(domain, rule);
936 ret = sysdb_sudo_add_sss_attrs(rule, name, cache_timeout, now);
941 ret = sysdb_store_custom(domain, name, SUDORULE_SUBDIR, rule);
943 DEBUG(SSSDBG_OP_FAILURE, "Unable to store rule %s [%d]: %s\n",
979 * rule and save the others. Loud debug message is in logs. */