Android CTS 7.0 Release 32 (5731995)
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)
(cherry-picked from commit: 034c53e93a736f8b6f9aac90938ef65ffcaac9da)

Signed-off-by: Daniel Cashman <dcashman@android.com>
AOSP Bug: 200617
Bug: 27111481

Change-Id: I69b00df6413f5c3d566ac76cb4a464c97c167cdf
1 file changed