mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2024-12-12 10:04:14 +02:00
Fix conflicting group in test containers.
The tests expect the group name/id to match between the host system and the container. If there is a conflict rename the group with the required id to the expected name. This could have unintended consequences but it seems reasonably safe since we control everything that runs in the container and there should never be any system processes running.
This commit is contained in:
parent
1e6efd73e1
commit
d24180e4da
@ -617,6 +617,12 @@ sub containerBuild
|
||||
" echo 'PubkeyAcceptedAlgorithms=+ssh-rsa,ssh-rsa-cert-v01\@openssh.com' >> /etc/ssh/sshd_config";
|
||||
}
|
||||
|
||||
# Rename existing group that would conflict with our group name. This is pretty hacky but should be OK since we are the
|
||||
# only thing running in the container.
|
||||
$strScript .= sectionHeader() .
|
||||
"# Rename conflicting group\n" .
|
||||
' sed -i s/.*\:x\:' . TEST_GROUP_ID . '\:$/' . TEST_GROUP . '\:x\:' . TEST_GROUP_ID . "\:/ /etc/group";
|
||||
|
||||
$strScript .= sectionHeader() .
|
||||
"# Create test user\n" .
|
||||
' ' . groupCreate($strOS, TEST_GROUP, TEST_GROUP_ID) . " && \\\n" .
|
||||
|
Loading…
Reference in New Issue
Block a user