Skip to content
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

Open
wants to merge 1 commit into
base: release/v0.3.x
Choose a base branch
from

Conversation

ManaSugi
Copy link
Member

Fixes: #147

Fixes: libseccomp-rs#147

Signed-off-by: Mayank Mrinal <mayank.mrinal@sony.com>
@ManaSugi ManaSugi added this to the 0.3.1 milestone Feb 29, 2024
@ManaSugi ManaSugi changed the title Add examples for userspace notification release/v0.3.x:cherry-pick:Add examples for userspace notification Feb 29, 2024
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.05%. Comparing base (3339be9) to head (1c6c789).

❗ 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.
📢 Have feedback on the report? Share it here.

Copy link
Member

@rusty-snake rusty-snake left a 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)?;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/// 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)?;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/// 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)?;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/// 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)?;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/// let mut ctx = ScmpFilterContext::new(ScmpAction::Allow)?;
/// let mut ctx = ScmpFilterContext::new_filter(ScmpAction::Allow)?;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants