s4:torture: data_blob_hex_string() output is now lowercase

Andrew Kroeger andrew at id10ts.net
Thu Oct 1 06:28:56 MDT 2009


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?

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?  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?

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?

Sincerely,
Andrew Kroeger


More information about the samba-technical mailing list