[lkml]   [2011]   [Apr]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [PATCH] vfs: Pass setxattr(2) flags properly
    On Wed, Apr 20, 2011 at 04:59:06PM -0700, Linus Torvalds wrote:
    > Hmm. This patch looks very sane, but it's been that way - ignoring the
    > 'flags' value - since 2009. Does anybody actually _use_ the flags
    > field?
    > Judging by commit 431547b3c453 (that introduced the thing), it looks
    > like a plain mistake, and the previous "flags" was replaced by a "0"
    > in the call when it added the "hander->flags" argument at the end. But
    > the fact that it's been two years, and nobody noticed, makes me go
    > "hmm.."

    It's not really used very much. The only use of XATTR_CREATE is to
    prevent creating the attrs used for ACLs from the normal xattrs
    interface instead of going through the ACL code, and XATTR_REPLACE
    is only used to return -ENOATTR when it's set but the attribute
    actually is empty.

    The first one could probably be used (by root) to create invalid
    attrs that confuse the ACL code, and the second may confuse application
    using it, although I doubt there are many.

     \ /
      Last update: 2011-04-21 05:11    [W:0.019 / U:114.432 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site