Date: Wed, 28 Apr 2021 11:41:18 -0400 From: Mark Johnston <markj@freebsd.org> To: =?utf-8?B?SW9udcib?= Mihalache <ionut.mihalache1506@gmail.com> Cc: freebsd-hackers@freebsd.org Subject: Re: cap_sysctlbyname for hw.vmm.destroy Message-ID: <YImCHsL3lVN3HAWo@nuc> In-Reply-To: <CAOxbktazHmPtHjkkD6Hh7=1O5KW5N%2Bcu-5=WfC6GmKPut4K7yQ@mail.gmail.com> References: <CAOxbktY6GZY2rfyYMoTquyn04rM2GB5S2opAF1gDxh2177frLg@mail.gmail.com> <YIb66AlmFG0DPn%2BG@nuc> <CAOxbktbsOGAEHZHEuHNrzP9ToyJVN0MvhqfRX_M-kxNOChD2Gw@mail.gmail.com> <YIlot3y9aJ5cSB9H@nuc> <CAOxbktYCDEotQE%2BE3SHAkw_FCBui80xoAoWBbau9APb1M5=d6w@mail.gmail.com> <YIl0L5Wrm8YwpXWr@nuc> <CAOxbktazHmPtHjkkD6Hh7=1O5KW5N%2Bcu-5=WfC6GmKPut4K7yQ@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?YImCHsL3lVN3HAWo>