On 2021-09-30, Grant Edwards <[email protected]> wrote:
> On 2021-09-30, Grant Edwards <[email protected]> wrote:
>
>> I'm trying to add NET_ADMIN capability to an executable that needs to
>> create a tun inteface. AFACIT, this is the command to do that:
>>
>> $ sudo setcap cap_net_admin+ep example_app
>> Failed to set capabilities on file `example_app' (Operation not supported)
>>
>> The only possible cause for that message Google has been able fo find
>> is that the FS doesn't have xattr support.
>
> Is Posix ACL support required for setcap?
>
> I can't find any documentation of such a requirement, but it's the
> only other thing I can think of...
That's not it. I rebuilt my kernel with POSIX ACL support enabled for
ext4, rebooted, and verified that ACLs now work.
Still can't figure out how to get setcap to work
# file example_app
example_app: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV),
dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux
3.2.0, with debug_info, not stripped
# setcap cap_net_admin,cap_net_raw+eip example_app
Failed to set capabilities on file `example_app' (Operation not supported)
--
Grant