-
Notifications
You must be signed in to change notification settings - Fork 14.1k
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
Linux post libs comments and specs #19682
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @h00die for adding documentation and specs. I just added a couple of comments.
return Rex::Version.new(package_version) | ||
elsif ['redhat', 'fedora'].include?(info[:distro]) | ||
package_version = cmd_exec("rpm -q #{package}") | ||
return nil if package_version.include?('is not installed') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't tested it, but I'm wondering if rpm
returns a message in English on a non-English installation.
This also applies to the system commands called in this method.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good thinking, I'm not sure
Appreciate, I'm going to get specs working for all the linux post libs before putting this up for official review. Good question about language though |
While this is in draft, it's going to be a little bit of a headache, lots of stuff going on. prob not worth reviewing till its out of draft tbh |
Ready for review, 5 tests are failing for more or less the same thing. @smcintyre-r7 was trying to help me with this, but I'll need more help getting Mocking the |
This PR does a few things for linux post libs:
packages
module which can be used to check what version of a package is installed. Ubuntu needrestart LPE (CVE-2024-48990) #19676 (comment)