apparmor: clean up apparmor_process_label_get
Rather than open-coding file reading and retry semantics and
implementing the path generation logic separately to
apparmor_process_label_fd_get, refactor the logic so that it looks
closer to the pidfd version.
This will make it easier to implement the two-step handling for
/proc/self/attr/apparmor/current and makes this code slightly less
confusing.
Signed-off-by:
Aleksa Sarai <cyphar@cyphar.com>
Showing
Please
register
or
sign in
to comment