Files
shadow/Cargo.toml
T
Pierre Warnier 84402354a4 release: 0.3.0 (#283)
Thirty-eight commits since 0.2.2, none of them in the changelog: the
Unreleased section described the musl archive and nothing else. It now
covers the lot, under the headings the file already uses.

The release itself is the reason to do this now. The aarch64 archive
support merged on Friday and has never run: the configuration is
verified and dist plan lists all three archives, but no tag has yet
driven the pipeline.

Highlights, all documented in full in the changelog:

  - --root performs a real chroot(2) in every tool, where eight of the
    thirteen treated it as a path prefix.
  - passwd -l is idempotent, and chage -l prints what chage(1) prints.
  - chpasswd takes its hashing scheme from ENCRYPT_METHOD.
  - chsh no longer answers differently for a path that exists and one
    that does not, which made a setuid-root tool a filesystem oracle.
  - login.defs numbers are read in octal and hexadecimal as documented.
  - ID allocation consults the name service.
  - An aarch64 archive, and the user-facing tools install into bin.
2026-09-05 14:18:20 +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.0"
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.0" }
# 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.0" }
rustix = { workspace = true }
# Tool crates (optional, enabled by features)
passwd = { optional = true, version = "0.3.0", package = "uu_passwd", path = "src/uu/passwd" }
pwck = { optional = true, version = "0.3.0", package = "uu_pwck", path = "src/uu/pwck" }
useradd = { optional = true, version = "0.3.0", package = "uu_useradd", path = "src/uu/useradd" }
userdel = { optional = true, version = "0.3.0", package = "uu_userdel", path = "src/uu/userdel" }
usermod = { optional = true, version = "0.3.0", package = "uu_usermod", path = "src/uu/usermod" }
chpasswd = { optional = true, version = "0.3.0", package = "uu_chpasswd", path = "src/uu/chpasswd" }
chage = { optional = true, version = "0.3.0", package = "uu_chage", path = "src/uu/chage" }
groupadd = { optional = true, version = "0.3.0", package = "uu_groupadd", path = "src/uu/groupadd" }
groupdel = { optional = true, version = "0.3.0", package = "uu_groupdel", path = "src/uu/groupdel" }
groupmod = { optional = true, version = "0.3.0", package = "uu_groupmod", path = "src/uu/groupmod" }
grpck = { optional = true, version = "0.3.0", package = "uu_grpck", path = "src/uu/grpck" }
chfn = { optional = true, version = "0.3.0", package = "uu_chfn", path = "src/uu/chfn" }
chsh = { optional = true, version = "0.3.0", package = "uu_chsh", path = "src/uu/chsh" }
newgrp = { optional = true, version = "0.3.0", 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.0", package = "uu_chage", path = "src/uu/chage" }
chfn = { version = "0.3.0", package = "uu_chfn", path = "src/uu/chfn" }
chpasswd = { version = "0.3.0", package = "uu_chpasswd", path = "src/uu/chpasswd" }
chsh = { version = "0.3.0", package = "uu_chsh", path = "src/uu/chsh" }
groupadd = { version = "0.3.0", package = "uu_groupadd", path = "src/uu/groupadd" }
groupdel = { version = "0.3.0", package = "uu_groupdel", path = "src/uu/groupdel" }
groupmod = { version = "0.3.0", package = "uu_groupmod", path = "src/uu/groupmod" }
newgrp = { version = "0.3.0", package = "uu_newgrp", path = "src/uu/newgrp" }
passwd = { version = "0.3.0", package = "uu_passwd", path = "src/uu/passwd" }
useradd = { version = "0.3.0", package = "uu_useradd", path = "src/uu/useradd" }
userdel = { version = "0.3.0", package = "uu_userdel", path = "src/uu/userdel" }
usermod = { version = "0.3.0", package = "uu_usermod", path = "src/uu/usermod" }
pwck = { version = "0.3.0", package = "uu_pwck", path = "src/uu/pwck" }
grpck = { version = "0.3.0", package = "uu_grpck", path = "src/uu/grpck" }
shadow-core = { path = "src/shadow-core", version = "0.3.0" }
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