-
Notifications
You must be signed in to change notification settings - Fork 578
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
unix: add FileHandle, NewFileHandle, NameToHandleAt, OpenByHandleAt
This adds wrappers around name_to_handle_at and open_by_handle_at. Requires root (or CAP_DAC_READ_SEARCH, rather) to run tests, which at least some of our builders have. bradfitz@go:~/src/golang.org/x/sys/unix$ go test -c && sudo ./unix.test -test.run=OpenBy -test.v=true === RUN TestOpenByHandleAt === RUN TestOpenByHandleAt/clone=false === RUN TestOpenByHandleAt/clone=true --- PASS: TestOpenByHandleAt (0.00s) syscall_linux_test.go:546: mountID: 22, handle: size=8, type=1, bytes="\x9e\x1e\b\x00~\x8c\xe5\x9d" --- PASS: TestOpenByHandleAt/clone=false (0.00s) syscall_linux_test.go:568: opened fd 3 --- PASS: TestOpenByHandleAt/clone=true (0.00s) syscall_linux_test.go:568: opened fd 3 PASS Fixes golang/go#30537 Change-Id: Ia48a8faab2fee665d88a16d81a3a0c1504b129ce Reviewed-on: https://go-review.googlesource.com/c/sys/+/173357 Run-TryBot: Brad Fitzpatrick <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]>
- Loading branch information
Showing
2 changed files
with
138 additions
and
0 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