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

Fix: "Reboot Required" detection process in scan/redhat.go #534

Merged
merged 1 commit into from
Nov 8, 2017

Conversation

mai346
Copy link
Contributor

@mai346 mai346 commented Nov 4, 2017

What did you implement:

Closes #533

How did you implement it:

If "kernel" can not be found, we set the return value of "rebootRequired ()" to false.
ERROR was changed to WARN.

How can we verify it:

Scan the environment (container or paravirtualized environment) where the "kernel" is not installed.

Todos:

You don't have to satisfy all of the following.

  • Write tests
  • Write documentation
  • Check that there aren't other open pull requests for the same issue/feature
  • Format your source code by make fmt
  • Pass the test by make test
  • Provide verification config / commands
  • Enable "Allow edits from maintainers" for this PR
  • Update the messages below

Is this ready for review?: NO
Is it a breaking change?: NO

@kotakanbe
Copy link
Member

Memo:

CentOS7 on Docker/Mac

[root@dfde34229d36 /]# rpm -q --last kernel
package                                       kernel is not installed

@kotakanbe
Copy link
Member

kotakanbe commented Nov 6, 2017

@mai346
What is the output of rpm -q --last kernel on your paravirtualized environment?

If its output is also kernel is not installed, it may be better to add if statement and compare it with kernel is not installed, and return false.

@mai346
Copy link
Contributor Author

mai346 commented Nov 7, 2017

@kotakanbe
The definition of paravirtualization may be ambiguous, but the same result is obtained except that the message becomes Japanese. (LANG=ja_JP.UTF-8)

  • CentOS 7.4 on Windows Subsystem for Linux / Windows 10 RS3
  • CentOS 6.0 on coLinux 0.7.4 / WinXP

I think that it is better not to judge by stdout.

@kotakanbe kotakanbe merged commit 59b0812 into future-architect:master Nov 8, 2017
@kotakanbe
Copy link
Member

Many Thanks!

I tested on centos7/docker-mac.

@kotakanbe kotakanbe added the bug label Nov 8, 2017
@mai346 mai346 deleted the FixRebootRequired branch November 8, 2017 12:32
kotakanbe added a commit that referenced this pull request Nov 15, 2017
* master:
  Fix yum changelog option (#543)
  Update README.md (#542)
  Fix false positive: ignore oval info when kernel major version is different. (#541)
  Fix: Misdetection of OvalMatch for CentOS and Scientific in oval/util.go (#536)
  Fix: "Reboot Required" detection process in scan/redhat.go (#534)
  Remove README.fr.md because unable to maintenance..
  README Typo Update (#538)
  Insert `sudo` only at the beginning of command in deep scan #495 (#539)
  Fix config.toml validation (#537)
  Add pseudo server type for non-ssh scanning (only cpe scan) #512 (#531)
  README Update (#530)
  Update README
  send slack msg by api (#525)
  fix typo Privious -> Previous (#523)
  Fix package query fails on debian based container (#519) (#522)
  fix typo from "enviroment" to "environment" (#518)
  Fix typo in config/jsonloader.go (#517)
  Modified Spell Miss of "README.md". (#516)
  Fix .goreleaser.yml
  Fix a bug of making channels when fill oval information via HTTP (#514)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants