Skip to content

syscall errors #401

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

Merged
merged 4 commits into from
Oct 22, 2014
Merged

syscall errors #401

merged 4 commits into from
Oct 22, 2014

Conversation

cgzones
Copy link
Contributor

@cgzones cgzones commented Oct 22, 2014

display errno and strerror(errno) on syscall failures

@ddpbsd
Copy link
Member

ddpbsd commented Oct 22, 2014

My access to github is odd at the moment, so I can't comment on the code directly.
I'm curious as to why you changed "Unable" to "Could not." (No complaints or anything, just curious)
Also in src/error_messages/error_messages.h line 27 I'm guessing it should be "Could not."

@cgzones
Copy link
Contributor Author

cgzones commented Oct 22, 2014

@ddpbsd thanks for your feedback:

@ddpbsd
Copy link
Member

ddpbsd commented Oct 22, 2014

I'm fine with either "Could not" or "unable," I was just curious.

@@ -128,7 +128,7 @@ int k_import(const char *cmdimport)
{
if (mkstemp_ex(tmp_path))
{
ErrorExit(MKSTEMP_ERROR, ARGV0, tmp_path);
exit(1);
Copy link
Member

Choose a reason for hiding this comment

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

What is going on here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In mkstemp_ex() a message is generated or isn't log2file() something different then merror()?

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, it is true that errors get logged in mkstemp_ex() but I would still keep this error message around here in case the upstream code changes for some reason and stops making those errors for whatever reason. Hopefully, that makes sense. Sure it is a little redundant but I'd rather this than not knowing what happened.

ddpbsd added a commit that referenced this pull request Oct 22, 2014
@ddpbsd ddpbsd merged commit ce8c951 into ossec:master Oct 22, 2014
@cgzones cgzones deleted the syscall_errors branch October 22, 2014 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants