Don't call cap_get_proc(3) unconditionally.

cap_get_proc(3) uses the capget(2) system call. Don't call
cap_get_proc(3) if |flags.use_caps| is not set, to avoid
having the program call a capability-related syscall even
when capabilities are not being used.

Bug: 27366428

Change-Id: Ifb797bc5f1a43adf4f9fa2fff3ef7d6f4bd9c958
1 file changed