-
Notifications
You must be signed in to change notification settings - Fork 1
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
Update seccomp program #536
Conversation
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.
LGTM w/ nits
experiment/seccomp/src/seccomp.rs
Outdated
if arc == &Arch::X86 { | ||
match syscalls::x86_64::Sysno::from_str(name) { | ||
Ok(syscall) => Some(syscall as u64), | ||
Err(_) => None, | ||
} | ||
} else { | ||
match syscalls::aarch64::Sysno::from_str(name) { | ||
Ok(syscall) => Some(syscall as u64), | ||
Err(_) => None, | ||
} | ||
} | ||
|
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.
今後もアーキテクチャが増えることは容易に想像つくので match にしておきますか。
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.
対応遅くなってすみません、以下で修正しました m( - - )m
} | ||
} | ||
|
||
pub fn to_instruction(arch: &Arch, action: u32, rule: &Rule) -> Vec<Instruction> { |
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.
+1 Fromを提案しておいてなんですが、無理せずこれでも十分使いやすいインタフェースだと思います。ありがとうございます。
pub is_notify: bool | ||
} | ||
|
||
impl Rule { |
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.
もし可能だったら別PRでもいいですし、他の方でもいいんですが unit テスト足したいですね。
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.
unit テストの書き方がまだわからないので、別PRで対応致しますm(- -)m
|
以下で cargo clipy で怒られたところを修正しておきました |
af3c009
to
a2c7dc8
Compare
* added selinux functions Signed-off-by: Hiroyuki Moriya <[email protected]> * not use arc Signed-off-by: Hiroyuki Moriya <[email protected]> * follow reviewer comment Signed-off-by: Hiroyuki Moriya <[email protected]> * divided selinux impl into two files Signed-off-by: Hiroyuki Moriya <[email protected]> * fix Signed-off-by: Hiroyuki Moriya <[email protected]> * fix Signed-off-by: Hiroyuki Moriya <[email protected]> * fix Signed-off-by: Hiroyuki Moriya <[email protected]> * use SELinuxLabel struct Signed-off-by: Hiroyuki Moriya <[email protected]> * use pointer instead of clone Signed-off-by: Hiroyuki Moriya <[email protected]> * not loop Signed-off-by: Hiroyuki Moriya <[email protected]> * add main.rs Signed-off-by: Hiroyuki Moriya <[email protected]> --------- Signed-off-by: Hiroyuki Moriya <[email protected]>
Bumps the patch group with 3 updates: [serde](https://github.com/serde-rs/serde), [libc](https://github.com/rust-lang/libc) and [serde_json](https://github.com/serde-rs/json). Updates `serde` from 1.0.207 to 1.0.208 - [Release notes](https://github.com/serde-rs/serde/releases) - [Commits](serde-rs/serde@v1.0.207...v1.0.208) Updates `libc` from 0.2.155 to 0.2.156 - [Release notes](https://github.com/rust-lang/libc/releases) - [Changelog](https://github.com/rust-lang/libc/blob/0.2.156/CHANGELOG.md) - [Commits](rust-lang/libc@0.2.155...0.2.156) Updates `serde_json` from 1.0.124 to 1.0.125 - [Release notes](https://github.com/serde-rs/json/releases) - [Commits](serde-rs/json@v1.0.124...1.0.125) --- updated-dependencies: - dependency-name: serde dependency-type: direct:production update-type: version-update:semver-patch dependency-group: patch - dependency-name: libc dependency-type: direct:production update-type: version-update:semver-patch dependency-group: patch - dependency-name: serde_json dependency-type: direct:production update-type: version-update:semver-patch dependency-group: patch ... Signed-off-by: dependabot[bot] <[email protected]>
Signed-off-by: sat0ken <[email protected]>
Signed-off-by: sat0ken <[email protected]>
Signed-off-by: sat0ken <[email protected]>
Signed-off-by: sat0ken <[email protected]>
Signed-off-by: sat0ken <[email protected]>
…ch64 Signed-off-by: sat0ken <[email protected]>
Signed-off-by: sat0ken <[email protected]>
Signed-off-by: sat0ken <[email protected]>
Signed-off-by: sat0ken <[email protected]>
Signed-off-by: sat0ken <[email protected]>
Signed-off-by: sat0ken <[email protected]>
a2c7dc8
to
a7a842b
Compare
Signed-off-by: sat0ken <[email protected]>
a7a842b
to
43bcdfa
Compare
@sat0ken Unfortunately, there are a lot of conflicts with the main branch. May I ask you to solve it? |
あ、ここは youki 向きじゃなかったですね。 Close します。 |
以下のissueを進めるため、Seccompのサンプルプログラムを改造しました
youki-dev#2724