- hide the password
- fix beos build, for testing. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25062 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -3,12 +3,14 @@
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <pwd.h>
|
||||
#include <shadow.h>
|
||||
|
||||
#include "LoginApp.h"
|
||||
#include "LoginWindow.h"
|
||||
|
||||
#ifdef __HAIKU__
|
||||
#include <shadow.h>
|
||||
#include "multiuser_utils.h"
|
||||
#endif
|
||||
|
||||
|
||||
const char *kLoginAppSig = "application/x-vnd.Haiku-Login";
|
||||
@@ -41,7 +43,7 @@ void
|
||||
LoginApp::MessageReceived(BMessage *message)
|
||||
{
|
||||
switch (message->what) {
|
||||
case kMsgOpenFilePanel:
|
||||
case kAttemptLogin:
|
||||
break;
|
||||
default:
|
||||
BApplication::MessageReceived(message);
|
||||
@@ -102,8 +104,15 @@ LoginApp::ValidateLogin(const char *login, const char *password/*, bool force =
|
||||
return B_OK;
|
||||
}
|
||||
|
||||
#ifdef __HAIKU__
|
||||
if (verify_password(pwd, getspnam(login), password))
|
||||
return B_OK;
|
||||
#else
|
||||
// for testing
|
||||
if (strcmp(crypt(password, pwd->pw_passwd), pwd->pw_passwd))
|
||||
return B_NOT_ALLOWED;
|
||||
#endif
|
||||
|
||||
return B_NOT_ALLOWED;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user