-
Notifications
You must be signed in to change notification settings - Fork 567
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add seccomp errno filter support #66
Conversation
@@ -157,6 +161,11 @@ void filter_debug(void) { | |||
printf(" BLACKLIST %d %s\n", *nr, syscall_find_nr(*nr)); | |||
i += 2; | |||
} | |||
else if (*ptr == 0x15 && *(ptr +14) == 0x5 && *(ptr + 15) == 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe this function could be rewritten using sock_filter struct pointer instead hmm would also take care of the endian stuff
For some context, i myself use this to workaround buggy virtualbox shared filesystem that has broken sendfile support, the application will fallback to userland buffered IO if it gets ENOTSUP. |
Looks fine, I'll merge it over the weekend. Thanks! |
Ok. Please run the tests to make sure it didn't break anything. Any pointers how to run the tests? i installed expect and messed around but did not really work hmm |
I go in test directory and run:
Take a look at configure script first, it creates a number of bridge devices. To get rid of them I usually reboot my computer after the test. I start the test as "./test.sh | grep TESTING" |
Add seccomp errno filter support
Some shell scripts are not executable, so fix their file modes: $ git grep -Elz '^#!/bin/(ba)?sh' | xargs -0 -I '{}' \ chmod +x '{}' Note: I have manually checked that the files changed are indeed intended to be executable directly and not just sourced, as a script of the latter kind could also contain a shebang (for example, to help ensure proper syntax highlighting). The affected scripts were added on commit 081d1fb ("Add seccomp errno filter support", 2015-09-23) / PR netblue30#66 and on commit e46dd3e ("git-install", 2017-02-04).
Some shell scripts are not executable, so fix their file modes: $ git grep -Elz '^#!/bin/(ba)?sh' | xargs -0 -I '{}' \ chmod +x '{}' Files changed: * src/fgit/fgit-uninstall.sh * src/tools/extract_errnos.sh Note: I have manually checked that the files above are indeed intended to be executable directly and not just sourced, as a script of the latter kind could also contain a shebang (for example, to help ensure proper syntax highlighting). Misc: The affected files were added on commit e46dd3e ("git-install", 2017-02-04) and on commit 081d1fb ("Add seccomp errno filter support", 2015-09-23) / PR netblue30#66, respectively.
Some shell scripts are not executable, so fix their file modes: $ git grep -Elz '^#!/bin/(ba)?sh' | xargs -0 -I '{}' \ chmod +x '{}' Files changed: * src/fgit/fgit-uninstall.sh * src/tools/extract_errnos.sh Note: I have manually checked that the files above are indeed intended to be executable directly and not just sourced, as a script of the latter kind could also contain a shebang (for example, to help ensure proper syntax highlighting). Misc: The affected files were added on commit e46dd3e ("git-install", 2017-02-04) and on commit 081d1fb ("Add seccomp errno filter support", 2015-09-23) / PR netblue30#66, respectively.
No tests yet. Tried to get the existing tests running without much success :(
Would users like to mix errno and black/white -lists? i currently only need errno filter and default allow.
Tried to keep same code style, hope it is ok.