Fixing "-k" in S4 smbtorture.

Matthieu Patou mat at samba.org
Thu May 20 13:35:29 MDT 2010


On 20/05/2010 23:20, Jeremy Allison wrote:
> On Thu, May 20, 2010 at 11:08:53PM +0400, Matthieu Patou wrote:
>    
>> On 20/05/2010 22:30, Jeremy Allison wrote:
>>      
>>> On Thu, May 20, 2010 at 10:24:34PM +0400, Matthieu Patou wrote:
>>>        
>>>> Hi jeremy, it's a good idea but this command line parsing is also used in a lot of s4 utilities and if i read the patch well it will break scripts that use -k yes or -k 1 not 100 pleasant for admin among them me :-)
>>>>          
>>> That's why I was asking :-). Are there any cases where anyone
>>> used "-k no" ? I don't see the point of that option :-).
>>>
>>> No arguing that people might have done it, but if they
>>> did then I'll just fix the "usage" argument to save people
>>> lots of time if they're wondering why "-k foo" doesn't work
>>> when "foo" is part of another option.
>>>
>>>        
>> So as far as I am concerned I didn't use it (just -k 1 when it's
>> needed), if you keep the option -k 1|yes and also -k .
>>      
> That's the problem. With the current code you can't have
> just "-k" meaning "use kerberos". You have to have "-k 1"
> or "-k yes" or "-k true", *unless the -k is at the end of
> the command line option line* ! This is what makes no sense,
> it's position dependent on the command line.
>
>    
Exactly, I now remember that I have script with smbclient that have -k 
at the end and it works. At the opposite ldbsearch/ldbedit do not accept 
to have -k at the end, so you have to specify -k 1 !
> Otherwise it fails with a completely opaque error message
> that means "I confused the next option with a bool and
> can't figure that out" - not that it *tells* you that,
> of course :-).
>
>    
Yeah for this is so true I've been trapped by this problem 2/3 times
> Jeremy.
>    


-- 
Matthieu Patou
Samba Team        http://samba.org



More information about the samba-technical mailing list