Darren J Moffat wrote:
[snip]
> The only way I think I can accept the creation of pfksh93 (and by the
> implications of this case this code base will be come that for
> /usr/bin/pfksh at some point) is if this case at least makes the current
> situation no worse than it already is

The situnation is IMO better than the old ksh since there are now
multiple ways to handle the "builtin vs. pfexec" issue in a clean and
predictable way, see below.

> (ie chown can't be a builtin when
> running as pfksh93) and ideally that the code to do the pfexec execution
> is implement in such away that it *always* executes the external
> binary rather than the shell builtin if there is a profile entry for
> that command for the euid of the shell.

IMO there is no need for such a change (and it would IMO very tricky to
do it without blowing some existing ksh93 scripts up). There are at
least three solutions for this problem:
1. Scripts can always load/enable/disable all builtin commands via the
"builtin" command, e.g. "builtin -d chown" will remove the builtin
"chown" and from this point the external command is used (you can use
this in subshells, too (which only affects subshells)). This is part of
the ksh93 language since a long time.
2. You can always specify the full path to the command (e.g.
/usr/bin/chown) to execute the external command. The builtin commands
are only used when you use the plain filename, e.g. "chown" which is
then searched in ${PATH}.
3. You can combine [2] with "alias", e.g. "alias chown=/usr/bin/chown"
will redict all calls of "chown" to "/usr/bin/chown", bypassing the
builtin version of "chown" until the alias entry is undone.

I hope this is acceptable for the ARC since playing around with the
builtins just because the shell is currently in "profile shell" mode is
the least desireable option (and both POSIX and the ksh93 lanuguage
itself provide a solution which is IMO sufficient).

----

Bye,
Roland

-- 
  __ .  . __
 (o.\ \/ /.o) roland.mainz at nrubsig.org
  \__\/\/__/  MPEG specialist, C&&JAVA&&Sun&&Unix programmer
  /O /==\ O\  TEL +49 641 7950090
 (;O/ \/ \O;)

Reply via email to