mirror of
https://gitlab.com/apparmor/apparmor
synced 2025-09-05 16:55:32 +00:00
55 lines
949 B
C
55 lines
949 B
C
/*
|
|
* Copyright (C) 2005 Novell/SUSE
|
|
*
|
|
* This program is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU General Public License as
|
|
* published by the Free Software Foundation, version 2 of the
|
|
* License.
|
|
*
|
|
* AppArmor capability definitions
|
|
*/
|
|
|
|
#include "apparmor.h"
|
|
|
|
static const char *capnames[] = {
|
|
"chown",
|
|
"dac_override",
|
|
"dac_read_search",
|
|
"fowner",
|
|
"fsetid",
|
|
"kill",
|
|
"setgid",
|
|
"setuid",
|
|
"setpcap",
|
|
"linux_immutable",
|
|
"net_bind_service",
|
|
"net_broadcast",
|
|
"net_admin",
|
|
"net_raw",
|
|
"ipc_lock",
|
|
"ipc_owner",
|
|
"sys_module",
|
|
"sys_rawio",
|
|
"sys_chroot",
|
|
"sys_ptrace",
|
|
"sys_pacct",
|
|
"sys_admin",
|
|
"sys_boot",
|
|
"sys_nice",
|
|
"sys_resource",
|
|
"sys_time",
|
|
"sys_tty_config",
|
|
"mknod",
|
|
"lease"
|
|
};
|
|
|
|
const char *capability_to_name(unsigned int cap)
|
|
{
|
|
const char *capname;
|
|
|
|
capname = (cap < (sizeof(capnames) / sizeof(char *))
|
|
? capnames[cap] : "invalid-capability");
|
|
|
|
return capname;
|
|
}
|