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

OVAL/sysctl: Fix offline mode #1996

Merged
merged 1 commit into from
Sep 5, 2023

Conversation

evgenyz
Copy link
Contributor

@evgenyz evgenyz commented Jul 8, 2023

The initial implementation was buggy: after correctly traversing prefixed PREFIX/proc/sys directory tree it would incorrectly read the data from the non-prefixed directory tree.

@evgenyz evgenyz added this to the 1.3.9 milestone Jul 8, 2023
@evgenyz evgenyz added the bugfix label Jul 8, 2023
@evgenyz
Copy link
Contributor Author

evgenyz commented Jul 8, 2023

Rawhide failure is related to #1997

@jan-cerny
Copy link
Member

@evgenyz I think we need a test to avoid this situation.

The initial implementation was buggy: after correctly traversing
prefixed PREFIX/proc/sys directory tree it would incorrectly read
the data from the non-prefixed directory tree.
@evgenyz
Copy link
Contributor Author

evgenyz commented Sep 5, 2023

@evgenyz I think we need a test to avoid this situation.

I've updated the test to cover that scenario.

@jan-cerny jan-cerny self-assigned this Sep 5, 2023
Copy link
Member

@jan-cerny jan-cerny left a comment

Choose a reason for hiding this comment

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

I have run the test locally and I have deep dive into the OVAL results produced by the test test_sysctl_probe_offline_mode.sh In the OVAL results I have seen this item:

        <system_data>
          <unix-sys:sysctl_item id="1749992" status="exists">
            <unix-sys:name>kernel.hostname</unix-sys:name>
            <unix-sys:value>fake.host.name.me</unix-sys:value>
          </unix-sys:sysctl_item>
        </system_data>

@jan-cerny jan-cerny merged commit d5807fb into OpenSCAP:maint-1.3 Sep 5, 2023
19 checks passed
@evgenyz evgenyz deleted the fix-sysctl-offline branch February 7, 2024 14:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants