[lkml]   [2014]   [Dec]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: fanotify bug on gdb -- hard crash
    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!

     \ /
      Last update: 2014-12-31 01:41    [W:5.120 / U:0.188 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site