src/lib/env.c: introduce and use check_local_ugid()

Move the user mismatch test from vps_start_custom() to a separate
function check_local_ugid(). Use shorter variable names.

While at it, check return from stat() and error out if it fails.

It's cleaner and more readable that way.

Signed-off-by: Kir Kolyshkin <kir@openvz.org>
1 file changed