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

Compare mount by value instead of reference #413

Merged
merged 1 commit into from
May 7, 2024

Conversation

NymanRobin
Copy link
Contributor

This has to be since the mounts are reloaded each time a mount is added.
In case of two mounts mounting at the same time there will be a race condition for applying policy.

I added the unit test in mountpoint for my sanity while developing and some kind of documentation of the issue.

This fixes issue #411

Copy link
Member

@josephlr josephlr left a comment

Choose a reason for hiding this comment

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

Looks good. Thank you for submitting this

go.mod Outdated Show resolved Hide resolved
filesystem/mountpoint_test.go Outdated Show resolved Hide resolved
@NymanRobin
Copy link
Contributor Author

Thanks for the comments, I fixed them now!

filesystem/mountpoint_test.go Outdated Show resolved Hide resolved
filesystem/mountpoint_test.go Outdated Show resolved Hide resolved
go.mod Outdated Show resolved Hide resolved
filesystem/mountpoint_test.go Outdated Show resolved Hide resolved
filesystem/mountpoint_test.go Outdated Show resolved Hide resolved
actions/policy.go Show resolved Hide resolved
This has to be since the mounts are reloaded
each time a mount is added. In case of two
mounts mounting at the same time there will
be a race condition for applying policy.

Signed-off-by: NymanRobin <[email protected]>
@NymanRobin
Copy link
Contributor Author

NymanRobin commented May 2, 2024

Thanks for the comments @ebiggers, I fixed up the stuff. Hope it looks good now :)

@ebiggers ebiggers merged commit 068b9f8 into google:master May 7, 2024
8 checks passed
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