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

Reduce excessive log messages from authorized_keys table implementation #7318

Merged
merged 1 commit into from
Sep 28, 2021

Conversation

nabilschear
Copy link
Contributor

This table implementation produces a lot of unneeded error messages for files that don't exist when cross joining against all users on a system:

$ osqueryi "select * from authorized_keys cross join users"
W0922 13:52:54.039000 354004480 glog_logger.cpp:34] Cannot open file for reading: /Users/nabil/.ssh/authorized_keys2

This PR introduces a check to see if the file exists before attempting to open it. If there's no file, it will continue silently.

@nabilschear nabilschear requested review from a team as code owners September 22, 2021 20:54
@nabilschear
Copy link
Contributor Author

@theopolis this one is an easy one

@mike-myers-tob mike-myers-tob added easy logging ready for review Pull requests that are ready to be reviewed by a maintainer user experience labels Sep 28, 2021
@mike-myers-tob mike-myers-tob changed the title reduce excessive log messages from authorized_keys table implementation Reduce excessive log messages from authorized_keys table implementation Sep 28, 2021
Copy link
Member

@zwass zwass left a comment

Choose a reason for hiding this comment

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

This totally makes sense. I had no idea we were just assuming a file existed at the expected path.

@directionless directionless merged commit 0b8efe1 into osquery:master Sep 28, 2021
@nabilschear nabilschear deleted the sshlogging branch September 29, 2021 23:36
@mike-myers-tob mike-myers-tob removed the ready for review Pull requests that are ready to be reviewed by a maintainer label Oct 6, 2021
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.

4 participants