Lines Matching full:subject

113 	const char *subject, *subject_id, *resource, *action, *amount, *per;  in expand_amount()  local
123 subject = strsep(&copy, ":"); in expand_amount()
143 assert(subject != NULL); in expand_amount()
157 subject, subject_id, resource, action, (uintmax_t)num); in expand_amount()
160 subject, subject_id, resource, action, (uintmax_t)num, per); in expand_amount()
178 const char *subject, *textid, *rest; in expand_rule() local
188 subject = strsep(&copy, ":"); in expand_rule()
191 warnx("malformed rule '%s': missing subject", rule); in expand_rule()
199 if (strcasecmp(subject, "u") == 0) in expand_rule()
200 subject = "user"; in expand_rule()
201 else if (strcasecmp(subject, "g") == 0) in expand_rule()
202 subject = "group"; in expand_rule()
203 else if (strcasecmp(subject, "p") == 0) in expand_rule()
204 subject = "process"; in expand_rule()
205 else if (strcasecmp(subject, "l") == 0 || in expand_rule()
206 strcasecmp(subject, "c") == 0 || in expand_rule()
207 strcasecmp(subject, "class") == 0) in expand_rule()
208 subject = "loginclass"; in expand_rule()
209 else if (strcasecmp(subject, "j") == 0) in expand_rule()
210 subject = "jail"; in expand_rule()
213 strcasecmp(subject, "user") == 0 && strlen(textid) > 0) { in expand_rule()
219 ret = asprintf(&resolved, "%s:%d:%s", subject, (int)id, rest); in expand_rule()
221 strcasecmp(subject, "group") == 0 && strlen(textid) > 0) { in expand_rule()
227 ret = asprintf(&resolved, "%s:%d:%s", subject, (int)id, rest); in expand_rule()
229 ret = asprintf(&resolved, "%s:%s:%s", subject, textid, rest); in expand_rule()
252 const char *subject, *textid, *rest; in humanize_ids() local
256 subject = strsep(&rule, ":"); in humanize_ids()
259 errx(1, "rule passed from the kernel didn't contain subject"); in humanize_ids()
266 if (strcasecmp(subject, "user") == 0) { in humanize_ids()
273 } else if (strcasecmp(subject, "group") == 0) { in humanize_ids()
282 ret = asprintf(&humanized, "%s:%s:%s", subject, textid, rest); in humanize_ids()
308 const char *subject, *subject_id, *resource, *action, *amount, *per; in humanize_amount() local
316 subject = strsep(&copy, ":"); in humanize_amount()
329 assert(subject != NULL); in humanize_amount()
340 subject, subject_id, resource, action, buf); in humanize_amount()
343 subject, subject_id, resource, action, buf, per); in humanize_amount()