Also check for capabilities CAP_IPC_LOCK and CAP_CHOWN

Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
DL6ER
2021-09-06 21:38:36 +02:00
parent 7547ae0c11
commit 4fa2a78769
+12
View File
@@ -99,6 +99,18 @@ bool check_capabilities(void)
logg("WARNING: Required Linux capability CAP_SYS_NICE not available");
capabilities_okay = false;
}
if (!(data->permitted & (1 << CAP_IPC_LOCK)))
{
// Necessary for mmap() to work correctly
logg("WARNING: Required Linux capability CAP_IPC_LOCK not available");
capabilities_okay = false;
}
if (!(data->permitted & (1 << CAP_CHOWN)))
{
// Necessary for chown() to work correctly
logg("WARNING: Required Linux capability CAP_CHOWN not available");
capabilities_okay = false;
}
// Free allocated memory
free(hdr);