334f0b89be
For the `ex container` case, there's no security issues here; one shouldn't be doing user management in these roots at all. This is for work on exporting `ex container` roots to OCI as non-root. Without this fix, libostree just tries to `openat()` the object for export to tar, and fails. See also https://github.com/projectatomic/rpm-ostree/issues/1045 Closes: #1046 Approved by: jlebon
19 lines
367 B
Bash
Executable File
19 lines
367 B
Bash
Executable File
#!/usr/bin/bash
|
|
set -xeuo pipefail
|
|
|
|
cd ${test_tmpdir}
|
|
|
|
dn=$(cd $(dirname $0) && pwd)
|
|
. ${dn}/../common/libtest-core.sh
|
|
|
|
cat >bash.conf <<EOF
|
|
[tree]
|
|
ref=bash
|
|
packages=coreutils;bash;
|
|
repos=fedora;
|
|
EOF
|
|
|
|
rpm-ostree ex container assemble bash.conf
|
|
ostree --repo=repo ls bash /usr/etc/shadow > shadowls.txt
|
|
assert_file_has_content shadowls.txt '^-00400 .*/usr/etc/shadow'
|