Lines Matching refs:buf_len
27 int buf_len, len, i, rc; in selinux_ima_collect_state() local
29 buf_len = strlen("initialized=0;enforcing=0;checkreqprot=0;") + 1; in selinux_ima_collect_state()
33 buf_len += strlen(selinux_policycap_names[i]) + len; in selinux_ima_collect_state()
35 buf = kzalloc(buf_len, GFP_KERNEL); in selinux_ima_collect_state()
39 rc = strscpy(buf, "initialized", buf_len); in selinux_ima_collect_state()
42 rc = strlcat(buf, selinux_initialized(state) ? on : off, buf_len); in selinux_ima_collect_state()
43 WARN_ON(rc >= buf_len); in selinux_ima_collect_state()
45 rc = strlcat(buf, "enforcing", buf_len); in selinux_ima_collect_state()
46 WARN_ON(rc >= buf_len); in selinux_ima_collect_state()
48 rc = strlcat(buf, enforcing_enabled(state) ? on : off, buf_len); in selinux_ima_collect_state()
49 WARN_ON(rc >= buf_len); in selinux_ima_collect_state()
51 rc = strlcat(buf, "checkreqprot", buf_len); in selinux_ima_collect_state()
52 WARN_ON(rc >= buf_len); in selinux_ima_collect_state()
54 rc = strlcat(buf, checkreqprot_get(state) ? on : off, buf_len); in selinux_ima_collect_state()
55 WARN_ON(rc >= buf_len); in selinux_ima_collect_state()
58 rc = strlcat(buf, selinux_policycap_names[i], buf_len); in selinux_ima_collect_state()
59 WARN_ON(rc >= buf_len); in selinux_ima_collect_state()
61 rc = strlcat(buf, state->policycap[i] ? on : off, buf_len); in selinux_ima_collect_state()
62 WARN_ON(rc >= buf_len); in selinux_ima_collect_state()