| 78 | |
| 79 | |
| 80 | Try<Nothing> parseDefaultAction( |
| 81 | const JSON::Object& json, |
| 82 | ContainerSeccompProfile* profile) |
| 83 | { |
| 84 | Result<JSON::String> defaultAction = json.at<JSON::String>("defaultAction"); |
| 85 | if (!defaultAction.isSome()) { |
| 86 | return Error( |
| 87 | "Cannot determine 'defaultAction' for the Seccomp configuration: " + |
| 88 | (defaultAction.isError() ? defaultAction.error() : "Not found")); |
| 89 | } |
| 90 | |
| 91 | const auto defaultActionValue = parseSyscallAction(defaultAction->value); |
| 92 | if (defaultActionValue.isError()) { |
| 93 | return Error(defaultActionValue.error()); |
| 94 | } |
| 95 | |
| 96 | profile->set_default_action(defaultActionValue.get()); |
| 97 | |
| 98 | return Nothing(); |
| 99 | } |
| 100 | |
| 101 | |
| 102 | Try<Nothing> parseArchMap( |
no test coverage detected