Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion docker/Dockerfile.alpine
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# No SELinux. Busybox's tools may differ from the upstream shadow-utils.

# Pinned: see the note in Dockerfile.debian.
FROM rust:1.98-alpine3.23
FROM rust:1.99-alpine3.23

RUN apk add --no-cache \
musl-dev \
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile.debian
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

# Pinned: an unpinned tag lands a new toolchain on main with no PR signal,
# and clippy gains lints between releases. Renovate proposes the bump.
FROM rust:1.98-trixie
FROM rust:1.99-trixie

RUN apt-get update && apt-get install -y --no-install-recommends \
libpam0g-dev \
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile.e2e
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

# ── Stage 1: build shadow-rs ────────────────────────────────────────
# Pinned: see the note in Dockerfile.debian.
FROM rust:1.98-trixie AS builder
FROM rust:1.99-trixie AS builder

RUN apt-get update && apt-get install -y --no-install-recommends \
libpam0g-dev \
Expand Down
4 changes: 2 additions & 2 deletions docs/PLATFORM-SUPPORT.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ CI runs the full suite on three images:

| Image | Base | libc | PAM | SELinux |
|---|---|---|---|---|
| `debian` | `rust:1.98-trixie` | glibc | Linux-PAM | headers |
| `alpine` | `rust:1.98-alpine3.23` | musl (dynamic) | Linux-PAM | none |
| `debian` | `rust:1.99-trixie` | glibc | Linux-PAM | headers |
| `alpine` | `rust:1.99-alpine3.23` | musl (dynamic) | Linux-PAM | none |
| `fedora` | `fedora:44` | glibc | Linux-PAM | enforcing |

The base images are pinned. An unpinned tag lands a new toolchain on `main`
Expand Down
4 changes: 2 additions & 2 deletions src/shadow-core/src/group.rs
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ mod tests {
assert_eq!(entry.name, "root");
assert_eq!(entry.passwd, "x");
assert_eq!(entry.gid, 0);
assert!(entry.members.is_empty());
assert!(entry.members.is_empty(), "{:?}", entry.members);
}

#[test]
Expand Down Expand Up @@ -225,7 +225,7 @@ mod tests {
let path = dir.path().join("group");
std::fs::write(&path, "").unwrap();
let entries = read_group_file(&path).unwrap();
assert!(entries.is_empty());
assert!(entries.is_empty(), "{entries:?}");
}

use proptest::prelude::*;
Expand Down
10 changes: 5 additions & 5 deletions src/shadow-core/src/gshadow.rs
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,8 @@ mod tests {
let entry: GshadowEntry = "root:*::".parse().unwrap();
assert_eq!(entry.name, "root");
assert_eq!(entry.passwd, "*");
assert!(entry.admins.is_empty());
assert!(entry.members.is_empty());
assert!(entry.admins.is_empty(), "{:?}", entry.admins);
assert!(entry.members.is_empty(), "{:?}", entry.members);
}

#[test]
Expand All @@ -172,13 +172,13 @@ mod tests {
fn test_parse_admins_only() {
let entry: GshadowEntry = "wheel:!:root:".parse().unwrap();
assert_eq!(entry.admins, vec!["root"]);
assert!(entry.members.is_empty());
assert!(entry.members.is_empty(), "{:?}", entry.members);
}

#[test]
fn test_parse_members_only() {
let entry: GshadowEntry = "docker:!::deploy,ci".parse().unwrap();
assert!(entry.admins.is_empty());
assert!(entry.admins.is_empty(), "{:?}", entry.admins);
assert_eq!(entry.members, vec!["deploy", "ci"]);
}

Expand Down Expand Up @@ -239,7 +239,7 @@ mod tests {
let path = dir.path().join("gshadow");
std::fs::write(&path, "").unwrap();
let entries = read_gshadow_file(&path).unwrap();
assert!(entries.is_empty());
assert!(entries.is_empty(), "{entries:?}");
}

#[test]
Expand Down
2 changes: 1 addition & 1 deletion src/shadow-core/src/os_error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ mod tests {
// Non-empty, and the bare OS text — not Rust's "... (os error 13)"
// rendering (the regression that suffix-stripping prevents). We assert
// the shape, not the exact wording, since libc may localize it.
assert!(!msg.is_empty());
assert!(!msg.is_empty(), "{msg:?}");
assert!(!msg.contains("(os error"), "got: {msg:?}");
}
}
2 changes: 1 addition & 1 deletion src/shadow-core/src/passwd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ mod tests {
let path = dir.path().join("passwd");
std::fs::write(&path, "").unwrap();
let entries = read_passwd_file(&path).unwrap();
assert!(entries.is_empty());
assert!(entries.is_empty(), "{entries:?}");
}

// -------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion src/shadow-core/src/shadow.rs
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,7 @@ mod tests {
let path = dir.path().join("shadow");
std::fs::write(&path, "").unwrap();
let entries = read_shadow_file(&path).unwrap();
assert!(entries.is_empty());
assert!(entries.is_empty(), "{entries:?}");
}

// -------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion src/shadow-core/src/subid.rs
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ mod tests {
let path = dir.path().join("subuid");
std::fs::write(&path, "").unwrap();
let entries = read_subid_file(&path).unwrap();
assert!(entries.is_empty());
assert!(entries.is_empty(), "{entries:?}");
}

#[test]
Expand Down
2 changes: 1 addition & 1 deletion src/uu/chgpasswd/src/chgpasswd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -604,7 +604,7 @@ mod tests {
assert_eq!(entries[0].passwd, "$6$new");
// The new line inherits the membership /etc/group already records.
assert_eq!(entries[0].members, members);
assert!(entries[0].admins.is_empty());
assert!(entries[0].admins.is_empty(), "{:?}", entries[0].admins);
}

// -----------------------------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions src/uu/chsh/src/chsh.rs
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ mod tests {
let dir = tempfile::tempdir().expect("tempdir");
let path = dir.path().join("nonexistent");
let shells = read_shells(&path).expect("read_shells");
assert!(shells.is_empty());
assert!(shells.is_empty(), "{shells:?}");
}

#[test]
Expand All @@ -437,7 +437,7 @@ mod tests {
let path = dir.path().join("shells");
std::fs::write(&path, "").expect("write");
let shells = read_shells(&path).expect("read_shells");
assert!(shells.is_empty());
assert!(shells.is_empty(), "{shells:?}");
}

// -----------------------------------------------------------------------
Expand Down
8 changes: 6 additions & 2 deletions src/uu/gpasswd/src/gpasswd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -689,8 +689,12 @@ mod tests {
parse_user_list("a, b ,c"),
vec!["a".to_string(), "b".to_string(), "c".to_string()]
);
assert!(parse_user_list("").is_empty());
assert!(parse_user_list(",,").is_empty());
assert!(parse_user_list("").is_empty(), "{:?}", parse_user_list(""));
assert!(
parse_user_list(",,").is_empty(),
"{:?}",
parse_user_list(",,")
);
}

#[test]
Expand Down
2 changes: 1 addition & 1 deletion src/uu/login/src/login.rs
Original file line number Diff line number Diff line change
Expand Up @@ -852,7 +852,7 @@ mod tests {
assert_eq!(c.tty_perm, 0o600);
assert_eq!(c.tty_group, "tty");
assert!(c.default_home);
assert!(c.motd_files.is_empty());
assert!(c.motd_files.is_empty(), "{:?}", c.motd_files);

let c = Config::from_defs(&defs(
"LOGIN_RETRIES 5\nLOGIN_TIMEOUT 0\nTTYPERM 0620\nDEFAULT_HOME no\nMOTD_FILE /etc/motd:/run/motd\nLOGIN_PLAIN_PROMPT yes\nFAIL_DELAY 4\n",
Expand Down
6 changes: 3 additions & 3 deletions src/uu/newusers/src/newusers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -625,9 +625,9 @@ mod tests {
fn test_all_optional_fields_may_be_empty() {
let line = parse_line("alice:pw:::::", 1).expect("parses");
assert_eq!(line.name, "alice");
assert!(line.uid.is_empty());
assert!(line.gid.is_empty());
assert!(line.home.is_empty());
assert!(line.uid.is_empty(), "{:?}", line.uid);
assert!(line.gid.is_empty(), "{:?}", line.gid);
assert!(line.home.is_empty(), "{:?}", line.home);
}

fn line(spec: &str) -> Line {
Expand Down
2 changes: 1 addition & 1 deletion src/uu/pwconv/src/pwconv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -598,7 +598,7 @@ mod tests {
reconcile_gshadow(&mut gr, &mut gs);
assert_eq!(gr[0].passwd, "x");
assert_eq!(gs[0].passwd, "$6$t$t");
assert!(gs[0].admins.is_empty());
assert!(gs[0].admins.is_empty(), "{:?}", gs[0].admins);
assert_eq!(gs[0].members, vec!["alice".to_string(), "bob".to_string()]);
}

Expand Down
2 changes: 1 addition & 1 deletion tests/by-util/test_expiry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ fn test_locked_is_silent() {
let dir = prefix("root:!$6$x$y:0:0:1:7:::");
let out = expiry(&dir, &["-c"]);
out.assert_code(0);
assert!(out.stdout.is_empty());
assert!(out.stdout.is_empty(), "{:?}", out.stdout);
}

/// No shadow line for the caller: no policy to enforce.
Expand Down
Loading