Re: Circle & SQL??

From: Daniel Koepke (dkoepke@CALIFORNIA.COM)
Date: 05/10/98

On Sun, 10 May 1998, The Merciless Lord of everything wrote:

->Oh yeah, another thing I noted, why is there a MAX_PASSWORD_LENGTH (Or
->at least, why is it set to 10??)

Well, there is a MAX_PASSWORD_LENGTH because we need an exact and
static size for variables in binary files.  If it were a pointer that
was created to be the length of the password (+1 for the NULL
character), then whatever information came after the password in the
binary file would be in a different location for everyone--and the MUD
wouldn't know how much to read in for the password (unless you're
going to do it a byte at a time or you're going to write the length of
the string before the string--but that'll make files bigger).

As for it being 10: well, in stock Circle, it shouldn't be 10 (but it
is).  It should be 13.  According to the crypt man pages, crypt()
returns a series of 13 printable ASCII characters.  By making it 10,
you're cutting off the last three of those characters.  Even though
the password stuff will still work because you're using strn_cmp() for
comparing only the first 10 characters of the string, I would still
regard it as a bug.  Hmm, it's probably one of those things in bpl13,

-dak : The perfect Mother's Day Gift...according to my mom, anyway.

     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | |

This archive was generated by hypermail 2b30 : 12/15/00 PST