Skip to content

Commit

Permalink
use umask 022 by default so rootfs have correct permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
poscat0x04 committed Nov 3, 2024
1 parent 8e6d81a commit d0f097f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ use console::{style, user_attended};
use dotenvy::dotenv;
use std::process;
use std::{path::Path, process::Command};
use libc;

use crate::actions::BuildSettings;
use crate::common::*;
Expand Down Expand Up @@ -99,6 +100,9 @@ fn update_tree(path: &Path, branch: Option<&String>, rebase_from: Option<&String
}

fn main() -> Result<()> {
// set umask to 022 to ensure correct permissions on rootfs
libc::umask(libc::S_IWGRP | libc:: S_IWOTH);

Check failure on line 104 in src/main.rs

View workflow job for this annotation

GitHub Actions / build

call to unsafe function `libc::umask` is unsafe and requires unsafe function or block

// source .env file, ignore errors
dotenv().ok();

Expand Down

0 comments on commit d0f097f

Please sign in to comment.