[21215] in Athena Bugs
Re: sun4 [9.1.18]: add -r as root
daemon@ATHENA.MIT.EDU (Greg Hudson)
Thu Dec 19 08:05:53 2002
From: Greg Hudson <ghudson@MIT.EDU>
To: Jonathon Weiss <jweiss@mit.edu>
Cc: bugs@mit.edu
In-Reply-To: <200212191001.FAA23596@bearing-an-hourglass.mit.edu>
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
Date: 19 Dec 2002 08:01:38 -0500
Message-Id: <1040302898.10794.272.camel@error-messages.mit.edu>
Mime-Version: 1.0
On Thu, 2002-12-19 at 05:01, Jonathon Weiss wrote:
> What were you trying to do?
> add -r a locker to remove it from my path as root.
The problem here is that we set add_flags to "-a -h -n" for root. This
makes "add lockername" work, but breaks all add options and also breaks
"add pathname", although that last part strikes me as a bug in add.
(Dan assumed that if you passed any attach options to add, then you must
have wanted a locker.)
Presumably you got tokens because the -r overrode the -n, although I
would expect the lockers 'n' specification to override both.
Some possible solutions:
* Add a terminator for the add -a option (probably "--"), and change
root's add_flags to "-a -h -n --". That may require a fair amount of
judo in the option parsing code, unfortunately. And fix the add
pathname problem, of course.
* Or, look for a way to nuke root's add options without breaking the
common case:
- Do a sweep on filsys entries which are 'w', and fix them. (This
sweep would only have to be over software lockers, perhaps the ones in
/mit/outland/share/whiclocker/locker-list.) This obviates the need for
the "-n" flag. The down side is that there are 264 lockers which need
to be fixed.
- If the user has no wg file, don't display an error message about
getting zephyr subs. This obviates the need for the "-h" flag.