Files
shadow/Cargo.toml
T
Pierre Warnier b0cbe5c8de phase2: shadow-core modules + tool scaffolds for user management
Fixes #58 — uid_alloc: UID/GID allocation from login.defs ranges.
Fixes #59 — skel: recursive /etc/skel copy with chown.
Fixes #60 — gshadow: /etc/gshadow parser with proptest.
Fixes #61 — subid: /etc/subuid + /etc/subgid parser with proptest.

Scaffolded 5 Phase 2 tool crates (useradd, userdel, usermod,
chpasswd, chage) as stubs. Updated workspace, multicall binary,
and feature flags.

240 tests on Debian, zero clippy warnings.
2026-03-24 10:07:13 +01:00

110 lines
2.8 KiB
TOML

# spell-checker:ignore uutils
[package]
name = "shadow-rs"
version = "0.0.1"
edition = "2021"
license = "MIT"
description = "Memory-safe Rust reimplementation of Linux shadow-utils"
repository = "https://github.com/shadow-utils-rs/shadow-rs"
readme = "README.md"
keywords = ["coreutils", "shadow", "passwd", "useradd", "linux"]
categories = ["command-line-utilities", "os::unix-apis"]
[workspace]
members = [
"src/shadow-core",
"src/uu/passwd",
"src/uu/pwck",
"src/uu/useradd",
"src/uu/userdel",
"src/uu/usermod",
"src/uu/chpasswd",
"src/uu/chage",
]
[workspace.package]
version = "0.0.1"
edition = "2021"
license = "MIT"
authors = ["shadow-rs contributors"]
repository = "https://github.com/shadow-utils-rs/shadow-rs"
[workspace.dependencies]
# Internal crates
shadow-core = { path = "src/shadow-core" }
# CLI
clap = { version = "4", features = ["derive", "wrap_help"] }
# uutils integration
uucore = "0.7"
# Error handling
thiserror = "2"
# Unix/Linux
nix = { version = "0.29", features = ["user", "fs", "process", "signal", "term", "resource"] }
libc = "0.2"
# Security
zeroize = "1"
# Testing
proptest = "1"
tempfile = "3"
[dependencies]
# Tool crates (optional, enabled by features)
passwd = { optional = true, version = "0.0.1", package = "uu_passwd", path = "src/uu/passwd" }
pwck = { optional = true, version = "0.0.1", package = "uu_pwck", path = "src/uu/pwck" }
useradd = { optional = true, version = "0.0.1", package = "uu_useradd", path = "src/uu/useradd" }
userdel = { optional = true, version = "0.0.1", package = "uu_userdel", path = "src/uu/userdel" }
usermod = { optional = true, version = "0.0.1", package = "uu_usermod", path = "src/uu/usermod" }
chpasswd = { optional = true, version = "0.0.1", package = "uu_chpasswd", path = "src/uu/chpasswd" }
chage = { optional = true, version = "0.0.1", package = "uu_chage", path = "src/uu/chage" }
[features]
default = ["passwd", "pwck", "useradd", "userdel", "usermod", "chpasswd", "chage"]
# Individual tools
feat_passwd = ["passwd"]
feat_pwck = ["pwck"]
feat_useradd = ["useradd"]
feat_userdel = ["userdel"]
feat_usermod = ["usermod"]
feat_chpasswd = ["chpasswd"]
feat_chage = ["chage"]
# Grouped features
feat_phase1 = ["feat_passwd", "feat_pwck"]
feat_phase2 = ["feat_useradd", "feat_userdel", "feat_usermod", "feat_chpasswd", "feat_chage"]
feat_common = ["feat_phase1", "feat_phase2"]
[[bin]]
name = "shadow-rs"
path = "src/bin/shadow-rs.rs"
[[test]]
name = "test_passwd"
path = "tests/by-util/test_passwd.rs"
[dev-dependencies]
shadow-core = { path = "src/shadow-core", features = ["shadow"] }
nix = { workspace = true }
tempfile = { workspace = true }
[profile.release]
lto = true
strip = true
[workspace.lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(fuzzing)'] }
[workspace.lints.clippy]
all = { level = "deny" }
pedantic = { level = "warn" }
[lints]
workspace = true