BACKPORT: libselinux: procattr: return einval for <= 0 pid args.

getpidcon documentation does not specify that a pid of 0 refers to the
current process, and getcon exists specifically to provide this
functionality, and getpidcon(getpid()) would provide it as well.
Disallow pid values <= 0 that may lead to unintended behavior in
userspace object managers.

(from upstream commit: c7cf5d8aa061b9616bf9d5e91139ce4fb40f532c)

Signed-off-by: Daniel Cashman <dcashman@android.com>
AOSP Bug: 200617
Bug: 271114815
Change-Id: If8ce0b9aea8f001f5c42911f2fccb2edfe9ded38
1 file changed