On Mon, 2014-12-29 at 13:06 +0800, ivo welch wrote: > thank you, eric. will do. I read up on it above and now understand it > better.
Great let us know if it keeps giving you trouble! > the example in the man page seems somewhat misfortunate. I would use > an example that does not, by default, lock up the user system. > (perhaps add a second example with the _PERM feature that shows how it > responds.) The link you gave does respond and allow permissions: if (metadata->fd >= 0) { /* Handle open permission event */ if (metadata->mask & FAN_OPEN_PERM) { printf("FAN_OPEN_PERM: "); /* Allow file to be opened */ response.fd = metadata->fd; response.response = FAN_ALLOW; write(fd, &response, sizeof(struct fanotify_response)); } That's the key bit of the example... If you use gdb and never get to there, you are in a bit of trouble, I agree! -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/