scan tests in make test (was Re: Retiring or fixing smbtorture?)

Richard Sharpe realrichardsharpe at gmail.com
Wed Oct 24 17:45:40 MDT 2012


On Wed, Oct 24, 2012 at 3:17 PM, Jeremy Allison <jra at samba.org> wrote:
> On Wed, Oct 24, 2012 at 10:17:20AM -0700, Richard Sharpe wrote:
>> > a change to the underlying cli_open code, it looks like. Probably a
>> > separate cli_opendir function should be created, but I am not sure
>> > that is useful.
>> >
>> > It might simply be better to delete those two tests.
>>
>> Even the equivalent test in the Samba4 version of smbtorture seems broken.
>>
>> Here is the open request in torture/basic/scanner.c:torture_nttrans_scan:
>>
>>         dnum = smbcli_open(cli->tree, "\\", O_RDONLY, DENY_NONE);
>>
>> And here is the block of code in smbcli_open that initializes the SMB:
>>
>>         open_parms.openx.level = RAW_OPEN_OPENX;
>>         open_parms.openx.in.flags = 0;
>>         open_parms.openx.in.open_mode = accessmode;
>>         open_parms.openx.in.search_attrs = FILE_ATTRIBUTE_SYSTEM |
>> FILE_ATTRIBUTE_HIDDEN;
>>         open_parms.openx.in.file_attrs = 0;
>> --------------------------------------------^^^^
>>         open_parms.openx.in.write_time = 0;
>>         open_parms.openx.in.open_func = openfn;
>>         open_parms.openx.in.size = 0;
>>         open_parms.openx.in.timeout = 0;
>>         open_parms.openx.in.fname = fname;
>>
>> As you can see, we insist that it is a file, not a directory.
>
> Quick and dirty fix - set FILE_ATTRIBUTE_DIRECTORY if
> the name ends in '\\' ? :-).

That would work ...

-- 
Regards,
Richard Sharpe
(何以解憂?唯有杜康。--曹操)


More information about the samba-technical mailing list