Searched defs:rules (Results 1 - 23 of 23) sorted by relevance

/sssd/src/sss_client/sudo/
H A Dsss_sudo.h77 * The number of rules for the user
80 * but no rules match for him, the num_rules element
85 /** List of rules found */
86 struct sss_sudo_rule *rules; member in struct:sss_sudo_result
90 * @brief Send a request to SSSD to retreive all SUDO rules for a given
93 * @param[in] uid The uid of the user to retreive the rules for.
94 * @param[in] username The username to retreive the rules for
106 * the rules for the user. If no rules were found but
112 * tell whether the result contains any rules o
[all...]
H A Dsss_sudo.c39 struct sss_sudo_rule *rules);
204 sss_sudo_free_rules(result->num_rules, result->rules);
208 void sss_sudo_free_rules(unsigned int num_rules, struct sss_sudo_rule *rules) argument
213 if (rules == NULL) {
218 rule = rules + i;
224 free(rules);
/sssd/src/providers/ipa/
H A Dipa_access.h53 struct sysdb_attrs **rules; member in struct:hbac_ctx
H A Dipa_hbac_rules.c41 struct sysdb_attrs **rules; member in struct:ipa_hbac_rule_state
246 struct sysdb_attrs **rules; local
251 &rules);
253 DEBUG(SSSDBG_MINOR_FAILURE, "Could not retrieve HBAC rules\n");
259 state->rules = talloc_realloc(state, state->rules,
262 if (state->rules == NULL) {
269 target = &state->rules[state->rule_count];
270 *target = talloc_steal(state->rules, rules[
299 ipa_hbac_rule_info_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx, size_t *rule_count, struct sysdb_attrs ***rules) argument
[all...]
H A Dipa_sudo_refresh.c60 /* Remove all rules from cache */
68 DEBUG(SSSDBG_TRACE_FUNC, "Issuing a full refresh of sudo rules\n");
114 DEBUG(SSSDBG_TRACE_FUNC, "Successful full refresh of sudo rules\n");
166 /* Download all rules from LDAP that are newer than usn */
188 /* Do not remove any rules that are already in the sysdb. */
190 DEBUG(SSSDBG_TRACE_FUNC, "Issuing a smart refresh of sudo rules "
230 DEBUG(SSSDBG_TRACE_FUNC, "Successful smart refresh of sudo rules\n");
266 char **rules)
291 if (rules == NULL || rules[
263 ipa_sudo_rules_refresh_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev, struct ipa_sudo_ctx *sudo_ctx, char **rules) argument
[all...]
H A Dipa_hbac_common.c208 struct hbac_rule ***rules,
217 if (!rules || !request) return EINVAL;
222 /* First create an array of rules */
236 DEBUG(SSSDBG_CRIT_FAILURE, "Could not construct rules\n");
249 *rules = talloc_steal(mem_ctx, new_rules);
272 ret = sysdb_attrs_get_el(hbac_ctx->rules[idx],
285 ret = sysdb_attrs_get_bool(hbac_ctx->rules[idx], IPA_ENABLED_FLAG,
294 ret = sysdb_attrs_get_string(hbac_ctx->rules[idx],
309 hbac_ctx->rules[idx],
320 hbac_ctx->rules[id
206 hbac_ctx_to_rules(TALLOC_CTX *mem_ctx, struct hbac_ctx *hbac_ctx, struct hbac_rule ***rules, struct hbac_eval_req **request) argument
[all...]
H A Dipa_sudo_async.c238 struct sysdb_attrs **rules; local
264 DEBUG(SSSDBG_CRIT_FAILURE, "Error looking up sudo rules [%d]: %s\n",
269 ret = sysdb_msg2attrs(tmp_ctx, num_rules, msgs, &rules);
276 *_rules = talloc_steal(mem_ctx, rules);
293 struct sysdb_attrs **rules; local
312 &rules, &num_rules);
330 ret = sysdb_attrs_get_string(rules[i], SYSDB_NAME, &name);
380 struct sysdb_attrs **rules; member in struct:ipa_sudo_fetch_state
447 * modified but we need to fetch associated rules anyway. */
527 DEBUG(SSSDBG_CRIT_FAILURE, "Unable to construct rules filte
849 struct sysdb_attrs **rules; member in struct:ipa_sudo_refresh_state
[all...]
H A Dipa_access.c107 struct sysdb_attrs **rules; member in struct:ipa_fetch_hbac_state
414 &state->rule_count, &state->rules);
440 /* No rules were found that apply to this host. */
443 DEBUG(SSSDBG_CRIT_FAILURE, "Unable to remove HBAC rules\n");
453 DEBUG(SSSDBG_CRIT_FAILURE, "Unable to save HBAC rules\n");
486 /* Delete any rules in the sysdb so offline logins are also denied. */
542 /* Save the rules */
544 state->rule_count, state->rules,
547 DEBUG(SSSDBG_CRIT_FAILURE, "Error saving rules [%d]: %s\n",
595 /* Get HBAC rules fro
649 struct sysdb_attrs **rules; local
[all...]
H A Dipa_sudo_conversion.c60 hash_table_t *rules; member in struct:ipa_sudo_conv
371 ret = sss_hash_create(conv, 20, &conv->rules);
403 struct sysdb_attrs **rules,
417 ret = sysdb_attrs_get_string(rules[i], SYSDB_NAME, &key);
424 rule = talloc_zero(conv->rules, struct ipa_sudo_rule);
430 rule->attrs = rules[i];
446 ret = ipa_sudo_conv_store(conv->rules, key, rule);
741 struct sysdb_attrs **rules; member in struct:ipa_sudo_conv_result_ctx
1147 attrs = sysdb_new_attrs(ctx->rules);
1169 ctx->rules[ct
402 ipa_sudo_conv_rules(struct ipa_sudo_conv *conv, struct sysdb_attrs **rules, size_t num_rules) argument
1214 struct sysdb_attrs **rules; local
[all...]
/sssd/src/responder/sudo/
H A Dsudosrv_private.h63 struct sysdb_attrs **rules; member in struct:sudo_cmd_ctx
90 struct sysdb_attrs **rules,
102 struct sysdb_attrs **rules);
H A Dsudosrv_cmd.c106 struct sysdb_attrs **rules = cmd_ctx->rules; local
111 * Parent of cmd_ctx->rules is in-memory cache, we must not talloc_free it!
114 /* filter rules by time */
117 "%u rules\n", cmd_ctx->num_rules);
120 cmd_ctx->rules, 0,
121 &num_rules, &rules);
126 DEBUG(SSSDBG_TRACE_FUNC, "Got %u rules after time filter\n",
132 num_rules, rules,
260 ret = sudosrv_get_rules_recv(cmd_ctx, req, &cmd_ctx->rules,
[all...]
H A Dsudosrv_dp.c42 struct sysdb_attrs **rules; member in struct:sss_dp_get_sudoers_info
56 struct sysdb_attrs **rules)
80 info->rules = rules;
187 ret = sysdb_attrs_get_string(info->rules[i], SYSDB_NAME, &rule_name);
49 sss_dp_get_sudoers_send(TALLOC_CTX *mem_ctx, struct resp_ctx *rctx, struct sss_domain_info *dom, bool fast_reply, enum sss_dp_sudo_type type, const char *name, uint32_t num_rules, struct sysdb_attrs **rules) argument
H A Dsudosrv_query.c196 struct sysdb_attrs **rules,
232 /* rules count */
240 /* rules */
243 ret = sudosrv_response_append_rule(tmp_ctx, rules[i]->num, rules[i]->a,
193 sudosrv_build_response(TALLOC_CTX *mem_ctx, uint32_t error, uint32_t rules_num, struct sysdb_attrs **rules, uint8_t **_response_body, size_t *_response_len) argument
H A Dsudosrv_get_sudorules.c101 sort_sudo_rules(struct sysdb_attrs **rules, size_t count, bool lower_wins) argument
104 DEBUG(SSSDBG_TRACE_FUNC, "Sorting rules with lower-wins logic\n");
105 qsort(rules, count, sizeof(struct sysdb_attrs *),
108 DEBUG(SSSDBG_TRACE_FUNC, "Sorting rules with higher-wins logic\n");
109 qsort(rules, count, sizeof(struct sysdb_attrs *),
126 struct sysdb_attrs **rules; local
137 /* rules are stored inside parent domain tree */
149 DEBUG(SSSDBG_CRIT_FAILURE, "Error looking up SUDO rules\n");
153 ret = sysdb_msg2attrs(tmp_ctx, count, msgs, &rules);
160 *_rules = talloc_steal(mem_ctx, rules);
203 struct sysdb_attrs **rules; local
314 struct sysdb_attrs **rules; local
420 struct sysdb_attrs **rules; local
489 struct sysdb_attrs **rules; local
613 struct sysdb_attrs **rules; member in struct:sudosrv_get_rules_state
[all...]
/sssd/src/providers/data_provider/
H A Ddp_custom_data.h30 char **rules; member in struct:dp_sudo_data
H A Ddp_target_sudo.c43 char **rules = NULL; local
78 * rules[rules_num]
89 rules = talloc_zero_array(mem_ctx, char *, num_rules + 1);
90 if (rules == NULL) {
106 /* read the rules */
116 rules[i] = talloc_strdup(rules, rule);
117 if (rules[i] == NULL) {
126 rules[num_rules] = NULL;
136 *_rules = rules;
[all...]
/sssd/src/lib/ipa_hbac/
H A Dhbac_evaluator.c78 * evaluation rules
145 enum hbac_eval_result hbac_evaluate(struct hbac_rule **rules, argument
168 for (i = 0; rules[i]; i++) {
169 hbac_rule_debug_print(rules[i]);
170 intermediate_result = hbac_evaluate_rule(rules[i], hbac_req, &ret);
174 rules[i]->name);
177 HBAC_DEBUG(HBAC_DBG_INFO, "ALLOWED by rule [%s].\n", rules[i]->name);
181 (*info)->rule_name = strdup(rules[i]->name);
193 ret, rules[i]->name);
197 (*info)->rule_name = strdup(rules[
[all...]
/sssd/src/providers/ldap/
H A Dsdap_async_sudo.c38 struct sysdb_attrs **rules; member in struct:sdap_sudo_load_sudoers_state
63 state->rules = NULL;
74 DEBUG(SSSDBG_TRACE_FUNC, "About to fetch sudo rules\n");
107 &state->rules);
114 DEBUG(SSSDBG_IMPORTANT_INFO, "Received %zu sudo rules\n",
125 struct sysdb_attrs ***rules)
134 *rules = talloc_steal(mem_ctx, state->rules);
496 struct sysdb_attrs **rules,
507 ret = sysdb_attrs_get_el_ext(rules[
122 sdap_sudo_load_sudoers_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx, size_t *num_rules, struct sysdb_attrs ***rules) argument
495 sdap_sudo_qualify_names(struct sss_domain_info *dom, struct sysdb_attrs **rules, size_t rules_count) argument
554 struct sysdb_attrs **rules = NULL; local
[all...]
H A Dsdap_sudo_refresh.c63 /* Download all rules from LDAP */
71 /* Remove all rules from cache */
79 DEBUG(SSSDBG_TRACE_FUNC, "Issuing a full refresh of sudo rules\n");
128 DEBUG(SSSDBG_TRACE_FUNC, "Successful full refresh of sudo rules\n");
182 /* Download all rules from LDAP that are newer than usn */
199 /* Do not remove any rules that are already in the sysdb
202 DEBUG(SSSDBG_TRACE_FUNC, "Issuing a smart refresh of sudo rules "
241 DEBUG(SSSDBG_TRACE_FUNC, "Successful smart refresh of sudo rules\n");
276 char **rules)
290 if (rules
274 sdap_sudo_rules_refresh_send(TALLOC_CTX *mem_ctx, struct sdap_sudo_ctx *sudo_ctx, char **rules) argument
[all...]
/sssd/src/tests/
H A Dipa_hbac-tests.c190 struct hbac_rule **rules; local
206 /* Create the rules to evaluate against */
207 rules = talloc_array(test_ctx, struct hbac_rule *, 2);
208 fail_if (rules == NULL);
210 get_allow_all_rule(rules, &rules[0]);
211 rules[0]->name = talloc_strdup(rules[0], "Allow All");
212 fail_if(rules[0]->name == NULL);
213 rules[
238 struct hbac_rule **rules; local
316 struct hbac_rule **rules; local
434 struct hbac_rule **rules; local
513 struct hbac_rule **rules; local
591 struct hbac_rule **rules; local
670 struct hbac_rule **rules; local
748 struct hbac_rule **rules; local
[all...]
/sssd/src/tests/cmocka/
H A Dtest_sysdb_sudo.c55 } rules[] = { { "test_rule1", "test_host1.test_domain.test", "root" }, variable in typeref:struct:test_rule
91 rules[i].name);
95 rules[i].host);
99 rules[i].as_user);
112 rules[0].name);
116 rules[0].host);
120 rules[0].as_user);
221 assert_string_equal(result, rules[0].name);
226 assert_string_equal(result, rules[0].host);
231 assert_string_equal(result, rules[
[all...]
/sssd/src/db/
H A Dsysdb_sudo.c183 struct sysdb_attrs **rules = NULL; local
200 rules = talloc_realloc(tmp_ctx, rules, struct sysdb_attrs *,
202 NULL_CHECK(rules, ret, done);
204 rules[num_rules - 1] = in_rules[i];
209 *_rules = talloc_steal(mem_ctx, rules);
668 DEBUG(SSSDBG_TRACE_FUNC, "Deleting all cached sudo rules\n");
692 struct sysdb_attrs **rules,
699 DEBUG(SSSDBG_TRACE_FUNC, "About to remove rules from sudo cache\n");
701 if (num_rules == 0 || rules
691 sysdb_sudo_purge_byrules(struct sss_domain_info *dom, struct sysdb_attrs **rules, size_t num_rules) argument
727 struct sysdb_attrs **rules; local
772 sysdb_sudo_purge(struct sss_domain_info *domain, const char *delete_filter, struct sysdb_attrs **rules, size_t num_rules) argument
952 sysdb_sudo_store(struct sss_domain_info *domain, struct sysdb_attrs **rules, size_t num_rules) argument
[all...]
/sssd/src/python/
H A Dpyhbac.c1520 "evaluate(rules) -> int\n\n"
1521 "Evaluate a set of HBAC rules.\n"
1522 "rules is a sequence of HbacRule objects. The returned value describes\n"
1534 free_hbac_rule_list(struct hbac_rule **rules) argument
1538 if (!rules) return;
1540 for(i=0; rules[i]; i++) {
1541 free_hbac_rule(rules[i]);
1543 PyMem_Free(rules);
1555 struct hbac_rule **rules = NULL; local
1568 "The parameter rules mus
[all...]

Completed in 53 milliseconds