1 |
On 30/09/2021 13:58, Grant Edwards wrote: |
2 |
> On 2021-09-30, Grant Edwards <grant.b.edwards@×××××.com> wrote: |
3 |
>> On 2021-09-30, Grant Edwards <grant.b.edwards@×××××.com> wrote: |
4 |
>> |
5 |
>>> I'm trying to add NET_ADMIN capability to an executable that needs to |
6 |
>>> create a tun inteface. AFACIT, this is the command to do that: |
7 |
>>> |
8 |
>>> $ sudo setcap cap_net_admin+ep example_app |
9 |
>>> Failed to set capabilities on file `example_app' (Operation not supported) |
10 |
>>> |
11 |
>>> The only possible cause for that message Google has been able fo find |
12 |
>>> is that the FS doesn't have xattr support. |
13 |
>> |
14 |
>> Is Posix ACL support required for setcap? |
15 |
>> |
16 |
>> I can't find any documentation of such a requirement, but it's the |
17 |
>> only other thing I can think of... |
18 |
> |
19 |
> That's not it. I rebuilt my kernel with POSIX ACL support enabled for |
20 |
> ext4, rebooted, and verified that ACLs now work. |
21 |
> |
22 |
> Still can't figure out how to get setcap to work |
23 |
> |
24 |
> # file example_app |
25 |
> 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 |
26 |
> |
27 |
> # setcap cap_net_admin,cap_net_raw+eip example_app |
28 |
> Failed to set capabilities on file `example_app' (Operation not supported) |
29 |
> |
30 |
> -- |
31 |
> Grant |
32 |
> |
33 |
> |
34 |
Not sure if this is it, but do you have CONFIG_EXT4_FS_SECURITY enabled? |