AppImage and CAP_SYS_BOOT using setcap: ./app.AppImage differs in [pe]

110 Views Asked by At

I am trying to grant reboot capability to my appimage using setcap. Using following command on a simple application (all it does is to reboot the machine) works, however it does not work with my actual app's appimage.

Both applications essentially do the same thing for rebooting:

sync();
if(reboot(RB_AUTOBOOT) == -1) {
    // handle errno
}

(In case you want to try the code, include <unistd.h> and <sys/reboot.h>)

Output with minimal test app:

sudo setcap -v cap_sys_boot+ep ./main
./main: OK

Output with appimage:

sudo setcap -v cap_sys_boot+ep ./app.AppImage
./app.AppImage differs in [pe]

Any idea what can I do?

0

There are 0 best solutions below