-
Notifications
You must be signed in to change notification settings - Fork 12
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
release/v0.3.x:cherry-pick:Add examples for userspace notification #263
base: release/v0.3.x
Are you sure you want to change the base?
release/v0.3.x:cherry-pick:Add examples for userspace notification #263
Conversation
Fixes: libseccomp-rs#147 Signed-off-by: Mayank Mrinal <mayank.mrinal@sony.com>
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## release/v0.3.x #263 +/- ##
===============================================
Coverage 97.05% 97.05%
===============================================
Files 13 13
Lines 1085 1087 +2
===============================================
+ Hits 1053 1055 +2
Misses 32 32 ☔ View full report in Codecov by Sentry. |
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.
0.3.x
still uses new_filter
.
/// | ||
/// ``` | ||
/// # use libseccomp::*; | ||
/// let mut ctx = ScmpFilterContext::new(ScmpAction::Allow)?; |
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.
/// let mut ctx = ScmpFilterContext::new(ScmpAction::Allow)?; | |
/// let mut ctx = ScmpFilterContext::new_filter(ScmpAction::Allow)?; |
/// # use std::process::exit; | ||
/// // Get the current process ID | ||
/// let parent_pid = std::process::id(); | ||
/// let mut ctx = ScmpFilterContext::new(ScmpAction::Allow)?; |
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.
/// let mut ctx = ScmpFilterContext::new(ScmpAction::Allow)?; | |
/// let mut ctx = ScmpFilterContext::new_filter(ScmpAction::Allow)?; |
/// # use std::process::exit; | ||
/// // Get the current process ID | ||
/// let parent_pid = std::process::id(); | ||
/// let mut ctx = ScmpFilterContext::new(ScmpAction::Allow)?; |
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.
/// let mut ctx = ScmpFilterContext::new(ScmpAction::Allow)?; | |
/// let mut ctx = ScmpFilterContext::new_filter(ScmpAction::Allow)?; |
/// # use libseccomp::*; | ||
/// # use std::{fs::File, io::Read, process::Command, thread}; | ||
/// let notify_fd = thread::spawn(|| -> Result<ScmpFd, error::SeccompError> { | ||
/// let mut ctx = ScmpFilterContext::new(ScmpAction::Allow)?; |
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.
/// let mut ctx = ScmpFilterContext::new(ScmpAction::Allow)?; | |
/// let mut ctx = ScmpFilterContext::new_filter(ScmpAction::Allow)?; |
Fixes: #147