Adjusted to work with shadow passwords.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25056 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -3,10 +3,14 @@
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <pwd.h>
|
||||
#include <shadow.h>
|
||||
|
||||
#include "LoginApp.h"
|
||||
#include "LoginWindow.h"
|
||||
|
||||
#include "multiuser_utils.h"
|
||||
|
||||
|
||||
const char *kLoginAppSig = "application/x-vnd.Haiku-Login";
|
||||
|
||||
|
||||
@@ -98,11 +102,9 @@ LoginApp::ValidateLogin(const char *login, const char *password/*, bool force =
|
||||
return B_OK;
|
||||
}
|
||||
|
||||
// XXX: check for shadow pass
|
||||
if (strcmp(crypt(password, pwd->pw_passwd), pwd->pw_passwd))
|
||||
return B_NOT_ALLOWED;
|
||||
|
||||
return B_OK;
|
||||
if (verify_password(pwd, getspnam(login), password))
|
||||
return B_OK;
|
||||
return B_NOT_ALLOWED;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user