Index: head/usr.bin/users/users.cc =================================================================== --- head/usr.bin/users/users.cc +++ head/usr.bin/users/users.cc @@ -27,9 +27,12 @@ * SUCH DAMAGE. */ +#include #include __FBSDID("$FreeBSD$"); +#include +#include #include #include @@ -51,6 +54,10 @@ } setutxent(); + + if (cap_enter() < 0 && errno != ENOSYS) + err(1, "Failed to enter capability mode."); + while ((ut = getutxent()) != NULL) if (ut->ut_type == USER_PROCESS) names.insert(ut->ut_user);