Skip to content

Commit

Permalink
refactor: rename variable
Browse files Browse the repository at this point in the history
  • Loading branch information
saidsay-so committed Sep 12, 2023
1 parent 7ce795b commit 5133d05
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions howdy/src/pam/main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,8 @@ auto check_enabled(const INIReader &config, const char* username) -> int {

// pre-check if this user has face model file
auto model_path = std::string(USER_MODELS_DIR) + "/" + username + ".dat";
struct stat s_;
if (stat(model_path.c_str(), &s_) != 0) {
struct stat stat_;
if (stat(model_path.c_str(), &stat_) != 0) {
return PAM_AUTHINFO_UNAVAIL;
}

Expand All @@ -201,11 +201,11 @@ auto check_enabled(const INIReader &config, const char* username) -> int {
* @param flags Flags passed on to us by PAM, XORed
* @param argc Amount of rules in the PAM config (disregared)
* @param argv Options defined in the PAM config
* @param auth_tok True if we should ask for a password too
* @param ask_auth_tok True if we should ask for a password too
* @return Returns a PAM return code
*/
auto identify(pam_handle_t *pamh, int flags, int argc, const char **argv,
bool auth_tok) -> int {
bool ask_auth_tok) -> int {
INIReader config(CONFIG_FILE_PATH);
openlog("pam_howdy", 0, LOG_AUTHPRIV);

Expand Down Expand Up @@ -319,7 +319,7 @@ auto identify(pam_handle_t *pamh, int flags, int argc, const char **argv,
return std::tuple<int, char *>(pam_res, auth_tok_ptr);
});

auto ask_pass = auth_tok && workaround != Workaround::Off;
auto ask_pass = ask_auth_tok && workaround != Workaround::Off;

// We ask for the password if the function requires it and if a workaround is
// set
Expand Down

0 comments on commit 5133d05

Please sign in to comment.