]> git.armaanb.net Git - opendoas.git/blobdiff - doas.c
Remove PAM authentication option
[opendoas.git] / doas.c
diff --git a/doas.c b/doas.c
index a99b964105e3465adb2c947bc974a0610cb87f70..2cd227d1adf322e846b616524e1c11afdad2d7ef 100644 (file)
--- a/doas.c
+++ b/doas.c
@@ -362,7 +362,6 @@ main(int argc, char **argv)
                errc(1, EPERM, NULL);
        }
 
-#if defined(USE_SHADOW)
        if (!(rule->options & NOPASS)) {
                if (nflag)
                        errx(1, "Authentication required");
@@ -371,12 +370,6 @@ main(int argc, char **argv)
                if (ret == 5)
                        authfail(rule->options & INSULT);
        }
-#elif !defined(USE_PAM)
-       /* no authentication provider, only allow NOPASS rules */
-       (void) nflag;
-       if (!(rule->options & NOPASS))
-               errx(1, "Authentication required");
-#endif
 
        if ((p = getenv("PATH")) != NULL)
                formerpath = strdup(p);
@@ -394,11 +387,6 @@ main(int argc, char **argv)
        if (targpw == NULL)
                errx(1, "no passwd entry for target");
 
-#if defined(USE_PAM)
-       pamauth(targpw->pw_name, mypw->pw_name, !nflag, rule->options & NOPASS,
-           rule->options & PERSIST);
-#endif
-
 #ifdef HAVE_LOGIN_CAP_H
        if (setusercontext(NULL, targpw, target, LOGIN_SETGROUP |
            LOGIN_SETPATH |