opendoas

my fork of doas with custom prompt
git clone git://git.kocotian.pl/opendoas.git
Log | Files | Refs | README | LICENSE

commit e8e8713b26723d2daf3de50b51d2ac209ad65716
parent 6e3c6ba4af9c04ba7f59c859148864aa895851cc
Author: martijn <martijn>
Date:   Sat, 16 Jan 2021 09:18:41 +0000

s/authorization/authentication/g

OK kn@ tedu@

Diffstat:
Mdoas.c | 4++--
Mpam.c | 8++++----
Mshadow.c | 8++++----
3 files changed, 10 insertions(+), 10 deletions(-)

diff --git 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 @@ -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 @@ -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