diff --git a/apps/wolfsshd/auth.c b/apps/wolfsshd/auth.c index 1690587d1..94bc3331e 100644 --- a/apps/wolfsshd/auth.c +++ b/apps/wolfsshd/auth.c @@ -746,12 +746,15 @@ void wolfSSHD_AuthInit(void) #ifndef _WIN32 #ifdef WOLFSSH_USE_PAM -static int CheckPasswordPAM(const char* usr, const byte* pw, word32 pwSz) +/* Stub: PAM is not implemented, so every password is refused. */ +static int CheckPasswordPAM(const char* usr, const byte* pw, word32 pwSz, + WOLFSSHD_AUTH* authCtx) { (void)usr; (void)pw; (void)pwSz; - return 0; + (void)authCtx; + return WSSHD_AUTH_FAILURE; } #else @@ -2472,6 +2475,10 @@ static int SetupUserTokenWin(const char* usr, WFREE(authInfo, NULL, DYNTYPE_SSHD); } + if (usrW != NULL) { + WFREE(usrW, NULL, DYNTYPE_SSHD); + } + if (lsaHandle != NULL) { LsaDeregisterLogonProcess(lsaHandle); }