Skip to content

Commit

Permalink
deps: update nix and other dependencies
Browse files Browse the repository at this point in the history
`fork` is now marked as unsafe (nix-rust/nix#1030)
  • Loading branch information
alebastr authored and kennylevinsen committed Jan 18, 2021
1 parent eef821c commit e5a5982
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions agreety/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ repository = "https://git.sr.ht/~kennylevinsen/greetd/"
[dependencies]
greetd_ipc = { path = "../greetd_ipc", features = ["sync-codec"]}
inish = { path = "../inish"}
rpassword = "4.0"
rpassword = "5.0"
getopts = "0.2"
enquote = "1.0.3"
nix = "0.17"
nix = "0.19"
4 changes: 2 additions & 2 deletions greetd/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ repository = "https://git.sr.ht/~kennylevinsen/greetd/"
debug = []

[dependencies]
nix = "0.17"
nix = "0.19"
pam-sys = "0.5.6"
users = "0.9.1"
users = "0.11.0"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
greetd_ipc = { path = "../greetd_ipc", features = ["tokio-codec"] }
Expand Down
2 changes: 1 addition & 1 deletion greetd/src/session/interface.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ impl Session {
let cur_exe = std::env::current_exe()?;
let bin = CString::new(cur_exe.to_str().expect("unable to get current exe name"))?;

let child = match fork().map_err(|e| format!("unable to fork: {}", e))? {
let child = match unsafe { fork() }.map_err(|e| format!("unable to fork: {}", e))? {
ForkResult::Parent { child, .. } => child,
ForkResult::Child => {
execv(
Expand Down
2 changes: 1 addition & 1 deletion greetd/src/session/worker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ fn worker(sock: &UnixDatagram) -> Result<(), Error> {
// PAM is weird and gets upset if you exec from the process that opened
// the session, registering it automatically as a log-out. Thus, we must
// exec in a new child.
let child = match fork().map_err(|e| format!("unable to fork: {}", e))? {
let child = match unsafe { fork() }.map_err(|e| format!("unable to fork: {}", e))? {
ForkResult::Parent { child, .. } => child,
ForkResult::Child => {
// It is important that we do *not* return from here by
Expand Down

0 comments on commit e5a5982

Please sign in to comment.