[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freebsd-hackers
Subject:    Re: cap_sysctlbyname for hw.vmm.destroy
From:       Mark Johnston <markj () freebsd ! org>
Date:       2021-04-28 15:41:18
Message-ID: YImCHsL3lVN3HAWo () nuc
[Download RAW message or body]

On Wed, Apr 28, 2021 at 06:19:09PM +0300, Ionuț Mihalache wrote:
> Even with the fixes cap_sysctl still returns EPERM for that simple example.

Are you sure that libcap_sysctl is actually being used?  In other words,
are you compiling with -DWITH_CASPER?  If not, the program will call
cap_enter() and then try to read the sysctl directly, since
cap_sysctlbyname() will be a simple wrapper for sysctlbyname().

> 
> În mie., 28 apr. 2021 la 17:41, Mark Johnston <markj@freebsd.org> a scris:
> 
> > There are two bugs in the example, also present in your WIP.  I fixed
> > them here:
> >
> > https://cgit.freebsd.org/src/commit/?id=44bbda649dc6c1cdc5a99641e14c77157967e140
> >
> > On Wed, Apr 28, 2021 at 05:22:22PM +0300, Ionuț Mihalache wrote:
> > > I update the code now [1] but still the same error. Even without any
> > limits
> > > the cap_sysctlbyname fails after using cap_enter.
_______________________________________________
freebsd-hackers@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic