From ef51f7f7007330f20a14c45e188b0f2b99c2ad07 Mon Sep 17 00:00:00 2001 From: lxsang Date: Sat, 27 Oct 2018 11:23:47 +0200 Subject: [PATCH] fix auth without shadown --- lib/ulib/ulib.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/ulib/ulib.c b/lib/ulib/ulib.c index c312bda..0154dd3 100644 --- a/lib/ulib/ulib.c +++ b/lib/ulib/ulib.c @@ -38,23 +38,23 @@ static int l_check_login (lua_State *L) { return 1; } spwd = getspnam(username); - if (spwd == NULL) + /*if (spwd == NULL) { lua_pushboolean(L,0); printf("no permission to read shadow password file\n"); return 1; - } + }*/ if (spwd != NULL) /* If there is a shadow password record */ { pwd->pw_passwd = spwd->sp_pwdp; /* Use the shadow password */ } - else + /*else { lua_pushboolean(L,0); printf("shadow record is null \n" ); return 1; - } + }*/ /* Encrypt password and erase cleartext version immediately */ encrypted = crypt(password, pwd->pw_passwd); if (encrypted == NULL)