MCPcopy Create free account
hub / github.com/apache/mesos / parseDefaultAction

Function parseDefaultAction

src/linux/seccomp/seccomp_parser.cpp:80–99  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

78
79
80Try<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
102Try<Nothing> parseArchMap(

Callers 1

parseProfileDataFunction · 0.85

Calls 7

parseSyscallActionFunction · 0.85
NothingClass · 0.85
errorMethod · 0.65
ErrorFunction · 0.50
isSomeMethod · 0.45
isErrorMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected