Giter Site home page Giter Site logo

fanotify's People

Contributors

opcoder0 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

capnspacehook

fanotify's Issues

Unit test features

Find a way to unit test fanotify features. Explore if FUSE filesystems receives fanotify events.

FileModified returns incorrect PID

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"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.