Hello again.
I am still, slowly, working on my Mud. As per my last post, I have completed expanding the code to the point that i feel comfortable with the game being playable with the level increase. In that respect, i am just down to building areas to support the extra levels.
I have lately been fixing known bugs and things that have been irritating me.
One of the things that is irritating me is that I have noticed that the player passwords are stored in plain text in the pfile. (Well actually ive noticed this from day one, but I haven't until now got to a point to correct this).
A little history. My mud was originally compiled to run under CGYWIN on a windows 98 box back in the year 2001. I started making changes to make it my own over that year, but eventually put it on the back burner. In 2010 i found a CD containing a backup of my entire code, and so i installed Ubuntu Server on a spare box and loaded up the mud. (GCC 3.4 installed)... this was short lived and again the mud went on the back burner. In 2019, I picked it up again. and have kept the box powered and connected ever since. Ive updated Ubuntu Server to the latest version, and kept GCC 3.4 installed. The mud runs and compiles. The server has been online for nearly 30 months without interruption.
I am wondering if the changes (which i don't really remember what all i did) i needed to make to make the mud compile 20 years ago on cygwin is what forced the mud to use plain text passwords, or if there something i need to enable, add to the code to make it work. Google is not being my friend here.
in comm.c this is the password code
if ( strcmp( crypt( argument, ch->pcdata->pwd ), ch->pcdata->pwd ))
{
write_to_buffer( d, "Wrong password.\n\r", 0 );
close_socket( d );
return;
}
write_to_buffer( d, echo_on_str, 0 );
if (check_playing(d,ch->name))
return;
ch->pcdata->socket = str_dup( d->host );
if ( check_reconnect( d, ch->name, TRUE ) )
return;
sprintf( log_buf, "%s@%s has connected.", ch->name, d->host );
log_string( log_buf );
wiznet(log_buf,NULL,NULL,WIZ_SITES,0,get_trust(ch));
ch->pcdata->socket = str_dup( d->host );
in merc.h i see
/*
* OS-dependent declarations.
* These are all very standard library functions,
* but some systems have incomplete or non-ansi header files.
*/
#if defined(_AIX)
char * crypt args( ( const char *key, const char *salt ) );
#endif
#if defined(apollo)
int atoi args( ( const char *string ) );
void * calloc args( ( unsigned nelem, size_t size ) );
char * crypt args( ( const char *key, const char *salt ) );
#endif
#if defined(hpux)
char * crypt args( ( const char *key, const char *salt ) );
#endif
#if defined(linux)
char * crypt args( ( const char *key, const char *salt ) );
#endif
#if defined(macintosh)
#define NOCRYPT
#if defined(unix)
#define NOCRYPT
#undef unix
#endif
#endif
#if defined(MIPS_OS)
char * crypt args( ( const char *key, const char *salt ) );
#endif
#if defined(MSDOS)
#define NOCRYPT
#if defined(unix)
#undef unix
#endif
#endif
#if defined(NeXT)
char * crypt args( ( const char *key, const char *salt ) );
#endif
#if defined(sequent)
char * crypt args( ( const char *key, const char *salt ) );
int fclose args( ( FILE *stream ) );
int fprintf args( ( FILE *stream, const char *format, ... ) );
int fread args( ( void *ptr, int size, int n, FILE *stream ) );
int fseek args( ( FILE *stream, long offset, int ptrname ) );
void perror args( ( const char *s ) );
int ungetc args( ( int c, FILE *stream ) );
#endif
#if defined(sun)
char * crypt args( ( const char *key, const char *salt ) );
int fclose args( ( FILE *stream ) );
int fprintf args( ( FILE *stream, const char *format, ... ) );
#if defined(SYSV)
siz_t fread args( ( void *ptr, size_t size, size_t n,
FILE *stream) );
#else
int fread args( ( void *ptr, int size, int n, FILE *stream ) );
#endif
int fseek args( ( FILE *stream, long offset, int ptrname ) );
void perror args( ( const char *s ) );
int ungetc args( ( int c, FILE *stream ) );
#endif
#if defined(ultrix)
char * crypt args( ( const char *key, const char *salt ) );
#endif
/*
* The crypt(3) function is not available on some operating systems.
* In particular, the U.S. Government prohibits its export from the
* United States to foreign countries.
* Turn on NOCRYPT to keep passwords in plain text.
*/
/*
#if defined(NOCRYPT)
#define crypt(s1, s2) (s1)
#endif
*/
I appear to have nocrypt commented out so it should be turned off.
What am i missing? I appreciate the help!! |