1*2810ac1bSKiyoung Kimpackage cap 2*2810ac1bSKiyoung Kim 3*2810ac1bSKiyoung Kim/* ** DO NOT EDIT THIS FILE. IT WAS AUTO-GENERATED BY LIBCAP'S GO BUILDER (mknames.go) ** */ 4*2810ac1bSKiyoung Kim 5*2810ac1bSKiyoung Kim// NamedCount holds the number of capability values, with official 6*2810ac1bSKiyoung Kim// names, known at the time this libcap/cap version was released. The 7*2810ac1bSKiyoung Kim// "../libcap/cap" package is fully able to manipulate higher numbered 8*2810ac1bSKiyoung Kim// capability values by numerical value. However, if you find 9*2810ac1bSKiyoung Kim// cap.NamedCount < cap.MaxBits(), it is probably time to upgrade this 10*2810ac1bSKiyoung Kim// package on your system. 11*2810ac1bSKiyoung Kim// 12*2810ac1bSKiyoung Kim// FWIW the userspace tool '/sbin/capsh' also contains a runtime check 13*2810ac1bSKiyoung Kim// for the condition that libcap is behind the running kernel in this 14*2810ac1bSKiyoung Kim// way. 15*2810ac1bSKiyoung Kimconst NamedCount = 41 16*2810ac1bSKiyoung Kim 17*2810ac1bSKiyoung Kim// CHOWN etc., are the named capability values of the Linux 18*2810ac1bSKiyoung Kim// kernel. The canonical source for each name is the 19*2810ac1bSKiyoung Kim// "uapi/linux/capabilities.h" file. Some values may not be available 20*2810ac1bSKiyoung Kim// (yet) where the kernel is older. The actual number of capabities 21*2810ac1bSKiyoung Kim// supported by the running kernel can be obtained using the 22*2810ac1bSKiyoung Kim// cap.MaxBits() function. 23*2810ac1bSKiyoung Kimconst ( 24*2810ac1bSKiyoung Kim // CHOWN allows a process to arbitrarily change the user and 25*2810ac1bSKiyoung Kim // group ownership of a file. 26*2810ac1bSKiyoung Kim CHOWN Value = iota 27*2810ac1bSKiyoung Kim 28*2810ac1bSKiyoung Kim // DAC_OVERRIDE allows a process to override of all Discretionary 29*2810ac1bSKiyoung Kim // Access Control (DAC) access, including ACL execute 30*2810ac1bSKiyoung Kim // access. That is read, write or execute files that the 31*2810ac1bSKiyoung Kim // process would otherwise not have access to. This 32*2810ac1bSKiyoung Kim // excludes DAC access covered by cap.LINUX_IMMUTABLE. 33*2810ac1bSKiyoung Kim DAC_OVERRIDE 34*2810ac1bSKiyoung Kim 35*2810ac1bSKiyoung Kim // DAC_READ_SEARCH allows a process to override all DAC restrictions 36*2810ac1bSKiyoung Kim // limiting the read and search of files and 37*2810ac1bSKiyoung Kim // directories. This excludes DAC access covered by 38*2810ac1bSKiyoung Kim // cap.LINUX_IMMUTABLE. 39*2810ac1bSKiyoung Kim DAC_READ_SEARCH 40*2810ac1bSKiyoung Kim 41*2810ac1bSKiyoung Kim // FOWNER allows a process to perform operations on files, even 42*2810ac1bSKiyoung Kim // where file owner ID should otherwise need be equal to 43*2810ac1bSKiyoung Kim // the UID, except where cap.FSETID is applicable. It 44*2810ac1bSKiyoung Kim // doesn't override MAC and DAC restrictions. 45*2810ac1bSKiyoung Kim // 46*2810ac1bSKiyoung Kim // This capability permits the deletion of a file owned 47*2810ac1bSKiyoung Kim // by another UID in a directory protected by the sticky 48*2810ac1bSKiyoung Kim // (t) bit. 49*2810ac1bSKiyoung Kim FOWNER 50*2810ac1bSKiyoung Kim 51*2810ac1bSKiyoung Kim // FSETID allows a process to set the S_ISUID and S_ISUID bits of 52*2810ac1bSKiyoung Kim // the file permissions, even when the process' effective 53*2810ac1bSKiyoung Kim // UID or GID/supplementary GIDs do not match that of the 54*2810ac1bSKiyoung Kim // file. 55*2810ac1bSKiyoung Kim FSETID 56*2810ac1bSKiyoung Kim 57*2810ac1bSKiyoung Kim // KILL allows a process to send a kill(2) signal to any other 58*2810ac1bSKiyoung Kim // process - overriding the limitation that there be a 59*2810ac1bSKiyoung Kim // [E]UID match between source and target process. 60*2810ac1bSKiyoung Kim KILL 61*2810ac1bSKiyoung Kim 62*2810ac1bSKiyoung Kim // SETGID allows a process to freely manipulate its own GIDs: 63*2810ac1bSKiyoung Kim // - arbitrarily set the GID, EGID, REGID, RESGID values 64*2810ac1bSKiyoung Kim // - arbitrarily set the supplementary GIDs 65*2810ac1bSKiyoung Kim // - allows the forging of GID credentials passed over a 66*2810ac1bSKiyoung Kim // socket 67*2810ac1bSKiyoung Kim SETGID 68*2810ac1bSKiyoung Kim 69*2810ac1bSKiyoung Kim // SETUID allows a process to freely manipulate its own UIDs: 70*2810ac1bSKiyoung Kim // - arbitrarily set the UID, EUID, REUID and RESUID 71*2810ac1bSKiyoung Kim // values 72*2810ac1bSKiyoung Kim // - allows the forging of UID credentials passed over a 73*2810ac1bSKiyoung Kim // socket 74*2810ac1bSKiyoung Kim SETUID 75*2810ac1bSKiyoung Kim 76*2810ac1bSKiyoung Kim // SETPCAP allows a process to freely manipulate its inheritable 77*2810ac1bSKiyoung Kim // capabilities. 78*2810ac1bSKiyoung Kim // 79*2810ac1bSKiyoung Kim // Linux supports the POSIX.1e Inheritable set, the POXIX.1e (X 80*2810ac1bSKiyoung Kim // vector) known in Linux as the Bounding vector, as well as 81*2810ac1bSKiyoung Kim // the Linux extension Ambient vector. 82*2810ac1bSKiyoung Kim // 83*2810ac1bSKiyoung Kim // This capability permits dropping bits from the Bounding 84*2810ac1bSKiyoung Kim // vector (ie. raising B bits in the libcap IAB 85*2810ac1bSKiyoung Kim // representation). It also permits the process to raise 86*2810ac1bSKiyoung Kim // Ambient vector bits that are both raised in the Permitted 87*2810ac1bSKiyoung Kim // and Inheritable sets of the process. This capability cannot 88*2810ac1bSKiyoung Kim // be used to raise Permitted bits, Effective bits beyond those 89*2810ac1bSKiyoung Kim // already present in the process' permitted set, or 90*2810ac1bSKiyoung Kim // Inheritable bits beyond those present in the Bounding 91*2810ac1bSKiyoung Kim // vector. 92*2810ac1bSKiyoung Kim // 93*2810ac1bSKiyoung Kim // [Historical note: prior to the advent of file capabilities 94*2810ac1bSKiyoung Kim // (2008), this capability was suppressed by default, as its 95*2810ac1bSKiyoung Kim // unsuppressed behavior was not auditable: it could 96*2810ac1bSKiyoung Kim // asynchronously grant its own Permitted capabilities to and 97*2810ac1bSKiyoung Kim // remove capabilities from other processes arbitrarily. The 98*2810ac1bSKiyoung Kim // former leads to undefined behavior, and the latter is better 99*2810ac1bSKiyoung Kim // served by the kill system call.] 100*2810ac1bSKiyoung Kim SETPCAP 101*2810ac1bSKiyoung Kim 102*2810ac1bSKiyoung Kim // LINUX_IMMUTABLE allows a process to modify the S_IMMUTABLE and 103*2810ac1bSKiyoung Kim // S_APPEND file attributes. 104*2810ac1bSKiyoung Kim LINUX_IMMUTABLE 105*2810ac1bSKiyoung Kim 106*2810ac1bSKiyoung Kim // NET_BIND_SERVICE allows a process to bind to privileged ports: 107*2810ac1bSKiyoung Kim // - TCP/UDP sockets below 1024 108*2810ac1bSKiyoung Kim // - ATM VCIs below 32 109*2810ac1bSKiyoung Kim NET_BIND_SERVICE 110*2810ac1bSKiyoung Kim 111*2810ac1bSKiyoung Kim // NET_BROADCAST allows a process to broadcast to the network and to 112*2810ac1bSKiyoung Kim // listen to multicast. 113*2810ac1bSKiyoung Kim NET_BROADCAST 114*2810ac1bSKiyoung Kim 115*2810ac1bSKiyoung Kim // NET_ADMIN allows a process to perform network configuration 116*2810ac1bSKiyoung Kim // operations: 117*2810ac1bSKiyoung Kim // - interface configuration 118*2810ac1bSKiyoung Kim // - administration of IP firewall, masquerading and 119*2810ac1bSKiyoung Kim // accounting 120*2810ac1bSKiyoung Kim // - setting debug options on sockets 121*2810ac1bSKiyoung Kim // - modification of routing tables 122*2810ac1bSKiyoung Kim // - setting arbitrary process, and process group 123*2810ac1bSKiyoung Kim // ownership on sockets 124*2810ac1bSKiyoung Kim // - binding to any address for transparent proxying 125*2810ac1bSKiyoung Kim // (this is also allowed via cap.NET_RAW) 126*2810ac1bSKiyoung Kim // - setting TOS (Type of service) 127*2810ac1bSKiyoung Kim // - setting promiscuous mode 128*2810ac1bSKiyoung Kim // - clearing driver statistics 129*2810ac1bSKiyoung Kim // - multicasing 130*2810ac1bSKiyoung Kim // - read/write of device-specific registers 131*2810ac1bSKiyoung Kim // - activation of ATM control sockets 132*2810ac1bSKiyoung Kim NET_ADMIN 133*2810ac1bSKiyoung Kim 134*2810ac1bSKiyoung Kim // NET_RAW allows a process to use raw networking: 135*2810ac1bSKiyoung Kim // - RAW sockets 136*2810ac1bSKiyoung Kim // - PACKET sockets 137*2810ac1bSKiyoung Kim // - binding to any address for transparent proxying 138*2810ac1bSKiyoung Kim // (also permitted via cap.NET_ADMIN) 139*2810ac1bSKiyoung Kim NET_RAW 140*2810ac1bSKiyoung Kim 141*2810ac1bSKiyoung Kim // IPC_LOCK allows a process to lock shared memory segments for IPC 142*2810ac1bSKiyoung Kim // purposes. Also enables mlock and mlockall system 143*2810ac1bSKiyoung Kim // calls. 144*2810ac1bSKiyoung Kim IPC_LOCK 145*2810ac1bSKiyoung Kim 146*2810ac1bSKiyoung Kim // IPC_OWNER allows a process to override IPC ownership checks. 147*2810ac1bSKiyoung Kim IPC_OWNER 148*2810ac1bSKiyoung Kim 149*2810ac1bSKiyoung Kim // SYS_MODULE allows a process to initiate the loading and unloading 150*2810ac1bSKiyoung Kim // of kernel modules. This capability can effectively 151*2810ac1bSKiyoung Kim // modify kernel without limit. 152*2810ac1bSKiyoung Kim SYS_MODULE 153*2810ac1bSKiyoung Kim 154*2810ac1bSKiyoung Kim // SYS_RAWIO allows a process to perform raw IO: 155*2810ac1bSKiyoung Kim // - permit ioper/iopl access 156*2810ac1bSKiyoung Kim // - permit sending USB messages to any device via 157*2810ac1bSKiyoung Kim // /dev/bus/usb 158*2810ac1bSKiyoung Kim SYS_RAWIO 159*2810ac1bSKiyoung Kim 160*2810ac1bSKiyoung Kim // SYS_CHROOT allows a process to perform a chroot syscall to change 161*2810ac1bSKiyoung Kim // the effective root of the process' file system: 162*2810ac1bSKiyoung Kim // redirect to directory "/" to some other location. 163*2810ac1bSKiyoung Kim SYS_CHROOT 164*2810ac1bSKiyoung Kim 165*2810ac1bSKiyoung Kim // SYS_PTRACE allows a process to perform a ptrace() of any other 166*2810ac1bSKiyoung Kim // process. 167*2810ac1bSKiyoung Kim SYS_PTRACE 168*2810ac1bSKiyoung Kim 169*2810ac1bSKiyoung Kim // SYS_PACCT allows a process to configure process accounting. 170*2810ac1bSKiyoung Kim SYS_PACCT 171*2810ac1bSKiyoung Kim 172*2810ac1bSKiyoung Kim // SYS_ADMIN allows a process to perform a somewhat arbitrary 173*2810ac1bSKiyoung Kim // grab-bag of privileged operations. Over time, this 174*2810ac1bSKiyoung Kim // capability should weaken as specific capabilities are 175*2810ac1bSKiyoung Kim // created for subsets of cap.SYS_ADMINs functionality: 176*2810ac1bSKiyoung Kim // - configuration of the secure attention key 177*2810ac1bSKiyoung Kim // - administration of the random device 178*2810ac1bSKiyoung Kim // - examination and configuration of disk quotas 179*2810ac1bSKiyoung Kim // - setting the domainname 180*2810ac1bSKiyoung Kim // - setting the hostname 181*2810ac1bSKiyoung Kim // - calling bdflush() 182*2810ac1bSKiyoung Kim // - mount() and umount(), setting up new SMB connection 183*2810ac1bSKiyoung Kim // - some autofs root ioctls 184*2810ac1bSKiyoung Kim // - nfsservctl 185*2810ac1bSKiyoung Kim // - VM86_REQUEST_IRQ 186*2810ac1bSKiyoung Kim // - to read/write pci config on alpha 187*2810ac1bSKiyoung Kim // - irix_prctl on mips (setstacksize) 188*2810ac1bSKiyoung Kim // - flushing all cache on m68k (sys_cacheflush) 189*2810ac1bSKiyoung Kim // - removing semaphores 190*2810ac1bSKiyoung Kim // - Used instead of cap.CHOWN to "chown" IPC message 191*2810ac1bSKiyoung Kim // queues, semaphores and shared memory 192*2810ac1bSKiyoung Kim // - locking/unlocking of shared memory segment 193*2810ac1bSKiyoung Kim // - turning swap on/off 194*2810ac1bSKiyoung Kim // - forged pids on socket credentials passing 195*2810ac1bSKiyoung Kim // - setting readahead and flushing buffers on block 196*2810ac1bSKiyoung Kim // devices 197*2810ac1bSKiyoung Kim // - setting geometry in floppy driver 198*2810ac1bSKiyoung Kim // - turning DMA on/off in xd driver 199*2810ac1bSKiyoung Kim // - administration of md devices (mostly the above, but 200*2810ac1bSKiyoung Kim // some extra ioctls) 201*2810ac1bSKiyoung Kim // - tuning the ide driver 202*2810ac1bSKiyoung Kim // - access to the nvram device 203*2810ac1bSKiyoung Kim // - administration of apm_bios, serial and bttv (TV) 204*2810ac1bSKiyoung Kim // device 205*2810ac1bSKiyoung Kim // - manufacturer commands in isdn CAPI support driver 206*2810ac1bSKiyoung Kim // - reading non-standardized portions of PCI 207*2810ac1bSKiyoung Kim // configuration space 208*2810ac1bSKiyoung Kim // - DDI debug ioctl on sbpcd driver 209*2810ac1bSKiyoung Kim // - setting up serial ports 210*2810ac1bSKiyoung Kim // - sending raw qic-117 commands 211*2810ac1bSKiyoung Kim // - enabling/disabling tagged queuing on SCSI 212*2810ac1bSKiyoung Kim // controllers and sending arbitrary SCSI commands 213*2810ac1bSKiyoung Kim // - setting encryption key on loopback filesystem 214*2810ac1bSKiyoung Kim // - setting zone reclaim policy 215*2810ac1bSKiyoung Kim SYS_ADMIN 216*2810ac1bSKiyoung Kim 217*2810ac1bSKiyoung Kim // SYS_BOOT allows a process to initiate a reboot of the system. 218*2810ac1bSKiyoung Kim SYS_BOOT 219*2810ac1bSKiyoung Kim 220*2810ac1bSKiyoung Kim // SYS_NICE allows a process to maipulate the execution priorities 221*2810ac1bSKiyoung Kim // of arbitrary processes: 222*2810ac1bSKiyoung Kim // - those involving different UIDs 223*2810ac1bSKiyoung Kim // - setting their CPU affinity 224*2810ac1bSKiyoung Kim // - alter the FIFO vs. round-robin (realtime) 225*2810ac1bSKiyoung Kim // scheduling for itself and other processes. 226*2810ac1bSKiyoung Kim SYS_NICE 227*2810ac1bSKiyoung Kim 228*2810ac1bSKiyoung Kim // SYS_RESOURCE allows a process to adjust resource related parameters 229*2810ac1bSKiyoung Kim // of processes and the system: 230*2810ac1bSKiyoung Kim // - set and override resource limits 231*2810ac1bSKiyoung Kim // - override quota limits 232*2810ac1bSKiyoung Kim // - override the reserved space on ext2 filesystem 233*2810ac1bSKiyoung Kim // (this can also be achieved via cap.FSETID) 234*2810ac1bSKiyoung Kim // - modify the data journaling mode on ext3 filesystem, 235*2810ac1bSKiyoung Kim // which uses journaling resources 236*2810ac1bSKiyoung Kim // - override size restrictions on IPC message queues 237*2810ac1bSKiyoung Kim // - configure more than 64Hz interrupts from the 238*2810ac1bSKiyoung Kim // real-time clock 239*2810ac1bSKiyoung Kim // - override the maximum number of consoles for console 240*2810ac1bSKiyoung Kim // allocation 241*2810ac1bSKiyoung Kim // - override the maximum number of keymaps 242*2810ac1bSKiyoung Kim SYS_RESOURCE 243*2810ac1bSKiyoung Kim 244*2810ac1bSKiyoung Kim // SYS_TIME allows a process to perform time manipulation of clocks: 245*2810ac1bSKiyoung Kim // - alter the system clock 246*2810ac1bSKiyoung Kim // - enable irix_stime on MIPS 247*2810ac1bSKiyoung Kim // - set the real-time clock 248*2810ac1bSKiyoung Kim SYS_TIME 249*2810ac1bSKiyoung Kim 250*2810ac1bSKiyoung Kim // SYS_TTY_CONFIG allows a process to manipulate tty devices: 251*2810ac1bSKiyoung Kim // - configure tty devices 252*2810ac1bSKiyoung Kim // - perform vhangup() of a tty 253*2810ac1bSKiyoung Kim SYS_TTY_CONFIG 254*2810ac1bSKiyoung Kim 255*2810ac1bSKiyoung Kim // MKNOD allows a process to perform privileged operations with 256*2810ac1bSKiyoung Kim // the mknod() system call. 257*2810ac1bSKiyoung Kim MKNOD 258*2810ac1bSKiyoung Kim 259*2810ac1bSKiyoung Kim // LEASE allows a process to take leases on files. 260*2810ac1bSKiyoung Kim LEASE 261*2810ac1bSKiyoung Kim 262*2810ac1bSKiyoung Kim // AUDIT_WRITE allows a process to write to the audit log via a 263*2810ac1bSKiyoung Kim // unicast netlink socket. 264*2810ac1bSKiyoung Kim AUDIT_WRITE 265*2810ac1bSKiyoung Kim 266*2810ac1bSKiyoung Kim // AUDIT_CONTROL allows a process to configure audit logging via a 267*2810ac1bSKiyoung Kim // unicast netlink socket. 268*2810ac1bSKiyoung Kim AUDIT_CONTROL 269*2810ac1bSKiyoung Kim 270*2810ac1bSKiyoung Kim // SETFCAP allows a process to set capabilities on files. 271*2810ac1bSKiyoung Kim // Permits a process to uid_map the uid=0 of the 272*2810ac1bSKiyoung Kim // parent user namespace into that of the child 273*2810ac1bSKiyoung Kim // namespace. Also, permits a process to override 274*2810ac1bSKiyoung Kim // securebits locks through user namespace 275*2810ac1bSKiyoung Kim // creation. 276*2810ac1bSKiyoung Kim SETFCAP 277*2810ac1bSKiyoung Kim 278*2810ac1bSKiyoung Kim // MAC_OVERRIDE allows a process to override Manditory Access Control 279*2810ac1bSKiyoung Kim // (MAC) access. Not all kernels are configured with a MAC 280*2810ac1bSKiyoung Kim // mechanism, but this is the capability reserved for 281*2810ac1bSKiyoung Kim // overriding them. 282*2810ac1bSKiyoung Kim MAC_OVERRIDE 283*2810ac1bSKiyoung Kim 284*2810ac1bSKiyoung Kim // MAC_ADMIN allows a process to configure the Mandatory Access 285*2810ac1bSKiyoung Kim // Control (MAC) policy. Not all kernels are configured 286*2810ac1bSKiyoung Kim // with a MAC enabled, but if they are this capability is 287*2810ac1bSKiyoung Kim // reserved for code to perform administration tasks. 288*2810ac1bSKiyoung Kim MAC_ADMIN 289*2810ac1bSKiyoung Kim 290*2810ac1bSKiyoung Kim // SYSLOG allows a process to configure the kernel's syslog 291*2810ac1bSKiyoung Kim // (printk) behavior. 292*2810ac1bSKiyoung Kim SYSLOG 293*2810ac1bSKiyoung Kim 294*2810ac1bSKiyoung Kim // WAKE_ALARM allows a process to trigger something that can wake the 295*2810ac1bSKiyoung Kim // system up. 296*2810ac1bSKiyoung Kim WAKE_ALARM 297*2810ac1bSKiyoung Kim 298*2810ac1bSKiyoung Kim // BLOCK_SUSPEND allows a process to block system suspends - prevent the 299*2810ac1bSKiyoung Kim // system from entering a lower power state. 300*2810ac1bSKiyoung Kim BLOCK_SUSPEND 301*2810ac1bSKiyoung Kim 302*2810ac1bSKiyoung Kim // AUDIT_READ allows a process to read the audit log via a multicast 303*2810ac1bSKiyoung Kim // netlink socket. 304*2810ac1bSKiyoung Kim AUDIT_READ 305*2810ac1bSKiyoung Kim 306*2810ac1bSKiyoung Kim // PERFMON allows a process to enable observability of privileged 307*2810ac1bSKiyoung Kim // operations related to performance. The mechanisms 308*2810ac1bSKiyoung Kim // include perf_events, i915_perf and other kernel 309*2810ac1bSKiyoung Kim // subsystems. 310*2810ac1bSKiyoung Kim PERFMON 311*2810ac1bSKiyoung Kim 312*2810ac1bSKiyoung Kim // BPF allows a process to manipulate aspects of the kernel 313*2810ac1bSKiyoung Kim // enhanced Berkeley Packet Filter (BPF) system. This is 314*2810ac1bSKiyoung Kim // an execution subsystem of the kernel, that manages BPF 315*2810ac1bSKiyoung Kim // programs. cap.BPF permits a process to: 316*2810ac1bSKiyoung Kim // - create all types of BPF maps 317*2810ac1bSKiyoung Kim // - advanced verifier features: 318*2810ac1bSKiyoung Kim // - indirect variable access 319*2810ac1bSKiyoung Kim // - bounded loops 320*2810ac1bSKiyoung Kim // - BPF to BPF function calls 321*2810ac1bSKiyoung Kim // - scalar precision tracking 322*2810ac1bSKiyoung Kim // - larger complexity limits 323*2810ac1bSKiyoung Kim // - dead code elimination 324*2810ac1bSKiyoung Kim // - potentially other features 325*2810ac1bSKiyoung Kim // 326*2810ac1bSKiyoung Kim // Other capabilities can be used together with cap.BFP to 327*2810ac1bSKiyoung Kim // further manipulate the BPF system: 328*2810ac1bSKiyoung Kim // - cap.PERFMON relaxes the verifier checks as follows: 329*2810ac1bSKiyoung Kim // - BPF programs can use pointer-to-integer 330*2810ac1bSKiyoung Kim // conversions 331*2810ac1bSKiyoung Kim // - speculation attack hardening measures can be 332*2810ac1bSKiyoung Kim // bypassed 333*2810ac1bSKiyoung Kim // - bpf_probe_read to read arbitrary kernel memory is 334*2810ac1bSKiyoung Kim // permitted 335*2810ac1bSKiyoung Kim // - bpf_trace_printk to print the content of kernel 336*2810ac1bSKiyoung Kim // memory 337*2810ac1bSKiyoung Kim // - cap.SYS_ADMIN permits the following: 338*2810ac1bSKiyoung Kim // - use of bpf_probe_write_user 339*2810ac1bSKiyoung Kim // - iteration over the system-wide loaded programs, 340*2810ac1bSKiyoung Kim // maps, links BTFs and convert their IDs to file 341*2810ac1bSKiyoung Kim // descriptors. 342*2810ac1bSKiyoung Kim // - cap.PERFMON is required to load tracing programs. 343*2810ac1bSKiyoung Kim // - cap.NET_ADMIN is required to load networking 344*2810ac1bSKiyoung Kim // programs. 345*2810ac1bSKiyoung Kim BPF 346*2810ac1bSKiyoung Kim 347*2810ac1bSKiyoung Kim // CHECKPOINT_RESTORE allows a process to perform checkpoint 348*2810ac1bSKiyoung Kim // and restore operations. Also permits 349*2810ac1bSKiyoung Kim // explicit PID control via clone3() and 350*2810ac1bSKiyoung Kim // also writing to ns_last_pid. 351*2810ac1bSKiyoung Kim CHECKPOINT_RESTORE 352*2810ac1bSKiyoung Kim) 353*2810ac1bSKiyoung Kim 354*2810ac1bSKiyoung Kimvar names = map[Value]string{ 355*2810ac1bSKiyoung Kim CHOWN: "cap_chown", 356*2810ac1bSKiyoung Kim DAC_OVERRIDE: "cap_dac_override", 357*2810ac1bSKiyoung Kim DAC_READ_SEARCH: "cap_dac_read_search", 358*2810ac1bSKiyoung Kim FOWNER: "cap_fowner", 359*2810ac1bSKiyoung Kim FSETID: "cap_fsetid", 360*2810ac1bSKiyoung Kim KILL: "cap_kill", 361*2810ac1bSKiyoung Kim SETGID: "cap_setgid", 362*2810ac1bSKiyoung Kim SETUID: "cap_setuid", 363*2810ac1bSKiyoung Kim SETPCAP: "cap_setpcap", 364*2810ac1bSKiyoung Kim LINUX_IMMUTABLE: "cap_linux_immutable", 365*2810ac1bSKiyoung Kim NET_BIND_SERVICE: "cap_net_bind_service", 366*2810ac1bSKiyoung Kim NET_BROADCAST: "cap_net_broadcast", 367*2810ac1bSKiyoung Kim NET_ADMIN: "cap_net_admin", 368*2810ac1bSKiyoung Kim NET_RAW: "cap_net_raw", 369*2810ac1bSKiyoung Kim IPC_LOCK: "cap_ipc_lock", 370*2810ac1bSKiyoung Kim IPC_OWNER: "cap_ipc_owner", 371*2810ac1bSKiyoung Kim SYS_MODULE: "cap_sys_module", 372*2810ac1bSKiyoung Kim SYS_RAWIO: "cap_sys_rawio", 373*2810ac1bSKiyoung Kim SYS_CHROOT: "cap_sys_chroot", 374*2810ac1bSKiyoung Kim SYS_PTRACE: "cap_sys_ptrace", 375*2810ac1bSKiyoung Kim SYS_PACCT: "cap_sys_pacct", 376*2810ac1bSKiyoung Kim SYS_ADMIN: "cap_sys_admin", 377*2810ac1bSKiyoung Kim SYS_BOOT: "cap_sys_boot", 378*2810ac1bSKiyoung Kim SYS_NICE: "cap_sys_nice", 379*2810ac1bSKiyoung Kim SYS_RESOURCE: "cap_sys_resource", 380*2810ac1bSKiyoung Kim SYS_TIME: "cap_sys_time", 381*2810ac1bSKiyoung Kim SYS_TTY_CONFIG: "cap_sys_tty_config", 382*2810ac1bSKiyoung Kim MKNOD: "cap_mknod", 383*2810ac1bSKiyoung Kim LEASE: "cap_lease", 384*2810ac1bSKiyoung Kim AUDIT_WRITE: "cap_audit_write", 385*2810ac1bSKiyoung Kim AUDIT_CONTROL: "cap_audit_control", 386*2810ac1bSKiyoung Kim SETFCAP: "cap_setfcap", 387*2810ac1bSKiyoung Kim MAC_OVERRIDE: "cap_mac_override", 388*2810ac1bSKiyoung Kim MAC_ADMIN: "cap_mac_admin", 389*2810ac1bSKiyoung Kim SYSLOG: "cap_syslog", 390*2810ac1bSKiyoung Kim WAKE_ALARM: "cap_wake_alarm", 391*2810ac1bSKiyoung Kim BLOCK_SUSPEND: "cap_block_suspend", 392*2810ac1bSKiyoung Kim AUDIT_READ: "cap_audit_read", 393*2810ac1bSKiyoung Kim PERFMON: "cap_perfmon", 394*2810ac1bSKiyoung Kim BPF: "cap_bpf", 395*2810ac1bSKiyoung Kim CHECKPOINT_RESTORE: "cap_checkpoint_restore", 396*2810ac1bSKiyoung Kim} 397*2810ac1bSKiyoung Kim 398*2810ac1bSKiyoung Kimvar bits = map[string]Value{ 399*2810ac1bSKiyoung Kim "cap_chown": CHOWN, 400*2810ac1bSKiyoung Kim "cap_dac_override": DAC_OVERRIDE, 401*2810ac1bSKiyoung Kim "cap_dac_read_search": DAC_READ_SEARCH, 402*2810ac1bSKiyoung Kim "cap_fowner": FOWNER, 403*2810ac1bSKiyoung Kim "cap_fsetid": FSETID, 404*2810ac1bSKiyoung Kim "cap_kill": KILL, 405*2810ac1bSKiyoung Kim "cap_setgid": SETGID, 406*2810ac1bSKiyoung Kim "cap_setuid": SETUID, 407*2810ac1bSKiyoung Kim "cap_setpcap": SETPCAP, 408*2810ac1bSKiyoung Kim "cap_linux_immutable": LINUX_IMMUTABLE, 409*2810ac1bSKiyoung Kim "cap_net_bind_service": NET_BIND_SERVICE, 410*2810ac1bSKiyoung Kim "cap_net_broadcast": NET_BROADCAST, 411*2810ac1bSKiyoung Kim "cap_net_admin": NET_ADMIN, 412*2810ac1bSKiyoung Kim "cap_net_raw": NET_RAW, 413*2810ac1bSKiyoung Kim "cap_ipc_lock": IPC_LOCK, 414*2810ac1bSKiyoung Kim "cap_ipc_owner": IPC_OWNER, 415*2810ac1bSKiyoung Kim "cap_sys_module": SYS_MODULE, 416*2810ac1bSKiyoung Kim "cap_sys_rawio": SYS_RAWIO, 417*2810ac1bSKiyoung Kim "cap_sys_chroot": SYS_CHROOT, 418*2810ac1bSKiyoung Kim "cap_sys_ptrace": SYS_PTRACE, 419*2810ac1bSKiyoung Kim "cap_sys_pacct": SYS_PACCT, 420*2810ac1bSKiyoung Kim "cap_sys_admin": SYS_ADMIN, 421*2810ac1bSKiyoung Kim "cap_sys_boot": SYS_BOOT, 422*2810ac1bSKiyoung Kim "cap_sys_nice": SYS_NICE, 423*2810ac1bSKiyoung Kim "cap_sys_resource": SYS_RESOURCE, 424*2810ac1bSKiyoung Kim "cap_sys_time": SYS_TIME, 425*2810ac1bSKiyoung Kim "cap_sys_tty_config": SYS_TTY_CONFIG, 426*2810ac1bSKiyoung Kim "cap_mknod": MKNOD, 427*2810ac1bSKiyoung Kim "cap_lease": LEASE, 428*2810ac1bSKiyoung Kim "cap_audit_write": AUDIT_WRITE, 429*2810ac1bSKiyoung Kim "cap_audit_control": AUDIT_CONTROL, 430*2810ac1bSKiyoung Kim "cap_setfcap": SETFCAP, 431*2810ac1bSKiyoung Kim "cap_mac_override": MAC_OVERRIDE, 432*2810ac1bSKiyoung Kim "cap_mac_admin": MAC_ADMIN, 433*2810ac1bSKiyoung Kim "cap_syslog": SYSLOG, 434*2810ac1bSKiyoung Kim "cap_wake_alarm": WAKE_ALARM, 435*2810ac1bSKiyoung Kim "cap_block_suspend": BLOCK_SUSPEND, 436*2810ac1bSKiyoung Kim "cap_audit_read": AUDIT_READ, 437*2810ac1bSKiyoung Kim "cap_perfmon": PERFMON, 438*2810ac1bSKiyoung Kim "cap_bpf": BPF, 439*2810ac1bSKiyoung Kim "cap_checkpoint_restore": CHECKPOINT_RESTORE, 440*2810ac1bSKiyoung Kim} 441