Skip to content

Commit 5db7e0c

Browse files
kekrbyWhatAmISupposedToPutHere
authored andcommitted
Don't specify the primary group when dropping privileges
The primary group of the "nobody" user can be named differently among distributions, for example on Debian it is named "nogroup" instead of "nobody", so don't specify it, in which case the correct group will be chosen automatically.
1 parent 65a2896 commit 5db7e0c

1 file changed

Lines changed: 0 additions & 1 deletion

File tree

src/main.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,6 @@ fn main() {
204204

205205
PrivDrop::default()
206206
.user("nobody")
207-
.group("nobody")
208207
.group_list(&groups)
209208
.apply()
210209
.unwrap_or_else(|e| { panic!("Failed to drop privileges: {}", e) });

0 commit comments

Comments
 (0)