Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 25 Mar 2002 16:33:47 -0800 (PST)
From:      Matthew Dillon <dillon@apollo.backplane.com>
To:        Ted Cabeen <ted@impulse.net>
Cc:        freebsd-hackers@FreeBSD.ORG
Subject:   Re: Open bug reports with no action? 
Message-ID:  <200203260033.g2Q0Xlp83034@apollo.backplane.com>
References:  <200203230107.g2N17u864828@apollo.backplane.com>  <20020322225901.E39C9375E7@gray.impulse.net>  <20020325201934.78CB7375E7@gray.impulse.net>

next in thread | previous in thread | raw e-mail | index | archive | help

:
:The user should never use '--'.  The code just assigns the initial username or
:uid to the '--' argument so that it is associated with an argument.  I wanted
:an argument that wouldn't be accidentially tried by the user thus causing
:inconsistencies if they used both the '--' argument and a leading username or
:uid on the command line.  Also, using the '--' allowed me to preserve almost
:all of the current code and make the change simpler.  Would it help if there
:were some additional clarifying comments in the code?

    Well, I'm thinking more in regards to this hack only working once.
    i.e. if we had to do something similar to another parameter of pw
    we'd be stuck.

:>    What if we officially assigned an actual option letter like 'U' instead
:>    of '-'?  Another alternative would be to have a global ExactUser global
:>    that defaults to 0 and gets set to 1 if either -n or -u are explicitly
:>    specified.
:
:Those would work, but we might have problems we people using both an initial
:username/uid and a -U argument in the first solution.  See the following
:sample command line: 
:"pw userdel 10012 -U bob". 
:What do you do in this situation if there's a user named "10012" and no user
:with uid 10012?  Which user do you delete?  What about if there is a user 
:with uid 10012 but it's not bob?  The current code is pretty clean WRT 
:problems like this, and I wanted to make the patch as simple as possible.
:
:- -- 
:Ted Cabeen           http://www.pobox.com/~secabeen            ted@impulse.net 

    I think there may be some confusion.  I simply meant assigning an 
    official option that represents the default state of affairs,
    not actually require that you USE the option.  i.e. you could still
    use pw the way you've always used it for the fuzzy case.

						-Matt

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200203260033.g2Q0Xlp83034>