Skip to content

Changed shell command#3328

Merged
mpreisler merged 1 commit intoComplianceAsCode:masterfrom
Mixer9:patch-1
Sep 19, 2018
Merged

Changed shell command#3328
mpreisler merged 1 commit intoComplianceAsCode:masterfrom
Mixer9:patch-1

Conversation

@Mixer9
Copy link
Copy Markdown
Contributor

@Mixer9 Mixer9 commented Sep 17, 2018

Description:

Changed the shell command per @cmattern-rht .

Rationale:

Not all values returned with rpm -Va | grep ^.M have the same number of fields and so the rpm --setperms was failing on those empty values. This will take the last value which is always the path that is needed.

Changed the shell command per @cmattern-rht .  Not all values returned with <code>rpm -Va | grep ^.M </code> have the same number of fields and so the <code>rpm --setperms</code> was failing on those empty values. This will take the last value which is always the path that is needed.
@openscap-ci
Copy link
Copy Markdown
Collaborator

Can one of the admins verify this patch?

@redhatrises
Copy link
Copy Markdown
Contributor

@openscap-ci test this please

@redhatrises redhatrises added the bugfix Fixes to reported bugs. label Sep 17, 2018
@scrutinizer-notifier
Copy link
Copy Markdown

The inspection completed: No new issues

@redhatrises redhatrises added this to the 0.1.41 milestone Sep 17, 2018
@mpreisler mpreisler self-assigned this Sep 18, 2018
@mpreisler
Copy link
Copy Markdown
Member

Looks great! Thank you for your contribution and welcome! :-). I will check that it works on all supported platforms and then merge.

@mpreisler
Copy link
Copy Markdown
Member

Tested the code and it works on Fedora 28, RHEL6 and RHEL7.

Before this gets merged, could you please also fix linux_os/guide/system/software/integrity/software-integrity/rpm_verification/rpm_verify_permissions/bash/shared.sh? Both are using the same code.

@cmattern-rht
Copy link
Copy Markdown

cmattern-rht commented Sep 18, 2018 via email

@Mixer9
Copy link
Copy Markdown
Contributor Author

Mixer9 commented Sep 18, 2018 via email

@jan-cerny jan-cerny mentioned this pull request Sep 19, 2018
@mpreisler mpreisler merged commit 36d8a08 into ComplianceAsCode:master Sep 19, 2018
Mixer9 added a commit to Mixer9/content that referenced this pull request Sep 19, 2018
This change has the same effect as ComplianceAsCode#3328 and potentially could return empty values based on number of field differences, using awk and printing the last field no matter how many fixes this issue.
@Mixer9 Mixer9 mentioned this pull request Sep 19, 2018
Mixer9 added a commit to Mixer9/content that referenced this pull request Sep 19, 2018
This change has the same effect as ComplianceAsCode#3328 and potentially could return empty values based on number of field differences, using awk and printing the last field no matter how many fixes this issue.
@Mixer9 Mixer9 mentioned this pull request Sep 19, 2018
@Mixer9 Mixer9 deleted the patch-1 branch September 25, 2018 19:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix Fixes to reported bugs.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants