may_access: fix a disrepency with fs behavior

If requestor's uid matches the victim uid, and the user perms are
not sufficient for the action, return false rather than going on
to check the group perms.

Also remove a duplicate check for requestor to be root in the
victim's namespace.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
compute_pid_cgroup: show errno if realpath fails

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
file_read_pids: reallocate in chunks of 256 pids rather than 1

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
get_pid_creds: read the right type for uid_t/gid_t

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
chown_cgroup_path: move nih_local fpath down in scope

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
read_pid_ns_link and read_user_ns_link: remove dead return

And exit if they fail.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>