diff options
| author | Ian Bridges <icb@fastmail.org> | 2026-06-26 10:57:10 -0500 |
|---|---|---|
| committer | Paul Moore <paul@paul-moore.com> | 2026-07-13 18:15:30 -0400 |
| commit | 00f73e2a48548b1410a2403cd2d268a7d5ab0618 (patch) | |
| tree | 10f33439e8dfd48f8bb6b143640e049a2ac9376f /tools/perf/scripts/python | |
| parent | e7a614c008efb2f4a5db980be3a4b13b6a170a50 (diff) | |
selinux: replace strlcat() with seq_buf in selinux_ima_collect_state()
In preparation for removing the deprecated strlcat() API[1], replace the
strscpy()/strlcat() chain in selinux_ima_collect_state() with a struct
seq_buf, which tracks the write position and remaining space internally.
Each field is written with seq_buf_printf() using a "=%d;" format, which
removes the open-coded "=1;"/"=0;" constants. The seven per-append
WARN_ON(rc >= buf_len) truncation checks are replaced by a single
seq_buf_has_overflowed() check after the string is built.
Link: https://github.com/KSPP/linux/issues/370 [1]
Signed-off-by: Ian Bridges <icb@fastmail.org>
Reviewed-by: Stephen Smalley <stephen.smalley.work@gmail.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
