sh: Remove duplicate code resetting uid/gid for set +p/+o privileged.
authorPeter Avalos <pavalos@dragonflybsd.org>
Sat, 2 Jul 2011 23:47:49 +0000 (13:47 -1000)
committerPeter Avalos <pavalos@dragonflybsd.org>
Sun, 21 Aug 2011 19:10:24 +0000 (12:10 -0700)
commit1bf9817349b98799b92b1e764d4d0855695ce4ea
tree837241c08f0451befee0cc427e394e5a3a65b815
parent2b23d27fbc13178e19021a1914a077c3274954f2
sh: Remove duplicate code resetting uid/gid for set +p/+o privileged.

sh: Check setuid()/setgid() return values.

If the -p option is turned off, privileges from a setuid or setgid
binary are dropped. Make sure to check if this succeeds. If it
fails, this is an error which will cause the shell to abort except
in interactive mode or if 'command' was used to make 'set' or an
outer 'eval' or '.' non-special.

Obtained-from:   FreeBSD SVN rev 221011 & 221012
bin/sh/options.c