Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
x/sys/unix: add support for FAN_REPORT_FID #35799
The const is already there since https://golang.org/cl/175158:
Is there anything else needed to use this API?
@tklauser @ianlancetaylor Hi all. Yes not all structures are present and there is no helper func to get fanotify events.
The structs are needed:
A function that can read this structs from a memory, the unsafe magic and reaf buffers,
Initial unix.FanotifyEventMetadata can be read with binary.Read, for example like this.
The problem lies with extra structs that come after initial unix.FanotifyEventMetadata then fanotify is used with FAN_REPORT_FID flag. This structs can have offset (padding) and part of this struct needs to be passed to unix.OpenByHandleAt to get FD of a opened fanotify file.
All of this looks quite a challenge at least for me :)