]> Git Repo - linux.git/commit - fs/proc/base.c
procfs: use an enum for possible hidepid values
authorLafcadio Wluiki <[email protected]>
Fri, 24 Feb 2017 23:00:23 +0000 (15:00 -0800)
committerLinus Torvalds <[email protected]>
Sat, 25 Feb 2017 01:46:56 +0000 (17:46 -0800)
commit796f571b0c5cf3efd2f652779770fa7bbbc2bb03
tree56ce6af76056517dd861c1f9254c162291e72f41
parenta0a07b87f3942fdee7692914b36576e009e2d434
procfs: use an enum for possible hidepid values

Previously, the hidepid parameter was checked by comparing literal
integers 0, 1, 2.  Let's add a proper enum for this, to make the
checking more expressive:

        0 → HIDEPID_OFF
        1 → HIDEPID_NO_ACCESS
        2 → HIDEPID_INVISIBLE

This changes the internal labelling only, the userspace-facing interface
remains unmodified, and still works with literal integers 0, 1, 2.

No functional changes.

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Lafcadio Wluiki <[email protected]>
Signed-off-by: Djalal Harouni <[email protected]>
Acked-by: Kees Cook <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
fs/proc/base.c
fs/proc/inode.c
fs/proc/root.c
include/linux/pid_namespace.h
This page took 0.052308 seconds and 4 git commands to generate.