fix linux now :)
git-svn-id: svn://katsu.triplehelix.org/dgamelaunch/trunk@44 db0b04b0-f4d1-0310-9a6d-de3e77497b0e
This commit is contained in:
parent
3a2b0a7b0d
commit
f35d803c74
|
@ -56,6 +56,11 @@
|
|||
# include <libutil.h>
|
||||
#endif
|
||||
|
||||
#ifdef __linux__
|
||||
# include <pty.h>
|
||||
#endif
|
||||
|
||||
#include <grp.h>
|
||||
#include <time.h>
|
||||
#include <sys/resource.h>
|
||||
#include <sys/ioctl.h> /* ttyrec */
|
||||
|
@ -680,7 +685,7 @@ loginprompt ()
|
|||
getnstr (pw_buf, 20);
|
||||
echo ();
|
||||
|
||||
if (passwordgood (user_buf, pw_buf))
|
||||
if (passwordgood (pw_buf))
|
||||
{
|
||||
loggedin = 1;
|
||||
snprintf (rcfilename, 80, "%s%s.nethackrc", LOC_DGLDIR, me->username);
|
||||
|
@ -788,8 +793,11 @@ newuser ()
|
|||
/* ************************************************************* */
|
||||
|
||||
int
|
||||
passwordgood (char *cname, char *cpw)
|
||||
passwordgood (char *cpw)
|
||||
{
|
||||
if (me == NULL)
|
||||
return 1;
|
||||
|
||||
if (!strncmp (crypt (cpw, cpw), me->password, 13))
|
||||
return 1;
|
||||
if (!strncmp (cpw, me->password, 20))
|
||||
|
|
|
@ -64,7 +64,7 @@ extern void initncurses (void);
|
|||
extern struct dg_user *deep_copy (struct dg_user *src);
|
||||
extern void loginprompt (void);
|
||||
extern void newuser (void);
|
||||
extern int passwordgood (char *cname, char *cpw);
|
||||
extern int passwordgood (char *cpw);
|
||||
extern int readfile (int nolock);
|
||||
extern int userexist (char *cname);
|
||||
extern void write_canned_rcfile (char *target);
|
||||
|
|
Loading…
Reference in New Issue