s4:torture: data_blob_hex_string() output is now lowercase
Andrew Bartlett
abartlet at samba.org
Thu Oct 1 17:30:28 MDT 2009
On Thu, 2009-10-01 at 07:28 -0500, Andrew Kroeger wrote:
> Andrew Bartlett wrote:
> > On Wed, 2009-09-30 at 09:02 -0500, Matthias Dieter Wallnöfer wrote:
> >> commit c5dba4a82eb9f6cc199d20489c89a7765504919d
> >> Author: Andrew Kroeger <andrew at id10ts.net>
> >> Date: Fri Sep 25 15:10:40 2009 -0500
> >>
> >> s4:torture: data_blob_hex_string() output is now lowercase.
> >>
> >> Based on the change in commit
> >> fb84edabbe9f358031117de2cf78613c704ac600, these
> >> tests needs to expect lowercase output.
> >
> > As we were discussing earlier, we still need to split out the
> > data_blob_hex_string() function and tests into separate lower and upper
> > case versions. (The ldb tests are fine, as we do now need to assert
> > that they remain lower case)
> >
> > Andrew Bartlett
>
> Andrew:
>
> I took a cursory look into how the extended DN code calls the
> data_blob_hex_string() function, but it was not readily apparent how
> those calls interacted. I didn't do anything in-depth (debugging,
> etc.), I was just trying to look at the code.
>
> There are evidently a few layers of function calls from the extended DN
> code to the code in data_blob_hex_string(). Having not looked into the
> code flow in depth, do you have any ideas/pointers as to the best place
> to change what function is called, so that the extended DN code gets the
> lowercase results it needs without unduly propagating lowercase hex into
> other areas of the code that have not previously seen lowercase?
See extended_dn_write_hex() in lib/ldb-samba/ldif_handlers.c
> Also, on IRC, metze indicated he would like to see
> data_blob_hex_string() restored to its previous behavior, and then
> rename the function to data_blob_hex_string_upper() and implement a new
> function named data_blob_hex_string_lower(). If we do that, I would
> assume we still want the ldb tests from my patch to expect lowercase
> results, correct?
Indeed, they now become critical! (Because they will be the biggest
impediment between a programmer's good intentions in the future and then
accidentally breaking the AD DC join)
> Should I then add some non-ldb tests to verify the
> uppercase version of the function? If so, do you have any pointers as
> to where these tests should be added or what they should actually test?
Next to the other test that was changed in your original patch patch I
suppose.
> One final question is regarding the existing (apparently shared) calls
> to data_blob_hex_string() under librpc/rpc and librpc/ndr. Although I
> did not find any differences in the S4 "make test" between the upper-
> and loser-case versions of data_blob_hex_string(), am I correct to
> assume we want the calls in those files to change to the
> data_blob_hex_string_upper() function, so we maintain the same case we
> have historically had?
Yes.
Andrew Bartlett
--
Andrew Bartlett http://samba.org/~abartlet/
Authentication Developer, Samba Team http://samba.org
Samba Developer, Cisco Inc.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20091002/f7e7dd3b/attachment.pgp>
More information about the samba-technical
mailing list