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

Add Go bindflt/silo definitions #1331

Merged
merged 2 commits into from
Apr 4, 2022
Merged

Conversation

dcantah
Copy link
Contributor

@dcantah dcantah commented Mar 16, 2022

This change adds a couple Go bindings for calls and constants from bindfltapi.dll as well as some silo flags for job objects. Together these allow file bindings (think bind mounts on Linux) to be performed for a specific job object. The bindings
are only viewable from processes within that specific job.

This change additionally adds a couple unit tests for this behavior.

@dcantah dcantah requested a review from a team as a code owner March 16, 2022 21:51
@dcantah dcantah force-pushed the bind-support branch 3 times, most recently from 9a03287 to 5838c93 Compare March 16, 2022 23:16
@dcantah dcantah marked this pull request as draft March 16, 2022 23:16
@dcantah dcantah force-pushed the bind-support branch 3 times, most recently from 90f7760 to c692952 Compare March 16, 2022 23:53
@dcantah dcantah force-pushed the bind-support branch 5 times, most recently from 2a96657 to 43cb3a5 Compare March 21, 2022 17:20
@dcantah dcantah marked this pull request as ready for review March 21, 2022 18:04
internal/exec/exec_test.go Outdated Show resolved Hide resolved
Copy link
Contributor

@helsaawy helsaawy left a comment

Choose a reason for hiding this comment

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

I wonder if we should move this stuff to go-winio, since it isnt really container related (but it isnt IO related either ...)

internal/jobobject/jobobject.go Show resolved Hide resolved
internal/jobobject/jobobject.go Show resolved Hide resolved
internal/jobobject/jobobject.go Show resolved Hide resolved
@dcantah
Copy link
Contributor Author

dcantah commented Mar 23, 2022

I wonder if we should move this stuff to go-winio, since it isnt really container related (but it isnt IO related either ...)

@kevpar and I had talked about this before. I think it makes sense to me at least

@dcantah
Copy link
Contributor Author

dcantah commented Mar 24, 2022

Re-pushed as the CI was "stuck".. Edit: Back to regularly scheduled programming

This change adds a couple Go bindings for calls and constants from bindfltapi.dll
as well as some silo flags for job objects. Together these allow file bindings
(think bind mounts on Linux) to be performed for a specific job object. The bindings
are only viewable from processes within that specific job.

This change additionally adds a couple unit tests for this behavior.

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

dcantah commented Apr 1, 2022

@microsoft/containerplat Anyone able to take a second gander?

@anmaxvl anmaxvl self-assigned this Apr 1, 2022
Return error on file binding if stating the directory fails.

Signed-off-by: Daniel Canter <[email protected]>
@dcantah dcantah merged commit bedca74 into microsoft:master Apr 4, 2022
anmaxvl pushed a commit that referenced this pull request Feb 7, 2023
princepereira pushed a commit to princepereira/hcsshim that referenced this pull request Aug 29, 2024
* Add Go bindflt/silo definitions

This change adds a couple Go bindings for calls and constants from bindfltapi.dll
as well as some silo flags for job objects. Together these allow file bindings
(think bind mounts on Linux) to be performed for a specific job object. The bindings
are only viewable from processes within that specific job.

This additionally adds a couple unit tests for this behavior.

Signed-off-by: Daniel Canter <[email protected]>
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.

4 participants