Files
shadow/Cargo.toml
T
Pierre Warnier e09e4bccac release: build the glibc archives on 22.04, and drop a test that could hang (#284)
Two defects in what shipped yesterday.

0.3.0's glibc archives require GLIBC_2.39 and will not start on Debian
12, Ubuntu 22.04 or RHEL 9 -- all of which ran 0.2.2. Pinning the release
runner to Ubuntu 24.04 in #272 let Rust's std link pidfd_spawnp and
pidfd_getpid; those two are the only symbols in the binary above 2.34.
The build now happens inside an ubuntu:22.04 container on the same
runner, which is where the container support in dist earns its keep: the
runner stays current while the floor goes back to GLIBC_2.34, exactly
what 0.2.2 required. Verified by building in that container and dumping
the versioned symbols, and by running the result on a glibc 2.35 host
where the 0.3.0 archive refuses to start. The static musl archive was
never affected.

The PAM test for an unconfigured service could hang rather than fail. On
Debian /etc/pam.d/other falls through to common-auth, which is pam_unix,
so it prompts: the conversation then blocks reading stdin. CI never saw
it because its stdin is not a terminal, but `make check` on a developer's
machine hung indefinitely. The test is removed with a note saying why,
and the permit and deny tests -- which are the ones that matter and which
never converse -- stay.
2026-09-05 14:51:02 +02:00

176 lines
6.1 KiB
TOML

# spell-checker:ignore uutils
[package]
name = "uu_shadow"
version.workspace = true
edition.workspace = true
rust-version.workspace = true
license.workspace = true
repository.workspace = true
homepage.workspace = true
description = "Memory-safe Rust reimplementation of Linux shadow-utils"
readme = "README.md"
keywords = ["shadow-utils", "uutils", "shadow", "passwd", "linux"]
categories = ["command-line-utilities"]
[workspace]
members = [
"src/shadow-core",
"src/uu/passwd",
"src/uu/pwck",
"src/uu/useradd",
"src/uu/userdel",
"src/uu/usermod",
"src/uu/groupadd",
"src/uu/groupdel",
"src/uu/groupmod",
"src/uu/grpck",
"src/uu/chfn",
"src/uu/chsh",
"src/uu/newgrp",
"src/uu/chpasswd",
"src/uu/chage",
]
[workspace.package]
version = "0.3.1"
edition = "2024"
rust-version = "1.94.0"
license = "MIT"
repository = "https://github.com/uutils/shadow"
homepage = "https://github.com/uutils/shadow"
keywords = ["shadow-utils", "uutils", "shadow", "passwd", "linux"]
categories = ["command-line-utilities"]
[workspace.dependencies]
# Internal crates
shadow-core = { path = "src/shadow-core", version = "0.3.1" }
# CLI
clap = { version = "4", features = ["wrap_help"] }
clap_complete = "4"
# uutils integration
uucore = "0.11"
# Error handling
thiserror = "2"
# Unix/Linux
rustix = { version = "1", features = ["fs", "param", "process", "rand", "termios"] }
libc = "0.2"
# Security
zeroize = "1"
subtle = "2"
landlock = "0.4"
# Testing
proptest = "1"
tempfile = "3"
[dependencies]
clap = { workspace = true }
clap_complete = { workspace = true, optional = true }
shadow-core = { path = "src/shadow-core", version = "0.3.1" }
rustix = { workspace = true }
# Tool crates (optional, enabled by features)
passwd = { optional = true, version = "0.3.1", package = "uu_passwd", path = "src/uu/passwd" }
pwck = { optional = true, version = "0.3.1", package = "uu_pwck", path = "src/uu/pwck" }
useradd = { optional = true, version = "0.3.1", package = "uu_useradd", path = "src/uu/useradd" }
userdel = { optional = true, version = "0.3.1", package = "uu_userdel", path = "src/uu/userdel" }
usermod = { optional = true, version = "0.3.1", package = "uu_usermod", path = "src/uu/usermod" }
chpasswd = { optional = true, version = "0.3.1", package = "uu_chpasswd", path = "src/uu/chpasswd" }
chage = { optional = true, version = "0.3.1", package = "uu_chage", path = "src/uu/chage" }
groupadd = { optional = true, version = "0.3.1", package = "uu_groupadd", path = "src/uu/groupadd" }
groupdel = { optional = true, version = "0.3.1", package = "uu_groupdel", path = "src/uu/groupdel" }
groupmod = { optional = true, version = "0.3.1", package = "uu_groupmod", path = "src/uu/groupmod" }
grpck = { optional = true, version = "0.3.1", package = "uu_grpck", path = "src/uu/grpck" }
chfn = { optional = true, version = "0.3.1", package = "uu_chfn", path = "src/uu/chfn" }
chsh = { optional = true, version = "0.3.1", package = "uu_chsh", path = "src/uu/chsh" }
newgrp = { optional = true, version = "0.3.1", package = "uu_newgrp", path = "src/uu/newgrp" }
[features]
default = ["passwd", "pwck", "useradd", "userdel", "usermod", "chpasswd", "chage",
"groupadd", "groupdel", "groupmod", "grpck", "chfn", "chsh", "newgrp"]
# PAM authentication (requires libpam-dev). The `?` matters: without it,
# asking for PAM would drag in the three applets that can use it even when the
# build deliberately left them out.
pam = ["passwd?/pam", "chfn?/pam", "chsh?/pam"]
# Shell completions generator
completions = ["dep:clap_complete"]
# One test binary for the whole suite. Fourteen separate targets each linked
# all fourteen tool crates, so the suite was compiled and linked fourteen
# times over.
[[test]]
name = "tests"
path = "tests/tests.rs"
[[bin]]
name = "shadow-rs"
path = "src/bin/shadow-rs.rs"
[[bin]]
name = "shadow-rs-completions"
path = "src/bin/completions.rs"
required-features = ["completions"]
[dev-dependencies]
chage = { version = "0.3.1", package = "uu_chage", path = "src/uu/chage" }
chfn = { version = "0.3.1", package = "uu_chfn", path = "src/uu/chfn" }
chpasswd = { version = "0.3.1", package = "uu_chpasswd", path = "src/uu/chpasswd" }
chsh = { version = "0.3.1", package = "uu_chsh", path = "src/uu/chsh" }
groupadd = { version = "0.3.1", package = "uu_groupadd", path = "src/uu/groupadd" }
groupdel = { version = "0.3.1", package = "uu_groupdel", path = "src/uu/groupdel" }
groupmod = { version = "0.3.1", package = "uu_groupmod", path = "src/uu/groupmod" }
newgrp = { version = "0.3.1", package = "uu_newgrp", path = "src/uu/newgrp" }
passwd = { version = "0.3.1", package = "uu_passwd", path = "src/uu/passwd" }
useradd = { version = "0.3.1", package = "uu_useradd", path = "src/uu/useradd" }
userdel = { version = "0.3.1", package = "uu_userdel", path = "src/uu/userdel" }
usermod = { version = "0.3.1", package = "uu_usermod", path = "src/uu/usermod" }
pwck = { version = "0.3.1", package = "uu_pwck", path = "src/uu/pwck" }
grpck = { version = "0.3.1", package = "uu_grpck", path = "src/uu/grpck" }
shadow-core = { path = "src/shadow-core", version = "0.3.1" }
rustix = { workspace = true }
tempfile = { workspace = true }
[profile.release]
lto = true
strip = true
panic = "abort"
codegen-units = 1
[profile.release-small]
inherits = "release"
opt-level = "z"
# Profile used by `dist` when building release artifacts (issue #207).
# Inherits the hardened release settings: LTO, stripped symbols, and
# panic = "abort" (no unwind tables in a setuid-root binary).
[profile.dist]
inherits = "release"
[workspace.lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(fuzzing)'] }
unsafe_code = "deny"
dead_code = "deny"
[workspace.lints.clippy]
all = { level = "deny" }
pedantic = { level = "warn" }
cargo = { level = "warn", priority = -1 }
# Allowed pedantic/cargo lints that don't add value for this project:
multiple_crate_versions = { level = "allow", priority = 1 }
missing_panics_doc = { level = "allow", priority = 1 }
missing_errors_doc = { level = "allow", priority = 1 }
must_use_candidate = { level = "allow", priority = 1 }
module_name_repetitions = { level = "allow", priority = 1 }
cargo_common_metadata = { level = "allow", priority = 1 }
[lints]
workspace = true