That looks much better.  I think CLIP compliance was expected.

Cstyle nit, lines 89-95: case statements should be aligned with the
        enclosing switch statement.

                                        -JZ

> Date: Fri, 20 Feb 2009 15:57:58 +0100
> From: Bart Blanquart <Bart.Blanquart at sun.com>
> 
> On 02/20/09 06:26, Scott Rotondo wrote:
> >> I originally coded it using getopt, but that fails to handle "auths 
> >> -ab username" correctly, as it can't tell if the "b" is the argument 
> >> to "-a" or a (non-existant) option.
> > 
> > This is a significant issue. Whether or not you use getopt() in the 
> > implementation, the command syntax should be getopt-compliant. In other 
> > words, the example above should check if the user has the authorization 
> > called "b". The easiest way to achieve getopt-compliance, of course, is 
> > to use getopt().
> 
> On 02/19/09 23:02, Jeffrey Hutzelman wrote:
>  > No, that's unambiguous.  If -a takes an argument, it _cannot_ be
>  > followed by other options in the same word; in "-ab", "b" is _always_
>  > the argument to -a.
> 
> Thanks for the feedback.
> 
> I find the way getopt() does the concatenated option+argument odd (hence 
> why I wrote the version that was up for review to require a space 
> between the option and argument), but as allowing such concatenated 
> seems to be the expected behaviour:
> 
> an updated webrev is now available at
> http://cr.opensolaris.org/~bartbl/6251549
> 
> and its testing output is available at
> http://cr.opensolaris.org/~bartbl/6251549-testing
> 
> 
> Bart
> _______________________________________________
> security-discuss mailing list
> security-discuss at opensolaris.org
> 

Reply via email to