- 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:
François Revol
2008-04-20 00:14:58 +00:00
parent 0ab2d7407c
commit d65e1397df
4 changed files with 18 additions and 4 deletions
+11 -2
View File
@@ -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;
}