alternate data stream bug in Samba 3.2.1

lipson kevin.lisong at gmail.com
Tue Aug 26 07:01:57 GMT 2008




Volker Lendecke wrote:
> 
> On Mon, Aug 25, 2008 at 10:53:43PM -0700, lipson wrote:
>> Well, I'm trying to generate the log from valgrind. But before that, I
>> was
>> really confused by the behaviors of module streams_xattr. Have you guy
>> tested the features of alternate data stream support in samba 3.2.1 ? 
> 
> Well, it does survive *some* tests. But as it is always with
> new features, there might be bugs. Apparently you hit one.
> 
>> Here is code snip I got from streams_xattr.c
>> ===================================================
>> ......
>>    DEBUG(10, ("get_ea_value returned %s\n", nt_errstr(status)));
>> 
>>         if (!NT_STATUS_IS_OK(status)
>>             && !NT_STATUS_EQUAL(status, NT_STATUS_NOT_FOUND)) {
>>                 /*
>>                  * The base file is not there. This is an error even if
>> we
>> got
>>                  * O_CREAT, the higher levels should have created the
>> base
>>                  * file for us.
>>                  */
>>                 DEBUG(10, ("streams_xattr_open: base file %s not around,
>> "
>>                            "returning ENOENT\n", base));
>>                 errno = ENOENT;
>>                 goto fail;
>>         }
>> ......
>> ====================================================
>> Isn't it a little bit self-conflict about the semantic meaning of this
>> snip
>> ? 
> 
> In what sense do you see the conflict? When we're at that
> code point, we should always have the base file.
> 
> Volker
> 
>  
> 

Well, no offence, I mean shouldn't it be EQUAL to "NT_STATUS_NOT_FOUND" then
the branch would be executed.  

But in the snip, the logic seemed to be reversed. !NT_STATUS_EQUAL(status,
NT_STATUS_NOT_FOUND)

-- 
View this message in context: http://www.nabble.com/alternate-data-stream-bug-in-Samba-3.2.1-tp19140773p19156836.html
Sent from the Samba - samba-technical mailing list archive at Nabble.com.



More information about the samba-technical mailing list