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

Fixed race conditions for log writing and minor bugs in parser.go #58

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

annab-stripe
Copy link

  • I've read and understood the Contributing guidelines and have done my best effort to follow them.
  • I've read and agree to the Code of Conduct.
  • I've been mindful about doing atomic commits, adding documentation to my changes, not refactoring too much.
  • I've a descriptive title and added any useful information for the reviewer. Where appropriate, I've attached a screenshot and/or screencast (gif preferrably).
  • I've written tests to cover the new code and functionality included in this PR.
  • I've read, agree to, and signed the Contributor License Agreement (CLA).

PR Summary

  • Added a mutex to AuditWriter in order to avoid a race condition.

  • Added a function rotate to use the mutex to rotate logs.

  • Modified tests accordingly to the previous changes and used an atomic.LoadUint32 for n.seq.

  • Added the syscall JSON parameter in order for it to appear in AuditMessageGroup.

  • Added 1305 to the AddMessage switch in order to not map the uid for that message.

Related Issues

None

Test strategy

Modified the tests in order to work with the mutex changes. Tested in a test environment to verify the 'syscall' parameter was appearing in the JSON struct.

@CLAassistant
Copy link

CLAassistant commented Jul 30, 2019

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@nbrownus
Copy link
Collaborator

👋 @annab-stripe thanks for the PR. Can you do the CLA bit for us?

@annab-stripe
Copy link
Author

Hi, somebody from Stripe legal team signed one for me an year ago.

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