s/flash drive/removable media/g

This commit is contained in:
Bandie 2018-03-27 18:14:16 +02:00
parent 445b6744ce
commit c6678b5026
Signed by: Bandie
GPG Key ID: C1E133BC65A822DD
3 changed files with 6 additions and 6 deletions

Binary file not shown.

Binary file not shown.

View File

@ -22,7 +22,7 @@ LICENSE : GNU-GPLv3
#ifdef POWEROFF #ifdef POWEROFF
#ifdef CRYPTSETUP #ifdef CRYPTSETUP
#define ASK "Please enter your extremely secret flash drive to decrypt the firewall and access the mainframe. " #define ASK "Please enter your secret removable media to decrypt the firewall and access the mainframe. "
PAM_EXTERN int pam_sm_authenticate(pam_handle_t *pamh, int flags, int argc, const char *argv[]) PAM_EXTERN int pam_sm_authenticate(pam_handle_t *pamh, int flags, int argc, const char *argv[])
@ -109,7 +109,7 @@ PAM_EXTERN int pam_sm_authenticate(pam_handle_t *pamh, int flags, int argc, cons
|| regexec(&regex, rejected_temp, 0, NULL, 0) == REG_NOMATCH || regexec(&regex, rejected_temp, 0, NULL, 0) == REG_NOMATCH
|| (serious && serious_temp == NULL) || (serious && serious_temp == NULL)
) { ) {
pam_syslog(pamh, LOG_ERR, "Argument invalid. Note, that allow and reject must have a valid GPT UUID."); pam_syslog(pamh, LOG_ERR, "Argument invalid. Note that allow and reject must have a valid GPT UUID.");
return (PAM_IGNORE); return (PAM_IGNORE);
} }
@ -134,21 +134,21 @@ PAM_EXTERN int pam_sm_authenticate(pam_handle_t *pamh, int flags, int argc, cons
} }
// Prompt for flash drive // Prompt for removable media
int8_t counter = 0; int8_t counter = 0;
while(access(allowed, F_OK) == -1 && access(rejected, F_OK) == -1){ while(access(allowed, F_OK) == -1 && access(rejected, F_OK) == -1){
pam_prompt(pamh, PAM_PROMPT_ECHO_OFF, &resp, ASK); pam_prompt(pamh, PAM_PROMPT_ECHO_OFF, &resp, ASK);
if(++counter >= 3){ if(++counter >= 3){
pam_syslog(pamh, LOG_NOTICE, "Couldn't identify flash drive. 3 tries."); pam_syslog(pamh, LOG_NOTICE, "Couldn't identify removable media. 3 tries.");
return (PAM_MAXTRIES); return (PAM_MAXTRIES);
} }
} }
// Allowed drive? OK! // Allowed removable media? OK!
if(access(allowed, F_OK) != -1) if(access(allowed, F_OK) != -1)
return (PAM_SUCCESS); return (PAM_SUCCESS);
// Rejected drive? PANIC!!1 // Rejected removable media? PANIC!!1
if(access(rejected, F_OK) != -1){ if(access(rejected, F_OK) != -1){
if(serious){ if(serious){