From: martijn Date: Sat, 16 Jan 2021 09:18:41 +0000 (+0000) Subject: s/authorization/authentication/g X-Git-Tag: v6.8.1~3 X-Git-Url: https://git.armaanb.net/?p=opendoas.git;a=commitdiff_plain;h=e8e8713b26723d2daf3de50b51d2ac209ad65716 s/authorization/authentication/g OK kn@ tedu@ --- diff --git a/doas.c b/doas.c index d312b24..b47d2bb 100644 --- a/doas.c +++ b/doas.c @@ -352,7 +352,7 @@ main(int argc, char **argv) #if defined(USE_SHADOW) if (!(rule->options & NOPASS)) { if (nflag) - errx(1, "Authorization required"); + errx(1, "Authentication required"); shadowauth(mypw->pw_name, rule->options & PERSIST); } @@ -360,7 +360,7 @@ main(int argc, char **argv) /* no authentication provider, only allow NOPASS rules */ (void) nflag; if (!(rule->options & NOPASS)) - errx(1, "Authorization required"); + errx(1, "Authentication required"); #endif if ((p = getenv("PATH")) != NULL) diff --git a/pam.c b/pam.c index 68294b2..a9e2036 100644 --- a/pam.c +++ b/pam.c @@ -245,7 +245,7 @@ pamauth(const char *user, const char *myname, int interactive, int nopass, int p #endif if (!user || !myname) - errx(1, "Authorization failed"); + errx(1, "Authentication failed"); ret = pam_start(PAM_SERVICE_NAME, myname, &conv, &pamh); if (ret != PAM_SUCCESS) @@ -277,7 +277,7 @@ pamauth(const char *user, const char *myname, int interactive, int nopass, int p if (!nopass) { if (!interactive) - errx(1, "Authorization required"); + errx(1, "Authentication required"); /* doas style prompt for pam */ char host[HOST_NAME_MAX + 1]; @@ -291,7 +291,7 @@ pamauth(const char *user, const char *myname, int interactive, int nopass, int p if (ret != PAM_SUCCESS) { pamcleanup(ret, sess, cred); syslog(LOG_AUTHPRIV | LOG_NOTICE, "failed auth for %s", myname); - errx(1, "Authorization failed"); + errx(1, "Authentication failed"); } } @@ -304,7 +304,7 @@ pamauth(const char *user, const char *myname, int interactive, int nopass, int p if (ret != PAM_SUCCESS) { pamcleanup(ret, sess, cred); syslog(LOG_AUTHPRIV | LOG_NOTICE, "failed auth for %s", myname); - errx(1, "Authorization failed"); + errx(1, "Authentication failed"); } /* set PAM_USER to the user we want to be */ diff --git a/shadow.c b/shadow.c index 27053d3..2569b58 100644 --- a/shadow.c +++ b/shadow.c @@ -68,10 +68,10 @@ shadowauth(const char *myname, int persist) if (hash[0] == 'x' && hash[1] == '\0') { struct spwd *sp; if ((sp = getspnam(myname)) == NULL) - errx(1, "Authorization failed"); + errx(1, "Authentication failed"); hash = sp->sp_pwdp; } else if (hash[0] != '*') { - errx(1, "Authorization failed"); + errx(1, "Authentication failed"); } char host[HOST_NAME_MAX + 1]; @@ -91,12 +91,12 @@ shadowauth(const char *myname, int persist) err(1, "readpassphrase"); if ((encrypted = crypt(response, hash)) == NULL) { explicit_bzero(rbuf, sizeof(rbuf)); - errx(1, "Authorization failed"); + errx(1, "Authentication failed"); } explicit_bzero(rbuf, sizeof(rbuf)); if (strcmp(encrypted, hash) != 0) { syslog(LOG_AUTHPRIV | LOG_NOTICE, "failed auth for %s", myname); - errx(1, "Authorization failed"); + errx(1, "Authentication failed"); } #ifdef USE_TIMESTAMP