Skip to content

remove workaround, which fix wrong file flags #704

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

Merged
merged 1 commit into from
Apr 10, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 0 additions & 17 deletions src/fd/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -164,23 +164,6 @@ fn uhyve_send<T>(port: u16, data: &mut T) {
}

fn open_flags_to_perm(flags: i32, mode: u32) -> FilePerms {
// mode is passed in as hex (0x777). Linux/Fuse expects octal (0o777).
// just passing mode as is to FUSE create, leads to very weird permissions: 0b0111_0111_0111 -> 'r-x rwS rwt'
// TODO: change in stdlib
#[cfg(not(feature = "newlib"))]
let mode = match mode {
0x777 => 0o777,
0o777 => 0o777,
0 => 0,
_ => {
info!(
"Mode {:#X} should never happen with current hermit stdlib! Using 0o777",
mode
);
0o777
}
};

let mut perms = FilePerms {
raw: flags as u32,
mode,
Expand Down