Skip to content

Commit a9859e7

Browse files
committed
suggestion
1 parent 95c95b5 commit a9859e7

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/system/audit.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,9 @@ pub(crate) fn sudo_call<T>(
4747
let mut target_groups = target_user.groups.clone();
4848
inject_group(target_group.gid, &mut target_groups);
4949

50-
#[cfg(test)]
51-
if (target_user.uid, target_group.gid) == (cur_user_id, cur_group_id)
50+
if cfg!(test)
51+
&& target_user.uid == cur_user_id
52+
&& target_group.gid == cur_group_id
5253
&& target_groups
5354
.iter()
5455
.filter(|x| **x != target_group.gid)

0 commit comments

Comments
 (0)