Skip to content

Commit

Permalink
Swapped the user and global
Browse files Browse the repository at this point in the history
run order per issue #21 intent.
  • Loading branch information
nuvious committed Mar 4, 2022
1 parent 30d7065 commit 5bf2e57
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/duress.c
Original file line number Diff line number Diff line change
Expand Up @@ -262,8 +262,8 @@ int process_dir(const char *directory, const char *pam_user, const char *pam_pas

int execute_duress_scripts(const char *pam_user, const char *pam_pass)
{
int global_duress_run = process_dir(GLOBAL_CONFIG_DIR, pam_user, pam_pass, "root");
int local_duress_run = process_dir(get_local_config_dir(pam_user), pam_user, pam_pass, pam_user);
int global_duress_run = process_dir(GLOBAL_CONFIG_DIR, pam_user, pam_pass, "root");

if (global_duress_run || local_duress_run)
return PAM_SUCCESS;
Expand Down

0 comments on commit 5bf2e57

Please sign in to comment.