opcoder0 / fanotify Goto Github PK
View Code? Open in Web Editor NEWFanotify API for Go
License: MIT License
Fanotify API for Go
License: MIT License
Find a way to unit test fanotify features. Explore if FUSE filesystems receives fanotify events.
The event / action fanotify.FileModified
returns incorrect PID in the event. The PID returned is the parent process PID instead of the PID of the process that modified the file. The same has been verified by test TestWithCapSysAdmFanotifyFileModified
.
=== RUN TestWithCapSysAdmFanotifyFileModified
fanotify_test.go:107: Watch Directory: /tmp/TestWithCapSysAdmFanotifyFileModified1468020745/001
fanotify_test.go:117: Test file created /tmp/TestWithCapSysAdmFanotifyFileModified1468020745/001/test.dat
fanotify_test.go:125:
Error Trace: /home/opcoder0/src/fanotify/fanotify_test.go:125
Error: Not equal:
expected: 10343
actual : 10335
Test: TestWithCapSysAdmFanotifyFileModified
--- FAIL: TestWithCapSysAdmFanotifyFileModified (0.00s)
From the audit logs it can be observed that the PID returned is the parent process ID -
type=SYSCALL msg=audit(1670211986.334:1029188): arch=c000003e syscall=231 a0=0 a1=e7 a2=3c a3=7ffdf4c30c6f items=0 ppid=10335 pid=10343 auid=1000 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=pts5 ses=2 comm="touch" exe="/usr/bin/touch" subj=unconfined key=(null)ARCH=x86_64 SYSCALL=exit_group AUID="opcoder0" UID="root" GID="root" EUID="root" SUID="root" FSUID="root" EGID="root" SGID="root" FSGID="root"
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.