Fixing "-k" in S4 smbtorture.

Jeremy Allison jra at
Thu May 20 13:20:12 MDT 2010

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.

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 :-).


More information about the samba-technical mailing list