Skip to content

Commit f9a8a9e

Browse files
committed
runtime-tools: emit audit events for OCI Spec mutation.
Add an option for setting an external audit event logger and use any configured logger to emit audit events as we adjust the OCI Spec. Signed-off-by: Krisztian Litkey <krisztian.litkey@intel.com>
1 parent 94fcca3 commit f9a8a9e

5 files changed

Lines changed: 772 additions & 121 deletions

File tree

pkg/api/owners.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ func (o *OwningPlugins) ClaimHooks(id, plugin string) error {
4949
}
5050

5151
func (o *OwningPlugins) HooksOwner(id string) (string, bool) {
52-
return o.ownersFor(id).simpleOwner(Field_OciHooks.Key())
52+
return o.ownersFor(id).SimpleOwner(Field_OciHooks.Key())
5353
}
5454

5555
func (o *OwningPlugins) ClearHooks(id, plugin string) {
@@ -148,7 +148,7 @@ func (f *FieldOwners) ClaimHooks(plugin string) error {
148148
}
149149

150150
func (f *FieldOwners) HooksOwner() (string, bool) {
151-
return f.simpleOwner(Field_OciHooks.Key())
151+
return f.SimpleOwner(Field_OciHooks.Key())
152152
}
153153

154154
func (f *FieldOwners) ClearHooks(plugin string) {
@@ -175,7 +175,7 @@ func (f *FieldOwners) ClearRdt(plugin string) {
175175
}
176176

177177
func (f *FieldOwners) accumulateSimple(field int32, plugin string) {
178-
old, ok := f.simpleOwner(field)
178+
old, ok := f.SimpleOwner(field)
179179
if ok {
180180
plugin = old + "," + plugin
181181
}
@@ -200,7 +200,7 @@ func (f *FieldOwners) compoundOwnerMap(field int32) (map[string]string, bool) {
200200
return m.Owners, true
201201
}
202202

203-
func (f *FieldOwners) compoundOwner(field int32, key string) (string, bool) {
203+
func (f *FieldOwners) CompoundOwner(field int32, key string) (string, bool) {
204204
if f == nil {
205205
return "", false
206206
}
@@ -214,7 +214,7 @@ func (f *FieldOwners) compoundOwner(field int32, key string) (string, bool) {
214214
return plugin, ok
215215
}
216216

217-
func (f *FieldOwners) simpleOwner(field int32) (string, bool) {
217+
func (f *FieldOwners) SimpleOwner(field int32) (string, bool) {
218218
if f == nil {
219219
return "", false
220220
}

0 commit comments

Comments
 (0)