[workspace] members = ["xtask", "rar-common"] [package] name = "rootasrole" # The project version is managed on json file in resources/rootasrole.json version = "3.0.3" rust-version = "1.76.0" authors = ["Eddie Billoir "] edition = "2021" default-run = "sr" description = "An alternative to sudo that uses Linux capabilities and Role based access control." license = "GPL-3.0-or-later" repository = "https://github.com/LeChatP/RootAsRole" homepage = "https://lechatp.github.io/RootAsRole/" keywords = ["sudo", "capabilities", "rbac", "linux", "security"] categories = ["command-line-utilities", "os::linux-apis", "config"] exclude = ["sudoers-reader/*", "book/*"] [badges] maintainance ={ status = "actively-maintained", badge = "https://img.shields.io/badge/maintenance-actively%20maintained-brightgreen.svg" } [profile.release] strip = "symbols" lto = true opt-level = "s" codegen-units = 1 #[features] #cursive_lib = [ "cursive" ] #srlibs = [ "pam-client", "bitflags" ] [[bin]] name = "sr" path = "src/sr/main.rs" required-features = ["finder"] [[bin]] name = "chsr" path = "src/chsr/main.rs" [features] default = ["finder"] finder = ["dep:pcre2", "rar-common/pcre2", "rar-common/finder"] [lints.rust] unexpected_cfgs = { level = "allow", check-cfg = ['cfg(tarpaulin_include)'] } [build-dependencies] #bindgen = "^0.66.1" serde_json = "1.0" toml = "0.8" [dependencies] rar-common = { path = "rar-common", version = "3.0.3", package = "rootasrole-core" } log = "0.4" libc = "0.2" strum = { version = "0.26", features = ["derive"] } semver = { version = "1.0", features = ["serde"] } nix = { version = "0.29", features = ["user","process", "signal", "fs"] } capctl = "0.2" pcre2 = { version = "0.2", optional = true } serde = { version = "1.0", features=["rc", "derive"] } serde_json = "1.0" ciborium = "0.2" glob = "0.3" pam-client2 = "0.5" bitflags = { version = "2.6" } shell-words = "1.1" linked_hash_set = { version = "0.1" } derivative = "2.2" sha2 = "0.10" chrono = "0.4" pty-process = "0.4" once_cell = "1.20" pest = "2.7" pest_derive = "2.7" const_format = "0.2" hex = "0.4" [dev-dependencies] log = "0.4" env_logger = "0.11" test-log = { version = "0.2" } [package.metadata.deb] maintainer = "Eddie Billoir " license-file = "LICENSE" depends = "libpam0g, libpam-modules, libpcre2-8-0" section = "admin" priority = "optional" assets = [ ["target/release/sr", "usr/bin/sr", "0555"], ["target/release/chsr", "usr/bin/chsr", "0555"], ["target/man/sr.8.gz", "usr/share/man/man8/sr.8.gz", "0644"], ["target/man/chsr.8.gz", "usr/share/man/man8/chsr.8.gz", "0644"], ["target/man/fr/sr.8.gz", "usr/share/man/fr/man8/sr.8.gz", "0644"], ["target/man/fr/chsr.8.gz", "usr/share/man/fr/man8/chsr.8.gz", "0644"] ] preserve-symlinks = true conf-files = ["/etc/pam.d/sr", "/etc/security/rootasrole.json"] maintainer-scripts = "target/release/" extended-description = "RootAsRole is a project to allow Linux/Unix administrators to delegate their administrative tasks access rights to multiple co-administrators through RBAC model and Linux Capabilities features." changelog = "target/debian/changelog" [package.metadata.generate-rpm] assets = [ { source = "target/release/sr", dest = "/usr/bin/sr", user = "root", group = "root", mode = "0555", caps = "=p" }, { source = "target/release/chsr", dest = "/usr/bin/chsr", user = "root", group = "root", mode = "0555" }, { source = "resources/rh/rh_sr_pam.conf", dest = "/etc/pam.d/sr", user = "root", group = "root", mode = "0644", config = true }, { source = "resources/rootasrole.json", dest = "/etc/security/rootasrole.json", user = "root", group = "root", mode = "0644", config = true }, { source = "target/man/sr.8.gz", dest = "/usr/share/man/man8/sr.8.gz", user = "root", group = "root", mode = "0644", doc = true }, { source = "target/man/chsr.8.gz", dest = "/usr/share/man/man8/chsr.8.gz" , user = "root", group = "root", mode = "0644", doc = true }, { source = "target/man/fr/sr.8.gz", dest = "/usr/share/man/fr/man8/sr.8.gz", user = "root", group = "root", mode = "0644", doc = true }, { source = "target/man/fr/chsr.8.gz", dest = "/usr/share/man/fr/man8/chsr.8.gz", user = "root", group = "root", mode = "0644", doc = true } ] post_install_script = "resources/rh/postinst.sh" post_install_script_flags = 0b101 pre_uninstall_script = "resources/rh/prerm.sh" pre_uninstall_script_flags = 0b101 [package.metadata.generate-rpm.requires] pam = "*" pcre2 = "*"