Date: Thu, 27 Apr 2000 01:20:04 -0700 (PDT) From: Anatoly Vorobey <mellon@pobox.com> To: freebsd-doc@freebsd.org Subject: Re: docs/18243: a mistake in sh.1 Message-ID: <200004270820.BAA53534@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR docs/18243; it has been noted by GNATS. From: Anatoly Vorobey <mellon@pobox.com> To: Sheldon Hearn <sheldonh@uunet.co.za> Cc: FreeBSD-gnats-submit@FreeBSD.ORG, martin@FreeBSD.ORG Subject: Re: docs/18243: a mistake in sh.1 Date: Thu, 27 Apr 2000 04:12:46 -0400 You, Sheldon Hearn, were spotted writing this on Thu, Apr 27, 2000 at 09:54:07AM +0200: > > On Thu, 27 Apr 2000 01:40:57 GMT, mellon@pobox.com wrote: > > > .It Fl p Li privileged > > Turn on privileged mode. This mode is enabled on startup > > if either the effective user or group id is not equal to the > > -real user or group id. Turning this mode off sets the > > +real user or group id. Turning this mode on sets the > > effective user and group ids to the real user and group ids. > > Weird, I don't get this at all. My take on the code is that it should > say something like: > > Set the effective user and group ids > to the real user and group ids respectively > if this option is enabled on startup. > > The existing text doesn't make any sense to me. Am I right with my > description? Yes. The option exists to guard against suid shell scripts (I presume) by denying the shell any privileges it has from the suid bit. The existing text, however, intends to describe both the effect of the option and the general effect of the shell running suid. It calls the former "turning the option on" and the latter "enabling the option" referring to *different* things by these which is damn confusing. If the shell is running suid, a different profile file is sourced and $ENV is ignored -- both regardless of the -p option -- and the text tries to explain this. I think the description of different behavior under suid should be put elsewhere earlier in the manpage, and referred to as running in the privileged mode, while -p should be described as you did together with stating that it only works in privileged mode. There's no point in describing -p as "turning the privileged mode on" anyway because it would be typically used to take extra privileges away rather than enable them. If you can hack this, more power to you! I tried to rewrite this paragraph coherently, but gave up soon; thus the fix in my PR only fixed the most obvious error, while secretly hoping people'll notice the general stylistic conundrum. It worked ;) -- Anatoly Vorobey, mellon@pobox.com http://pobox.com/~mellon/ "Angels can fly because they take themselves lightly" - G.K.Chesterton To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-doc" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200004270820.BAA53534>