Skip to content

Commit

Permalink
rename var from passwd to authenticate
Browse files Browse the repository at this point in the history
  • Loading branch information
japaric committed Jul 31, 2023
1 parent b8b94f5 commit ee9a1f8
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions src/sudoers/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,9 @@ impl Sudoers {
am_user.is_root() || (request.user == am_user && in_group(am_user, request.group));

let mut flags = check_permission(self, am_user, on_host, request);
if let Some(Tag {
authenticate: passwd,
..
}) = flags.as_mut()
{
if let Some(Tag { authenticate, .. }) = flags.as_mut() {
if skip_passwd {
*passwd = Authenticate::Nopasswd;
*authenticate = Authenticate::Nopasswd;
}
}

Expand All @@ -111,13 +107,9 @@ impl Sudoers {
|| (request.target_user == am_user && in_group(am_user, request.target_group));

let mut flags = check_list_permission(self, am_user, on_host);
if let Some(Tag {
authenticate: passwd,
..
}) = flags.as_mut()
{
if let Some(Tag { authenticate, .. }) = flags.as_mut() {
if skip_passwd {
*passwd = Authenticate::Nopasswd;
*authenticate = Authenticate::Nopasswd;
}
}

Expand Down

0 comments on commit ee9a1f8

Please sign in to comment.