diff options
author | 2021-03-05 16:17:35 +0000 | |
---|---|---|
committer | 2021-03-05 08:17:35 -0800 | |
commit | d18cc7df58b9b1dae3bceafb9c0a6a3e1edd68e5 (patch) | |
tree | 93d4efa8009f9156c9bf3d69adbf3efc300d66fb /projects/runc/configs_fuzzer.go | |
parent | ff77b152807e588789630b6cc39a631780be7028 (diff) |
[runc] Initial integration (#5287)
* [teleport] Initial integration
* Minor update to run tests again
* Remove debugging things
* Removed an unfinished file
* Small nit
* Added maintainers
* Update Dockerfile
* Update build.sh
* Update project.yaml
* Updated licenses
Co-authored-by: jonathanmetzman <31354670+jonathanmetzman@users.noreply.github.com>
Diffstat (limited to 'projects/runc/configs_fuzzer.go')
-rw-r--r-- | projects/runc/configs_fuzzer.go | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/projects/runc/configs_fuzzer.go b/projects/runc/configs_fuzzer.go new file mode 100644 index 00000000..d482ba0f --- /dev/null +++ b/projects/runc/configs_fuzzer.go @@ -0,0 +1,35 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +package configs + +import( + "fmt" +) + + +func Fuzz(data []byte) int { + hookNameList := []string {"prestart", + "createRuntime", + "createContainer", + "startContainer", + "poststart"} + + for _, hookName := range hookNameList { + hooks := Hooks{} + _ = hooks.UnmarshalJSON([]byte(fmt.Sprintf(`{"%s" :[%s]}`, hookName, data))) + } + return 1 +} |