Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update tests for file_groupownership_sshd_private_key #12896

Merged
merged 1 commit into from
Jan 27, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
#!/bin/bash
# platform = multi_platform_ol,multi_platform_rhel
{{% set dedicated_ssh_groupname = groups.get("dedicated_ssh_keyowner", {}).get("name", "root") %}}

if ! grep -q ssh_keys /etc/group; then
groupadd ssh_keys
if ! grep -q "{{{ dedicated_ssh_groupname }}}" /etc/group; then
groupadd "{{{ dedicated_ssh_groupname }}}"
fi

FAKE_KEY=$(mktemp -p /etc/ssh/ XXXX_key)
chgrp ssh_keys "$FAKE_KEY"
chgrp "{{{ dedicated_ssh_groupname }}}" "$FAKE_KEY"
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
#!/bin/bash
# platform = multi_platform_ol,multi_platform_rhel
{{% set dedicated_ssh_groupname = groups.get("dedicated_ssh_keyowner", {}).get("name", "root") %}}

test_group="cac_testgroup"
groupadd $test_group

FAKE_KEY=$(mktemp -p /etc/ssh/ XXXX_key)
chgrp ssh_keys "$FAKE_KEY"
chgrp {{{ dedicated_ssh_groupname }}} "$FAKE_KEY"

FAKE_KEY2=$(mktemp -p /etc/ssh/ XXXX_key)
chgrp $test_group "$FAKE_KEY2"
Loading