sudoBash418 93b98639dd make-initrd-ng: Restore stripped file permissions
Previously, all initrd ELFs would be made *world-writable*.

This commit sets the write bit for the file owner exclusively, and
removes it when done. It also sets the umask so that files don't
implicitly become writable for other users by mistake.

Fixes: https://github.com/NixOS/nixpkgs/security/advisories/GHSA-m7pq-h9p4-8rr4
Reported-By: sudoBash418 <sudobash418@gmail.com>
2025-04-13 12:02:16 -04:00

15 lines
356 B
TOML

[package]
name = "make-initrd-ng"
version = "0.1.0"
authors = ["Will Fancher <elvishjerricco@gmail.com>"]
edition = "2018"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
eyre = "0.6.8"
goblin = "0.5.0"
libc = "0.2.171"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"