-
Notifications
You must be signed in to change notification settings - Fork 259
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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]>
- Loading branch information
Showing
11 changed files
with
266 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package winapi | ||
|
||
const ( | ||
BINDFLT_FLAG_READ_ONLY_MAPPING uint32 = 0x00000001 | ||
BINDFLT_FLAG_MERGED_BIND_MAPPING uint32 = 0x00000002 | ||
BINDFLT_FLAG_USE_CURRENT_SILO_MAPPING uint32 = 0x00000004 | ||
) | ||
|
||
// HRESULT | ||
// BfSetupFilterEx( | ||
// _In_ ULONG Flags, | ||
// _In_opt_ HANDLE JobHandle, | ||
// _In_opt_ PSID Sid, | ||
// _In_ LPCWSTR VirtualizationRootPath, | ||
// _In_ LPCWSTR VirtualizationTargetPath, | ||
// _In_reads_opt_( VirtualizationExceptionPathCount ) LPCWSTR* VirtualizationExceptionPaths, | ||
// _In_opt_ ULONG VirtualizationExceptionPathCount | ||
// ); | ||
// | ||
//sys BfSetupFilterEx(flags uint32, jobHandle windows.Handle, sid *windows.SID, virtRootPath *uint16, virtTargetPath *uint16, virtExceptions **uint16, virtExceptionPathCount uint32) (hr error) = bindfltapi.BfSetupFilterEx? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
20 changes: 20 additions & 0 deletions
20
test/vendor/github.com/Microsoft/hcsshim/internal/winapi/bindflt.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
1 change: 1 addition & 0 deletions
1
test/vendor/github.com/Microsoft/hcsshim/internal/winapi/jobobject.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
test/vendor/github.com/Microsoft/hcsshim/internal/winapi/winapi.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.