4 Commits

Author SHA1 Message Date
Rainer Gerhards
1fc8a08c6f
testbench: fix privdrop tests under root user
When running under root, the privdrop tests did not properly work. This
patch fixes the issue and skips test where necessary.

This also includes some modernization of the related tests.

closes https://github.com/rsyslog/rsyslog/issues/4619
2021-08-23 09:41:43 +02:00
Rainer Gerhards
2ba3c8ddde
testbench: modernize testbench plumbing
changes some of the test commands to use bash functions
includes some small bug fixes to tests where bugs were
previously not seen due to different plumbing.
2018-07-23 17:26:34 +02:00
Thomas D
35b838b13e testbench: Add missing exit calls to {faketime,privdrop}_common.sh
"diag.sh exit" just cleans up so we still have to end the tests when skipping
with a real exit on our own.
2016-04-19 00:00:00 +02:00
Thomas D
b1983d0951 Make privdrop tests more portable and robust
- Don't use $UID, use $EUID instead

- Allow user to specify testuser (through RSYSLOG_TESTUSER env variable)
  or fall back to various default users

- Validate if user running tests can really impersonate another user

- Test if testuser really exists

Fixes: https://github.com/rsyslog/rsyslog/issues/927
2016-04-15 13:34:52 +02:00