Sample Header Ad - 728x90

How to intercept file descriptor of file opened with inotify or others on access?

0 votes
1 answer
574 views
I just finished an Operating Systems course at my University, and I want to start playing with systems level programs with Rust. One of things I'm looking for is how to intercept a file descriptor of a file opened in a folder, and swap the file it is pointing to a new file. I think I can figure it out with a bunch of the inotify tools and crates for Rust, as well as just calling some libc functions for syscalls myself, but I'm running into issues with understanding the Linux Virtual File System. Is there like a book that explains exactly how commands such as find operate on files, and how the files are structured? I downloaded the source code for the coreutils, but I'm struggling with determining what the file struct in Linux looks like. I know asking for books or resources is against some rules or something, but I can't seem to find a definitive resource on how the kernel and utilities work together. I'm just getting started with Open Source OS development, although I am very comfortable with using Unix-based systems. Any help guiding me in the right direction would be much appreciated. Cheers!
Asked by Matanya (197 rep)
Dec 10, 2021, 02:25 PM
Last activity: Dec 10, 2021, 04:47 PM