[694] in Moira
Problem with a particular user...
daemon@ATHENA.MIT.EDU (Mark Rosenstein)
Tue Dec 7 01:53:03 1993
Date: Tue, 7 Dec 93 01:52:31 -0500
From: Mark Rosenstein <mar@MIT.EDU>
To: darrin@MIT.EDU
Cc: darrin@MIT.EDU, kim@MIT.EDU, tytso@MIT.EDU, moiradev@MIT.EDU
In-Reply-To: Darrin E. Robinson's message of Fri, 03 Dec 93 14:06:53 EST <9312031906.AA16102@imbrium.MIT.EDU>
This one took some detective work, but I've finally figured out what
happened. The MR_BAD_CHAR is getting returned from mr_verify_query
(line 545 of server/qrtn.dc) when it attempts to copy the query
arguments. Moira uses a series of text escapes to encode binary data
in a query, such as the signature field on each user record. The
routine that decodes this complains if a string ends with the escape
character (backslash). Well, it seems that the signature field on
jltsuei ends in a backslash, and the moira library is not quoting this
correctly. You can verify this by retrieving the record with "qy guac
jltsuei" in mrtest.
I don't have a proposed fix now, although it shouldn't be too hard to
find one if you study the relevant code. As a workaround, just change
the username or ID number on the account and a new signature will be
generated. Then change it back to what it's supposed to be, and yet
another signature will be generated (because signatures are
timestamped, no two will be alike even if they sign the same data).
BTW, in debugging this I used the _set_debug_level query through
mrtest to turn up the logging level. Its usually set to 23, but I
briefly turned most of the bits on. Its value is a bitfield of the
LOG_* defines in server/mr_server.h to controll logging of various
items. With logging up, I could see that the error was occuring befre
the regular argument parsing. I then went and read through
mr_process_query() in server/qrtn.dc until I found something that
could generate MR_BAD_CHAR early in query processing.
-Mark