|
@@ -24,32 +24,32 @@ func TestLoadProfile(t *testing.T) {
|
|
}
|
|
}
|
|
var expectedErrno uint = 12345
|
|
var expectedErrno uint = 12345
|
|
expected := specs.LinuxSeccomp{
|
|
expected := specs.LinuxSeccomp{
|
|
- DefaultAction: "SCMP_ACT_ERRNO",
|
|
|
|
|
|
+ DefaultAction: specs.ActErrno,
|
|
Syscalls: []specs.LinuxSyscall{
|
|
Syscalls: []specs.LinuxSyscall{
|
|
{
|
|
{
|
|
Names: []string{"clone"},
|
|
Names: []string{"clone"},
|
|
- Action: "SCMP_ACT_ALLOW",
|
|
|
|
|
|
+ Action: specs.ActAllow,
|
|
Args: []specs.LinuxSeccompArg{{
|
|
Args: []specs.LinuxSeccompArg{{
|
|
Index: 0,
|
|
Index: 0,
|
|
Value: 2114060288,
|
|
Value: 2114060288,
|
|
ValueTwo: 0,
|
|
ValueTwo: 0,
|
|
- Op: "SCMP_CMP_MASKED_EQ",
|
|
|
|
|
|
+ Op: specs.OpMaskedEqual,
|
|
}},
|
|
}},
|
|
},
|
|
},
|
|
{
|
|
{
|
|
|
|
|
|
Names: []string{"open"},
|
|
Names: []string{"open"},
|
|
- Action: "SCMP_ACT_ALLOW",
|
|
|
|
|
|
+ Action: specs.ActAllow,
|
|
Args: []specs.LinuxSeccompArg{},
|
|
Args: []specs.LinuxSeccompArg{},
|
|
},
|
|
},
|
|
{
|
|
{
|
|
Names: []string{"close"},
|
|
Names: []string{"close"},
|
|
- Action: "SCMP_ACT_ALLOW",
|
|
|
|
|
|
+ Action: specs.ActAllow,
|
|
Args: []specs.LinuxSeccompArg{},
|
|
Args: []specs.LinuxSeccompArg{},
|
|
},
|
|
},
|
|
{
|
|
{
|
|
Names: []string{"syslog"},
|
|
Names: []string{"syslog"},
|
|
- Action: "SCMP_ACT_ERRNO",
|
|
|
|
|
|
+ Action: specs.ActErrno,
|
|
ErrnoRet: &expectedErrno,
|
|
ErrnoRet: &expectedErrno,
|
|
Args: []specs.LinuxSeccompArg{},
|
|
Args: []specs.LinuxSeccompArg{},
|
|
},
|
|
},
|
|
@@ -72,7 +72,7 @@ func TestLoadProfileWithDefaultErrnoRet(t *testing.T) {
|
|
|
|
|
|
expectedErrnoRet := uint(6)
|
|
expectedErrnoRet := uint(6)
|
|
expected := specs.LinuxSeccomp{
|
|
expected := specs.LinuxSeccomp{
|
|
- DefaultAction: "SCMP_ACT_ERRNO",
|
|
|
|
|
|
+ DefaultAction: specs.ActErrno,
|
|
DefaultErrnoRet: &expectedErrnoRet,
|
|
DefaultErrnoRet: &expectedErrnoRet,
|
|
}
|
|
}
|
|
|
|
|
|
@@ -92,7 +92,7 @@ func TestLoadProfileWithListenerPath(t *testing.T) {
|
|
}
|
|
}
|
|
|
|
|
|
expected := specs.LinuxSeccomp{
|
|
expected := specs.LinuxSeccomp{
|
|
- DefaultAction: "SCMP_ACT_ERRNO",
|
|
|
|
|
|
+ DefaultAction: specs.ActErrno,
|
|
ListenerPath: "/var/run/seccompaget.sock",
|
|
ListenerPath: "/var/run/seccompaget.sock",
|
|
ListenerMetadata: "opaque-metadata",
|
|
ListenerMetadata: "opaque-metadata",
|
|
}
|
|
}
|