mirror of
https://github.com/freebsd/freebsd-src.git
synced 2026-11-07 04:36:52 -10:00
users(1): Use capsicum helpers for users
In doing so also fix the libcasper.h header to work in C++.
This commit is contained in:
1 parent
7f12ebe583
commit
bec6dc30e1
2 files changed
+3
-2
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=335636
No files matched your search
@@ -105,7 +105,7 @@ cap_init(void)
|
||||
{
|
||||
cap_channel_t *chan;
|
||||
|
||||
chan = malloc(sizeof(*chan));
|
||||
chan = (cap_channel_t *)malloc(sizeof(*chan));
|
||||
if (chan != NULL) {
|
||||
chan->cch_fd = -1;
|
||||
}
|
||||
|
||||
@@ -32,6 +32,7 @@ __FBSDID("$FreeBSD$");
|
||||
|
||||
#include <sys/capsicum.h>
|
||||
|
||||
#include <capsicum_helpers.h>
|
||||
#include <err.h>
|
||||
#include <errno.h>
|
||||
#include <utmpx.h>
|
||||
@@ -56,7 +57,7 @@ main(int argc, char **)
|
||||
|
||||
setutxent();
|
||||
|
||||
if (cap_enter() < 0 && errno != ENOSYS)
|
||||
if (caph_enter())
|
||||
err(1, "Failed to enter capability mode.");
|
||||
|
||||
while ((ut = getutxent()) != NULL)
|
||||
|
||||
Reference in new issue
Block a user