twtiger / gosecco

Go seccomp parser and compiler
GNU Lesser General Public License v3.0
53 stars 7 forks source link

How do we use non-file policy input? #50

Open dma opened 8 years ago

dma commented 8 years ago

Hey gosecco devs,

re: https://github.com/twtiger/gosecco/blob/master/seccomp.go#L47

parser.CombinedSources doesn't exist, how do we supply a string as the policy source and then load the compiled filter?

BTW gosecco is now in Oz master. Should be delivered to SGOS users soon.

Thanks!

olabini commented 8 years ago

Hey Sorry, small typo in the docs. I pushed an update. You can use the function parser.CombineSources to generate a parser.CombinedSource.

You can use it like this: gosecco.PrepareSource(parser.CombineSources(parser.FileSource("file1"), parser.FileSource("file2")), gosecco.SeccompSettings{})

Hope that helps.

And about the news, that's great, that's very exiting!