Searched refs:rule (Results 1 - 25 of 93) sorted by relevance

1234

/freebsd-11.0-release/contrib/libarchive/tar/
H A Dsubst.c72 struct subst_rule *rule; local
83 rule = malloc(sizeof(*rule));
84 if (rule == NULL)
86 rule->next = NULL;
89 subst->first_rule = rule;
91 subst->last_rule->next = rule;
92 subst->last_rule = rule;
106 if ((r = regcomp(&rule->re, pattern, REG_BASIC)) != 0) {
108 regerror(r, &rule
215 struct subst_rule *rule; local
313 struct subst_rule *rule; local
[all...]
/freebsd-11.0-release/contrib/ofed/libsdp/src/
H A Dmatch.c61 struct use_family_rule *rule,
67 char *target = __sdp_get_family_str( rule->target_family );
68 char *prog = rule->prog_name_expr;
70 /* TODO: handle IPv6 in rule */
71 if ( rule->match_by_addr ) {
74 if (rule->ip.ss_family == AF_INET)
75 inet_ntop(AF_INET, &((struct sockaddr_in *)&rule->ip)->sin_addr, tmp, sizeof(tmp));
76 else if (rule->ip.ss_family == AF_INET6)
77 inet_ntop(AF_INET6, &((struct sockaddr_in6 *)&rule->ip)->sin6_addr, tmp, sizeof(tmp));
79 sprintf( addr_buf, "%s/%d", tmp, rule
60 get_rule_str( struct use_family_rule *rule, char *buf, size_t len ) argument
123 match_addr( struct use_family_rule *rule, const struct sockaddr *addr_in ) argument
149 match_ip_addr_and_port( struct use_family_rule *rule, const struct sockaddr *addr_in, const socklen_t addrlen ) argument
217 struct use_family_rule *rule; local
283 struct use_family_rule *rule; local
[all...]
H A Dconfig_parser.y159 /* use the above state for making a new rule */
161 struct use_family_rule **p_tail, **p_head, *rule;
176 rule = (struct use_family_rule *)malloc(sizeof(*rule));
177 if (!rule) {
178 yyerror("fail to allocate new rule");
183 memset(rule, 0, sizeof(*rule));
184 *rule = __sdp_rule;
185 rule
[all...]
/freebsd-11.0-release/lib/libugidfw/
H A Dugidfw.h38 int bsde_rule_to_string(struct mac_bsdextended_rule *rule, char *buf,
43 struct mac_bsdextended_rule *rule, size_t buflen, char *errstr);
45 struct mac_bsdextended_rule *rule, size_t buflen, char *errstr);
49 int bsde_get_rule(int rulenum, struct mac_bsdextended_rule *rule,
52 int bsde_set_rule(int rulenum, struct mac_bsdextended_rule *rule,
54 int bsde_add_rule(int *rulename, struct mac_bsdextended_rule *rule,
H A Dugidfw.c60 bsde_rule_to_string(struct mac_bsdextended_rule *rule, char *buf, size_t buflen) argument
65 char *cur, type[sizeof(rule->mbr_object.mbo_type) * CHAR_BIT + 1];
77 if (rule->mbr_subject.mbs_flags) {
78 if (rule->mbr_subject.mbs_neg == MBS_ALL_FLAGS) {
89 if (!notdone && (rule->mbr_subject.mbs_neg & MBO_UID_DEFINED)) {
96 if (rule->mbr_subject.mbs_flags & MBO_UID_DEFINED) {
97 pwd = getpwuid(rule->mbr_subject.mbs_uid_min);
107 rule->mbr_subject.mbs_uid_min);
113 if (rule->mbr_subject.mbs_uid_min !=
114 rule
994 bsde_parse_rule(int argc, char *argv[], struct mac_bsdextended_rule *rule, size_t buflen, char *errstr) argument
1065 bsde_parse_rule_string(const char *string, struct mac_bsdextended_rule *rule, size_t buflen, char *errstr) argument
1177 bsde_get_rule(int rulenum, struct mac_bsdextended_rule *rule, size_t errlen, char *errstr) argument
1217 struct mac_bsdextended_rule rule; local
1247 bsde_set_rule(int rulenum, struct mac_bsdextended_rule *rule, size_t buflen, char *errstr) argument
1279 bsde_add_rule(int *rulenum, struct mac_bsdextended_rule *rule, size_t buflen, char *errstr) argument
[all...]
/freebsd-11.0-release/sys/security/mac_portacl/
H A Dmac_portacl.c114 struct rule { struct
120 TAILQ_ENTRY(rule) r_entries;
129 * Text format for the rule string is that a rule consists of a
136 static TAILQ_HEAD(rulehead, rule) rule_head;
142 struct rule *rule; local
144 while ((rule = TAILQ_FIRST(head)) != NULL) {
145 TAILQ_REMOVE(head, rule, r_entries);
146 free(rule, M_PORTAC
174 parse_rule_element(char *element, struct rule **rule) argument
380 struct rule *rule; local
[all...]
/freebsd-11.0-release/sys/security/mac_bsdextended/
H A Dmac_bsdextended.c83 "BSD Extended MAC rule");
94 &rule_slots, 0, "Number of used rule slots\n");
108 * between the new mode (first rule matches) and the old functionality (all
114 "Disable/enable match first rule functionality");
117 ugidfw_rule_valid(struct mac_bsdextended_rule *rule) argument
120 if ((rule->mbr_subject.mbs_flags | MBS_ALL_FLAGS) != MBS_ALL_FLAGS)
122 if ((rule->mbr_subject.mbs_neg | MBS_ALL_FLAGS) != MBS_ALL_FLAGS)
124 if ((rule->mbr_object.mbo_flags | MBO_ALL_FLAGS) != MBO_ALL_FLAGS)
126 if ((rule->mbr_object.mbo_neg | MBO_ALL_FLAGS) != MBO_ALL_FLAGS)
128 if ((rule
228 ugidfw_rulecheck(struct mac_bsdextended_rule *rule, struct ucred *cred, struct vnode *vp, struct vattr *vap, int acc_mode) argument
[all...]
/freebsd-11.0-release/sys/kern/
H A Dkern_rctl.c122 * 'rctl_rule_link' connects a rule with every racct it's related to.
123 * For example, rule 'user:X:openfiles:deny=N/process' is linked
216 static int rctl_rule_fully_specified(const struct rctl_rule *rule);
217 static void rctl_rule_to_sbuf(struct sbuf *sb, const struct rctl_rule *rule);
329 rctl_proc_rule_to_racct(const struct proc *p, const struct rctl_rule *rule) argument
336 switch (rule->rr_per) {
346 panic("%s: unknown per %d", __func__, rule->rr_per);
352 * hitting 'rule'.
355 rctl_available_resource(const struct proc *p, const struct rctl_rule *rule) argument
363 racct = rctl_proc_rule_to_racct(p, rule);
379 struct rctl_rule *rule; local
422 struct rctl_rule *rule; local
496 struct rctl_rule *rule; local
693 struct rctl_rule *rule; local
720 struct rctl_rule *rule; local
757 rctl_rule_matches(const struct rctl_rule *rule, const struct rctl_rule *filter) argument
875 rctl_racct_add_rule(struct racct *racct, struct rctl_rule *rule) argument
893 rctl_racct_add_rule_locked(struct racct *racct, struct rctl_rule *rule) argument
941 rctl_rule_acquire_subject(struct rctl_rule *rule) argument
969 rctl_rule_release_subject(struct rctl_rule *rule) argument
999 struct rctl_rule *rule; local
1021 rctl_rule_duplicate(const struct rctl_rule *rule, int flags) argument
1046 rctl_rule_acquire(struct rctl_rule *rule) argument
1058 struct rctl_rule *rule; local
1074 rctl_rule_release(struct rctl_rule *rule) argument
1094 rctl_rule_fully_specified(const struct rctl_rule *rule) argument
1137 struct rctl_rule *rule; local
1265 rctl_rule_add(struct rctl_rule *rule) argument
1469 rctl_rule_to_sbuf(struct sbuf *sb, const struct rctl_rule *rule) argument
1869 struct rctl_rule *rule; local
2098 struct rctl_rule *rule; local
[all...]
/freebsd-11.0-release/sbin/devfs/
H A DMakefile5 SRCS= devfs.c rule.c
/freebsd-11.0-release/usr.bin/rctl/
H A Drctl.c67 warnx("malformed rule '%s': unknown user '%s'",
74 warnx("malformed rule '%s': trailing characters "
95 warnx("malformed rule '%s': unknown group '%s'",
102 warnx("malformed rule '%s': trailing characters "
114 expand_amount(const char *rule, const char *unexpanded_rule) argument
121 tofree = copy = strdup(rule);
139 copy = strdup(rule);
153 warnx("malformed rule '%s': invalid numeric value '%s'",
179 expand_rule(const char *rule, bool resolve_ids) argument
186 tofree = copy = strdup(rule);
251 humanize_ids(char *rule) argument
309 humanize_amount(char *rule) argument
363 char *rule; local
398 add_rule(const char *rule, const char *unexpanded_rule) argument
593 char *rule = NULL, *unexpanded_rule; local
[all...]
/freebsd-11.0-release/contrib/pf/ftp-proxy/
H A Dfilter.c70 pfr.rule.direction = dir;
103 pfr.rule.rpool.proxy_port[0] = nat_range_low;
104 pfr.rule.rpool.proxy_port[1] = nat_range_high;
136 pfr.rule.rpool.proxy_port[0] = rdr_port;
258 /* Generic for all rule types. */
259 pfr.rule.af = src->sa_family;
260 pfr.rule.proto = IPPROTO_TCP;
261 pfr.rule.src.addr.type = PF_ADDR_ADDRMASK;
262 pfr.rule.dst.addr.type = PF_ADDR_ADDRMASK;
264 memcpy(&pfr.rule
[all...]
/freebsd-11.0-release/contrib/pf/tftp-proxy/
H A Dfilter.c74 pfr.rule.direction = dir;
107 pfr.rule.rpool.proxy_port[0] = nat_range_low;
108 pfr.rule.rpool.proxy_port[1] = nat_range_high;
140 pfr.rule.rpool.proxy_port[0] = rdr_port;
267 /* Generic for all rule types. */
268 pfr.rule.af = src->sa_family;
269 pfr.rule.proto = proto;
270 pfr.rule.src.addr.type = PF_ADDR_ADDRMASK;
271 pfr.rule.dst.addr.type = PF_ADDR_ADDRMASK;
273 memcpy(&pfr.rule
[all...]
/freebsd-11.0-release/usr.sbin/ugidfw/
H A Dugidfw.c75 struct mac_bsdextended_rule rule; local
78 error = bsde_parse_rule(argc, argv, &rule, BUFSIZ, errstr);
84 error = bsde_add_rule(&rulenum, &rule, BUFSIZ, errstr);
89 if (bsde_rule_to_string(&rule, charstr, BUFSIZ) == -1)
90 warnx("Added rule, but unable to print string.");
99 struct mac_bsdextended_rule rule; local
104 warnx("unable to get rule slots; mac_bsdextended.ko "
116 error = bsde_get_rule(i, &rule, BUFSIZ, errstr);
121 warnx("rule %d: %s", i, errstr);
127 if (bsde_rule_to_string(&rule, charst
138 struct mac_bsdextended_rule rule; local
[all...]
/freebsd-11.0-release/sys/netpfil/pf/
H A Dpf_ioctl.c231 /* default rule should never be garbage collected */
297 struct pf_rule *rule; local
311 rule = TAILQ_LAST(ruleset->rules[rs_num].active.ptr,
314 rule = TAILQ_FIRST(ruleset->rules[rs_num].active.ptr);
320 rule = TAILQ_LAST(ruleset->rules[rs_num].inactive.ptr,
323 rule = TAILQ_FIRST(ruleset->rules[rs_num].inactive.ptr);
326 while ((rule != NULL) && (rule->nr != rule_number))
327 rule = TAILQ_NEXT(rule, entrie
370 pf_unlink_rule(struct pf_rulequeue *rulequeue, struct pf_rule *rule) argument
384 pf_free_rule(struct pf_rule *rule) argument
736 struct pf_rule *rule; local
758 struct pf_rule *rule; local
818 pf_hash_rule(MD5_CTX *ctx, struct pf_rule *rule) argument
860 struct pf_rule *rule, **old_array; local
918 struct pf_rule *rule; local
1142 struct pf_rule *rule, *tail; local
1335 struct pf_rule *rule; local
1983 struct pf_rule *rule; local
[all...]
/freebsd-11.0-release/contrib/netbsd-tests/ipf/
H A Dt_bpf.sh52 { while read rule; do
53 atf_check -o save:save -x "echo '$rule' | ipftest -Rbr - -i in"
H A Dt_logging.sh47 { while read rule; do
48 echo $rule >>out
50 "echo $rule | ipftest -br - -F $2 -i in -l logout"
H A Dt_filter_exec.sh49 { while read rule; do
50 atf_check -x "echo \"$rule\" | ipftest -F \
101 { while read rule; do
102 atf_check -o save:save -x "echo \"$rule\" | \
/freebsd-11.0-release/contrib/ipfilter/rules/
H A Dipmon.conf22 rule = 12, logtag = 101, direction = in, result = block,
/freebsd-11.0-release/contrib/byacc/
H A Dgraph.c55 int rule; local
68 rule = -(*sp);
69 fprintf(graph_file, " %s -> ", symbol_pname[rlhs[rule]]);
71 for (sp = ritem + rrhs[rule]; sp < sp1; sp++)
H A Dclosure.c27 int rule; local
36 for (rule = *sp; rule > 0; rule = *++sp)
38 symbol = ritem[rrhs[rule]];
65 int rule; local
93 while ((rule = *rp++) >= 0)
95 SETBIT(rrow, rule);
/freebsd-11.0-release/contrib/blacklist/libexec/
H A Dblacklistd-helper61 # use $ipfw_offset+$port for rule number
62 rule=$(($ipfw_offset + $6))
66 /sbin/ipfw -q add $rule drop $3 from "table("$tname")" to \
70 /sbin/npfctl rule "$2" add block in final $proto from \
93 /sbin/npfctl rule "$2" rem-id "$7"
109 /sbin/npfctl rule "$2" flush
/freebsd-11.0-release/sys/netpfil/ipfw/
H A Dip_fw_sockopt.c34 * Control socket and rule management routines for ipfw.
80 static int check_ipfw_rule1(struct ip_fw_rule *rule, int size,
82 static int check_ipfw_rule0(struct ip_fw_rule0 *rule, int size,
158 set_legacy_obj_kidx(struct ip_fw_chain *ch, struct ip_fw_rule0 *rule);
161 static int mark_object_kidx(struct ip_fw_chain *ch, struct ip_fw *rule,
163 static int ref_rule_objects(struct ip_fw_chain *ch, struct ip_fw *rule,
167 static void unref_rule_objects(struct ip_fw_chain *chain, struct ip_fw *rule);
205 struct ip_fw *rule; local
207 rule = malloc(rulesize, M_IPFW, M_WAITOK | M_ZERO);
208 rule
214 free_rule(struct ip_fw *rule) argument
790 ipfw_reap_add(struct ip_fw_chain *chain, struct ip_fw **head, struct ip_fw *rule) argument
811 struct ip_fw *rule; local
837 ipfw_match_range(struct ip_fw *rule, ipfw_range_tlv *rt) argument
976 struct ip_fw *reap, *rule, **map; local
1055 struct ip_fw *rule; local
1142 struct ip_fw *rule; local
1178 clear_counters(struct ip_fw *rule, int log_only) argument
1196 struct ip_fw *rule; local
1356 struct ip_fw *rule; local
1545 struct ip_fw *rule; local
1607 check_ipfw_rule1(struct ip_fw_rule *rule, int size, struct rule_check_info *ci) argument
1640 check_ipfw_rule0(struct ip_fw_rule0 *rule, int size, struct rule_check_info *ci) argument
2057 struct ip_fw *rule; local
2264 mark_object_kidx(struct ip_fw_chain *ch, struct ip_fw *rule, uint32_t *bmask) argument
2323 struct ip_fw *rule; local
2496 set_legacy_obj_kidx(struct ip_fw_chain *ch, struct ip_fw_rule0 *rule) argument
2582 unref_rule_objects(struct ip_fw_chain *ch, struct ip_fw *rule) argument
2671 ref_rule_objects(struct ip_fw_chain *ch, struct ip_fw *rule, struct rule_check_info *ci, struct obj_idx *oib, struct tid_info *ti) argument
3697 struct ip_fw_rule0 *rule; local
4010 convert_rule_to_7(struct ip_fw_rule0 *rule) argument
4064 convert_rule_to_8(struct ip_fw_rule0 *rule) argument
[all...]
H A Dip_fw_eaction.c64 * the search continues to the next rule. If it has non zero value,
255 struct ip_fw *rule; local
270 rule = ch->map[i];
271 cmd = ACTION_PTR(rule);
281 * will be decremented on rule deletion.
289 if (rule->act_ofs < rule->cmd_len - 1) {
290 EACTION_DEBUG("truncate rule %d", rule->rulenum);
291 rule
[all...]
/freebsd-11.0-release/tests/sys/mac/bsdextended/
H A Dugidfw_test.c52 * rule<->string routines to confirm they work approximately as desired.
149 struct mac_bsdextended_rule rule; local
171 error = bsde_parse_rule_string(test_strings[i], &rule,
180 error = bsde_rule_to_string(&rule, rulestr, sizeof(rulestr));
182 printf("not ok %d # bsde_rule_to_string: rule for '%s' "
231 * policy for basic state. We want the rule count to be 0 before
/freebsd-11.0-release/sys/sys/
H A Drctl.h55 * in the rule are met. There is no global list of rules; instead,
57 * they apply to - for example, a rule of type "user" is linked to the
61 * pointing to the rule.
64 * structures, to subjects. In order to change a rule, add a new rule
138 struct rctl_rule *rctl_rule_duplicate(const struct rctl_rule *rule, int flags);
139 void rctl_rule_acquire(struct rctl_rule *rule);
140 void rctl_rule_release(struct rctl_rule *rule);
141 int rctl_rule_add(struct rctl_rule *rule);

Completed in 326 milliseconds

1234