Page MenuHomeFreeBSD

D9046.id23698.diff
No OneTemporary

D9046.id23698.diff

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 <sys/capsicum.h>
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
+#include <err.h>
+#include <errno.h>
#include <utmpx.h>
#include <algorithm>
@@ -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);

File Metadata

Mime Type
text/plain
Expires
Fri, Sep 11, 12:03 AM (17 h, 34 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
38674127
Default Alt Text
D9046.id23698.diff (606 B)

Event Timeline