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

Update seccomp program #536

Closed
wants to merge 14 commits into from
Closed

Conversation

sat0ken
Copy link

@sat0ken sat0ken commented Sep 2, 2024

以下のissueを進めるため、Seccompのサンプルプログラムを改造しました

youki-dev#2724

Copy link
Owner

@utam0k utam0k left a comment

Choose a reason for hiding this comment

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

LGTM w/ nits

Comment on lines 206 to 217
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,
}
}

Copy link
Owner

Choose a reason for hiding this comment

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

今後もアーキテクチャが増えることは容易に想像つくので match にしておきますか。

Copy link
Author

@sat0ken sat0ken Oct 2, 2024

Choose a reason for hiding this comment

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

対応遅くなってすみません、以下で修正しました m( - - )m

efcaef1

}
}

pub fn to_instruction(arch: &Arch, action: u32, rule: &Rule) -> Vec<Instruction> {
Copy link
Owner

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 {
Copy link
Owner

Choose a reason for hiding this comment

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

もし可能だったら別PRでもいいですし、他の方でもいいんですが unit テスト足したいですね。

Copy link
Author

@sat0ken sat0ken Oct 2, 2024

Choose a reason for hiding this comment

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

unit テストの書き方がまだわからないので、別PRで対応致しますm(- -)m

@utam0k
Copy link
Owner

utam0k commented Sep 23, 2024

cargo clippy をかけておくくらいをついでに直してもらえるとはっぴーです!

@sat0ken
Copy link
Author

sat0ken commented Oct 2, 2024

以下で cargo clipy で怒られたところを修正しておきました

efcaef1

Gekko0114 and others added 13 commits October 5, 2024 00:30
* 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]>
@utam0k
Copy link
Owner

utam0k commented Oct 7, 2024

@sat0ken Unfortunately, there are a lot of conflicts with the main branch. May I ask you to solve it?

@utam0k
Copy link
Owner

utam0k commented Oct 7, 2024

あ、ここは youki 向きじゃなかったですね。 Close します。

@utam0k utam0k closed this Oct 7, 2024
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.

3 participants