Skip to content

Conversation

@mpurg
Copy link
Contributor

@mpurg mpurg commented Apr 29, 2024

Description:

  • Changed the value for logout from '' to [''].

Rationale:

  • For the logout setting to work, the value has to be an array.

@openshift-ci openshift-ci bot added the needs-ok-to-test Used by openshift-ci bot. label Apr 29, 2024
@openshift-ci
Copy link

openshift-ci bot commented Apr 29, 2024

Hi @mpurg. Thanks for your PR.

I'm waiting for a ComplianceAsCode member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

For the `logout` setting to work, the value has to be an array.
@mpurg mpurg force-pushed the fix_dconf_ctrlaltdel branch from 54a98e4 to ec6fd39 Compare April 29, 2024 12:12
@github-actions
Copy link

Start a new ephemeral environment with changes proposed in this pull request:

rhel8 (from CTF) Environment (using Fedora as testing environment)
Open in Gitpod

Fedora Testing Environment
Open in Gitpod

Oracle Linux 8 Environment
Open in Gitpod

@github-actions
Copy link

github-actions bot commented Apr 29, 2024

This datastream diff is auto generated by the check Compare DS/Generate Diff

Click here to see the full diff
New content has different text for rule 'xccdf_org.ssgproject.content_rule_dconf_gnome_disable_ctrlaltdel_reboot'.
--- xccdf_org.ssgproject.content_rule_dconf_gnome_disable_ctrlaltdel_reboot
+++ xccdf_org.ssgproject.content_rule_dconf_gnome_disable_ctrlaltdel_reboot
@@ -9,10 +9,10 @@
          
 To configure the system to ignore the Ctrl-Alt-Del key sequence
 from the Graphical User Interface (GUI) instead of rebooting the system,
-add or set logout to '' in
+add or set logout to [''] in
 /etc/dconf/db/local.d/00-security-settings. For example:
 [org/gnome/settings-daemon/plugins/media-keys]
-logout=''
+logout=['']
 Once the settings have been added, add a lock to
 /etc/dconf/db/local.d/locks/00-security-settings-lock to prevent
 user modification. For example:

bash remediation for rule 'xccdf_org.ssgproject.content_rule_dconf_gnome_disable_ctrlaltdel_reboot' differs.
--- xccdf_org.ssgproject.content_rule_dconf_gnome_disable_ctrlaltdel_reboot
+++ xccdf_org.ssgproject.content_rule_dconf_gnome_disable_ctrlaltdel_reboot
@@ -27,7 +27,7 @@
     printf '%s\n' "[org/gnome/settings-daemon/plugins/media-keys]" >> ${DCONFFILE}
 fi
 
-escaped_value="$(sed -e 's/\\/\\\\/g' <<< "''")"
+escaped_value="$(sed -e 's/\\/\\\\/g' <<< "['']")"
 if grep -q "^\\s*logout\\s*=" "${DCONFFILE}"
 then
         sed -i "s/\\s*logout\\s*=\\s*.*/logout=${escaped_value}/g" "${DCONFFILE}"

ansible remediation for rule 'xccdf_org.ssgproject.content_rule_dconf_gnome_disable_ctrlaltdel_reboot' differs.
--- xccdf_org.ssgproject.content_rule_dconf_gnome_disable_ctrlaltdel_reboot
+++ xccdf_org.ssgproject.content_rule_dconf_gnome_disable_ctrlaltdel_reboot
@@ -20,7 +20,7 @@
     dest: /etc/dconf/db/local.d/00-security-settings
     section: org/gnome/settings-daemon/plugins/media-keys
     option: logout
-    value: ''''''
+    value: '['''']'
     create: true
     no_extra_spaces: true
   when:

@github-actions
Copy link

github-actions bot commented Apr 29, 2024

🤖 A k8s content image for this PR is available at:
ghcr.io/complianceascode/k8scontent:11913
This image was built from commit: ec6fd39

Click here to see how to deploy it

If you alread have Compliance Operator deployed:
utils/build_ds_container.py -i ghcr.io/complianceascode/k8scontent:11913

Otherwise deploy the content and operator together by checking out ComplianceAsCode/compliance-operator and:
CONTENT_IMAGE=ghcr.io/complianceascode/k8scontent:11913 make deploy-local

@qlty-cloud-legacy
Copy link

Code Climate has analyzed commit ec6fd39 and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 100.0% (50% is the threshold).

This pull request will bring the total coverage in the repository to 59.4% (0.0% change).

View more on Code Climate.

@dodys dodys requested a review from a team April 29, 2024 16:12
@dodys dodys self-assigned this Apr 29, 2024
@dodys dodys added Ubuntu Ubuntu product related. ok-to-test Used by openshift-ci bot. and removed needs-ok-to-test Used by openshift-ci bot. labels Apr 29, 2024
@dodys
Copy link
Contributor

dodys commented Apr 30, 2024

/packit test

@dodys
Copy link
Contributor

dodys commented Apr 30, 2024

/packit build

Copy link
Contributor

@dodys dodys left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, thanks!

@dodys dodys merged commit 0c4bba8 into ComplianceAsCode:master Apr 30, 2024
@Mab879 Mab879 added the Update Rule Issues or pull requests related to Rules updates. label May 16, 2024
@Mab879 Mab879 added this to the 0.1.74 milestone May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ok-to-test Used by openshift-ci bot. Ubuntu Ubuntu product related. Update Rule Issues or pull requests related to Rules updates.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants