tests: Enable su tests under vanilla Ansible >= 2.11
cwd_show was useful when debugging these tests, worth keeping around.pull/1032/head
parent
e2f4d9275c
commit
2973d90670
@ -0,0 +1,22 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# Show permissions and identities that impact the current working directory.
|
||||||
|
# On macOS libc cwd() can return EACCES after su or sudo.
|
||||||
|
# See also
|
||||||
|
# - https://github.com/ansible/ansible/pull/7078
|
||||||
|
# - https://github.com/python/cpython/issues/115911
|
||||||
|
|
||||||
|
set -o errexit
|
||||||
|
set -o nounset
|
||||||
|
set -o pipefail
|
||||||
|
|
||||||
|
whoami
|
||||||
|
groups
|
||||||
|
pwd
|
||||||
|
|
||||||
|
d=$(pwd)
|
||||||
|
while [[ "$d" != "/" && -n "$d" ]]; do
|
||||||
|
ls -ld "$d"
|
||||||
|
d=$(dirname "$d")
|
||||||
|
done
|
||||||
|
ls -ld /
|
Loading…
Reference in New Issue