- Fix retval handling in bin_setopt()
- Don't skip_setuid / skip_setgid. It's not our place to optimize away noops
(that might not even _be_ noops; they might change the saved uid…).
- Remove HAVE_* guard checks around functions that are used unguarded elsewhere.
- Use bsd-setres_id.c from OpenSSH to provide setresuid() / setresgid()
everywhere, and thus simplify the ifdef soup. Fix some preëxisting
bugs in the macro definitions of setuid() (do we still need that one?).
- Fix zwarning() format codes for variadic arguments type safety
- Restored a comment from HEAD
- Fix failure modes around initgroups()
- Compared privilege restoration code with OpenSSH's permanently_drop_uid() and
updated as needed
- Add E01 PRIVILEGED sanity checks
There are now different sections, expressed by the first letter in the
scripts names:
A: basic command parsing and execution
B: builtins
C: shell commands with special syntax
D: substititution
E: options
V: modules
W: builtin interactive commands and constructs
X: line editing
Y: completion
Z: separate systems and user contributions
You will need to run these by using `make test' in the Test subdirectory of
the build area for your system (which may or may not be the same as the
Test subdirectory of the source tree), or the directory above. You can get
more information about the tests being performed with
ZTST_verbose=1 make check
(`test' is equivalent to `check') or change 1 to 2 for even more detail.
Individual or groups of tests can be performed with
make TESTNUM=C02 check
or
make TESTNUM=C check
to perform just the test beginning C02, or all tests beginning C,
respectively.
Instructions on how to write tests are given in B01cd.ztst, which acts as a
model.