-
Notifications
You must be signed in to change notification settings - Fork 0
/
consts_linux.go
64 lines (55 loc) · 1.56 KB
/
consts_linux.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
//go:build linux
package gocapng
// Type of acts that are supported
const (
// Drop the capabilities settings
ActDrop Act = iota
// Add the capabilities settings
ActAdd
)
// Operation types that can be performed (including bitwise)
const (
TypeEffective Type = 1
TypePermitted Type = 2
TypeInheritable Type = 4
TypeBoundingSet Type = 8
TypeAmbient Type = 16
)
// type of selects
const (
SelectCaps Select = 16
SelectBounds Select = 32
SelectBoth Select = 48
SelectAmbient Select = 64
SelectAll Select = 112
)
// Result status
const (
ResultFail Result = iota - 1
ResultNone
ResultPartial
ResultFull
)
// Print types
const (
PrintStdOut Print = iota
PrintBuffer
)
// Supported flags
const (
// Simply change uid and retain specified capabilities and that's all.
FlagsNoFlag Flags = 0
// After changing id, remove any supplement groups that may still be in effect from the old uid.
FlagsDropSuppGrp Flags = 1
// Clear the bounding set regardless to the internal representation already setup prior to changing the uid/gid.
FlagsClearBounding Flags = 2
// After changing id, initialize any supplement groups that may come with the new account.
// If given with CAPNG_DROP_SUPP_GRP it will have no effect.
FlagsInitSuppGrp Flags = 4
// Clear ambient capabilities regardless of the internal representation already setup prior to changing the uid/gid.
FlagsClearAmbient Flags = 8
)
// UnsetRootID for namespace root id
const UnsetRootID int = -1
// SupportsAmbient to support new (libcap-ng) cap and not libcap
const SupportsAmbient int = 1