gaol
gaol copied to clipboard
Allow openat, subject to the same restrictions as open.
glibc 2.26 switches from using open(2) to openat(2). And now everyone on earth with a seccomp filter gets to update it :)
error[E0425]: cannot find value `O_DIRECTORY` in this scope
--> platform/linux/seccomp.rs:272:55
|
272 | filter.if_arg2_hasnt_set(!(O_RDONLY | O_DIRECTORY | O_CLOEXEC | O_NOCTTY | O_NONBLOCK | O_NOFOLLOW) as u32,
| ^^^^^^^^^^^ not found in this scope
|
help: possible candidate is found in another module, you can import it into scope
|
19 | use libc::O_DIRECTORY;
|
error[E0425]: cannot find value `O_NOFOLLOW` in this scope
--> platform/linux/seccomp.rs:272:105
|
272 | filter.if_arg2_hasnt_set(!(O_RDONLY | O_DIRECTORY | O_CLOEXEC | O_NOCTTY | O_NONBLOCK | O_NOFOLLOW) as u32,
| ^^^^^^^^^^ not found in this scope
|
help: possible candidate is found in another module, you can import it into scope
|
19 | use libc::O_NOFOLLOW;
|
warning: unused `#[macro_use]` import
--> lib.rs:11:1
|
11 | #[macro_use]
| ^^^^^^^^^^^^
|
= note: #[warn(unused_imports)] on by default
error[E0308]: mismatched types
--> platform/linux/seccomp.rs:271:34
|
271 | filter.if_syscall_is(libc::SYS_openat, |filter| {
| ^^^^^^^^^^^^^^^^ expected u32, found i64
|
= help: here are some functions which might fulfill your needs:
- .count_ones()
- .count_zeros()
- .leading_zeros()
- .trailing_zeros()
error[E0599]: no method named `if_arg2_hasnt_set` found for type `&mut platform::linux::seccomp::Filter` in the current scope
--> platform/linux/seccomp.rs:272:24
|
272 | filter.if_arg2_hasnt_set(!(O_RDONLY | O_DIRECTORY | O_CLOEXEC | O_NOCTTY | O_NONBLOCK | O_NOFOLLOW) as u32,
| ^^^^^^^^^^^^^^^^^
error: aborting due to 4 previous errors
error: Could not compile `gaol`.