Lines Matching refs:new_rule
132 struct hbac_rule *new_rule;
136 new_rule = talloc_zero(mem_ctx, struct hbac_rule);
137 if (new_rule == NULL) return ENOMEM;
143 new_rule->name = talloc_strdup(new_rule, "(none)");
145 new_rule->name = talloc_strndup(new_rule,
150 DEBUG(SSSDBG_TRACE_LIBS, "Processing rule [%s]\n", new_rule->name);
153 &new_rule->enabled);
156 if (!new_rule->enabled) {
168 "Rule [%s] is not an ALLOW rule\n", new_rule->name);
174 ret = hbac_user_attrs_to_rule(new_rule, hbac_ctx->be_ctx->domain,
175 new_rule->name,
177 &new_rule->users);
180 new_rule->name);
185 ret = hbac_service_attrs_to_rule(new_rule, hbac_ctx->be_ctx->domain,
186 new_rule->name,
188 &new_rule->services);
191 new_rule->name);
196 ret = hbac_thost_attrs_to_rule(new_rule, hbac_ctx->be_ctx->domain,
197 new_rule->name,
199 &new_rule->targethosts);
203 new_rule->name);
209 ret = hbac_shost_attrs_to_rule(new_rule, hbac_ctx->be_ctx->domain,
210 new_rule->name,
214 &new_rule->srchosts);
218 new_rule->name);
222 *rule = new_rule;
226 if (ret != EOK) talloc_free(new_rule);