-
Notifications
You must be signed in to change notification settings - Fork 7
/
Cargo.toml
130 lines (110 loc) · 4.43 KB
/
Cargo.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
[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 <[email protected]>"]
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 <[email protected]>"
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 = "*"