-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tools/opensnoop: Display mode for -e, --extended_fields
When a program creates a file with mode=0000, it cannot even access the file itself. It would be helpful if we could track the mode value. so we can know who did it. Example: open("a.txt", O_WRONLY | O_EXCL | O_CREAT, 0000); Then: $ ls -l a.txt ----------. 1 rongtao rongtao 0 Jan 24 09:07 a.txt $ cat a.txt cat: a.txt: Permission denied $ sudo ./opensnoop.py -e PID COMM FD ERR FLAGS MODE PATH 673067 open 3 0 00000301 0000 a.txt ^^^^ Signed-off-by: Rong Tao <[email protected]>
- Loading branch information
Showing
2 changed files
with
43 additions
and
26 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