Please check out Rage of Vengeance !

Member Discussions

terms



[Previous] [Next] [Post] [Reply] [Topics] [Summary] [Search]


1. Password corruption Thu Apr 7, 2005 [1:11 PM]
Zeno_McDoh
Zeno-McDohl@nycap.rr.com
member since: Jul 30, 2004
Reply
Original topic:
http://www.gammon.com.au/forum/bbshowpost.php?bbsubject_id=5369

I am using a modified SmaugFUSS codebase. I have a problem where if a player has someone ignored, and they try to sign on while the ignored person is online, it'll check the ignored persons password instead of their own.

Here's a log:

Log: Zeno: loadup derius
Comm: Loading player data for: Derius (6K)
Player Derius loaded from room 2500.
Done.
Log: Zeno: force Derius ignore Alexander
(Alexander is now on his ignore list)
[Forced him to save and quit]
[Alexander is currently online]
[His password is currently admin1]
Enter your hero's name, or type new:
Derius
Password: admin1
Wrong password.
Monitor: Derius; arg: admin1, encryp-arg: De00dAfYFRDsU encryp-pass: AlcdLtbYc.CCo
Comm: Derius@24.194.57.197 wrong password.
Comm: Closing link to Derius.
$ grep AlcdLtbYc.CCo */*
a/Alexander:Password AlcdLtbYc.CCo~
(That would be Alexander's password)
[loaded up Derius]
Log: Zeno: force Derius ignore Alexander
(Alexander is taken off ignore list)
[Forced Derius to save and quit]
Name: Derius
Password: admin1
Last connected from: (Link-Dead)

I installed MD5 yet this problem still exists. Valgrind reported nothing out of the whole time that ignore was used, signed on, and so on. If anyone can help me with this, I'd be very thankful. This is a major problem that I need to fix ASAP.
-Zeno McDohl,
Owner of Bleached InuYasha Galaxy: http://www.biyg.org
Free MUD host: http://zeno.biyg.org
Learn how to build in Smaug at: http://zeno.biyg.org/~sbi/


2. RE: Password corruption Sat Apr 9, 2005 [12:39 AM]
thyrr
Email not supplied
member since: Nov 21, 1999
In Reply To
Reply
I'm not familiar with Smaug/SmaugFUSS. Is the ignore code part of Smaug or a snippet or your own ignore code?


3. RE: Password corruption Sat Apr 9, 2005 [7:01 PM]
Zeno_McDoh
Zeno-McDohl@nycap.rr.com
member since: Jul 30, 2004
In Reply To
Reply
It's part of the stock Smaug code. I have not modified any ignore or password functions. (The bug existed before I converted to MD5)
-Zeno McDohl,
Owner of Bleached InuYasha Galaxy: http://www.biyg.org
Free MUD host: http://zeno.biyg.org
Learn how to build in Smaug at: http://zeno.biyg.org/~sbi/


4. RE: Password corruption Sun Apr 10, 2005 [11:32 AM]
Sigma_
Email not supplied
member since: Dec 29, 2004
In Reply To
Reply
Well, the first and most logical answer to string corruption in smaug, from my experience, is some sort of hashing problem. I.e., somewhere you are having an unhashed string compared to a hashed string, etc.

For example, one bug I had in my own codebase for a short while before I tracked it down was that when I had an object named a particular name, and had a command with the same name, and tried to use that command, it would corrupt the name of the object as well as the index of that object.

I haven't looked at the ignore code in smaug for some time, so I can't say offhand what it may specificly be; I'm just saying off the top of my head what it most likely is. I'll take a look and see if I can find some more specific details. Otherwise I hope you find this little tip useful.
"I'll say it right to your face. I swear to god I will." - Donny Baker, Bob & Tom Show


5. RE: Password corruption Sun Apr 10, 2005 [11:55 AM]
Zeno_McDoh
Email not supplied
member since: Jul 30, 2004
In Reply To
Reply
Well in the 2nd original topic:
http://www.smaugfuss.org/mercuryboard/index.php?a=topic&t=14

We've discovered a bit more, but still nothing close to fixing it. It's just the password pointer, and not all of pcdata.
-Zeno McDohl,
Owner of Bleached InuYasha Galaxy: http://www.biyg.org
Free MUD host: http://zeno.biyg.org
Learn how to build in Smaug at: http://zeno.biyg.org/~sbi/


6. RE: Password corruption Sun Apr 10, 2005 [1:41 PM]
thyrr
Email not supplied
member since: Nov 21, 1999
In Reply To
Reply
If just the pcdata->password pointer is changing, you could run gdb on the player loading function and set a watch point for pcdata->password.

So you're sure that the rest of pcdata isn't being changed? Not somehow loading up the wrong player file? What does the ignore line look like in the player file, +/- a couple lines?


7. RE: Password corruption Sun Apr 10, 2005 [2:01 PM]
Zeno_McDoh
Email not supplied
member since: Jul 30, 2004
In Reply To
Reply
Er, I didn't know you could set a watch point on a pointer/string/variable. I'm not quite sure how to do it, I'll look around.

I'm quite sure it's just pcdata->pwd. At the time when it corrupts, it printed other ignored persons password, but when it also printed pcdata->filename, the filename was the original persons name.

This is what a pfile has, around ignore:

Dform_tform (null)~
Dform_rform (null)~
Boards 7 Game 0 RealLife 0 Ideas 0 Announce 0 Bugs 0 Personal 0 Immortal 0
Ignored Rafe~
Flags 32770
PKills 0
PDeaths 0


(Comment added by Zeno_McDoh on Sun Apr 10 15:15:44 2005)

Okay here is my gdb of the watch point:

(gdb) watch ch->pcdata->pwd
Hardware watchpoint 3: ch->pcdata->pwd
(gdb) c
Continuing.
Hardware watchpoint 3: ch->pcdata->pwd

Old value = 0x9f78d60 ""
New value = 0x0
0x080b3cfb in check_reconnect (d=0xa077748, name=0x81c9aa0 "Xael", fConn=0 '\0') at comm.c:3152
3152 DISPOSE( d->character->pcdata->pwd );
(gdb) list
3147 }
3148 return BERR;
3149 }
3150 if ( fConn == FALSE )
3151 {
3152 DISPOSE( d->character->pcdata->pwd );
3153 d->character->pcdata->pwd = str_dup( ch->pcdata->pwd );
3154 }
3155 else
3156 {

Hardware watchpoint 3: ch->pcdata->pwd

Old value = 0x0
New value = 0x9f78d60 "èûÁð5\004ÝEÅ*\236m«^s"
0x080b3d18 in check_reconnect (d=0xa077748, name=0x81c9aa0 "Xael", fConn=176 '°') at comm.c:3153
3153 d->character->pcdata->pwd = str_dup( ch->pcdata->pwd );

I think I'm getting somewhere.
-Zeno McDohl,
Owner of Bleached InuYasha Galaxy: http://www.biyg.org
Free MUD host: http://zeno.biyg.org
Learn how to build in Smaug at: http://zeno.biyg.org/~sbi/




[Previous] [Next] [Post] [Reply] [Topics] [Summary] [Search]