Re: Device file events
John Ogness <[email protected]>
| Newsgroups | gmane.linux.dazuko.devel |
|---|---|
| Message-ID | <[email protected]> |
Abhishek Nayani wrote: > Currently, Dazuko only supports "Open" and "Exec" events on 2.6 using LSM. Since dazuko registers the "inode_permission" hook, all the events which are generated are because of open or exec, which are what we need. Can you expand on what you mean by "many" events ? I have included a simple patch that will allow all the file types to generate events. I recommend that you try it out and see how many events (particularly directory events) are generated. Then you will understand what I mean by "many". > Also, the context switches happen only when the user registers for the dev directory, so I guess they do not come into the picture unless the user actually wants to listen to them. Yes, you are correct. If you try allowing all file types, you will see the number events. I found this alarming (and a bit misleading for the registered application), so I decided to filter out all non-file or non-link events. John Ogness -- Dazuko Maintainer _______________________________________________ Dazuko-devel mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/dazuko-devel
dazuko_alltypes.patch
(text/x-patch, 547 B)
Index: dazuko_linux26.c =================================================================== RCS file: /cvsroot/dazuko/dazuko/dazuko_linux26.c,v retrieving revision 1.60 diff -u -r1.60 dazuko_linux26.c --- dazuko_linux26.c 2 Sep 2005 13:09:08 -0000 1.60 +++ dazuko_linux26.c 13 Sep 2005 13:59:28 -0000 @@ -371,10 +371,12 @@ if (xfs->inode == NULL) return 0; +/* #ifndef DAZUKO_FIST if (!S_ISREG(xfs->inode->i_mode) && !S_ISLNK(xfs->inode->i_mode)) return 0; #endif +*/ if (xfs->nd == NULL || xfs->free_full_filename) return 0;