]> git.armaanb.net Git - opendoas.git/blobdiff - shadow.c
Replace build/installation instructions with discouragements
[opendoas.git] / shadow.c
index 8489017b167516835bf03d7102bbb4dcdee63996..2569b586635646a79fe0d818c9ff5c66e08a1e24 100644 (file)
--- a/shadow.c
+++ b/shadow.c
@@ -35,6 +35,7 @@
 #include <unistd.h>
 
 #include "openbsd.h"
+#include "doas.h"
 
 #ifndef HOST_NAME_MAX
 #define HOST_NAME_MAX _POSIX_HOST_NAME_MAX
@@ -67,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];
@@ -90,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