diff --git a/src/runtime/virtcontainers/pkg/agent/protocols/grpc/config.json b/src/runtime/virtcontainers/pkg/agent/protocols/grpc/config.json index b027e6346d..1bed44ae49 100644 --- a/src/runtime/virtcontainers/pkg/agent/protocols/grpc/config.json +++ b/src/runtime/virtcontainers/pkg/agent/protocols/grpc/config.json @@ -524,7 +524,8 @@ "write", "writev" ], - "action": "SCMP_ACT_ALLOW" + "action": "SCMP_ACT_ALLOW", + "errnoRet": 1008 }, { "names": [ diff --git a/src/runtime/virtcontainers/pkg/agent/protocols/grpc/utils.go b/src/runtime/virtcontainers/pkg/agent/protocols/grpc/utils.go index bcb5201450..4989587d4a 100644 --- a/src/runtime/virtcontainers/pkg/agent/protocols/grpc/utils.go +++ b/src/runtime/virtcontainers/pkg/agent/protocols/grpc/utils.go @@ -53,6 +53,15 @@ func copyValue(to, from reflect.Value) error { return copySliceValue(to, from) case reflect.Map: return copyMapValue(to, from) + case reflect.Interface: + if to.Type().Name() == "isLinuxSyscall_ErrnoRet" { + dest := LinuxSyscall_Errnoret{Errnoret: uint32(from.Uint())} + var destintf isLinuxSyscall_ErrnoRet = &dest + toVal := reflect.ValueOf(destintf) + to.Set(toVal) + return nil + } + return grpcStatus.Errorf(codes.InvalidArgument, "Can not convert %v to %v, kind= %v", from.Type(), to.Type(), toKind) default: // We now are copying non pointers scalar. // This is the leaf of the recursion. @@ -62,7 +71,7 @@ func copyValue(to, from reflect.Value) error { return nil } - return grpcStatus.Errorf(codes.InvalidArgument, "Can not convert %v to %v", from.Type(), to.Type()) + return grpcStatus.Errorf(codes.InvalidArgument, "Can not convert %v to %v, kind= %v", from.Type(), to.Type(), toKind) } to.Set(from)