04 Oct, 2006

4 commits

  • It is legal to have zero-length NFSv4 acls; they just deny everything.

    Also, nfs4_acl_nfsv4_to_posix will always return with pacl and dpacl set on
    success, so the caller doesn't need to check this.

    Signed-off-by: J. Bruce Fields
    Signed-off-by: Neil Brown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    J.Bruce Fields
     
  • There's no need to handle the case where the caller passes in null for pacl or
    dpacl; no caller does that, because it would be a dumb thing to do.

    Signed-off-by: J. Bruce Fields
    Signed-off-by: Neil Brown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    J.Bruce Fields
     
  • We can be a little more flexible about the flags allowed for inheritance (in
    particular, we can deal with either the presence or the absence of
    INHERIT_ONLY), but we should probably reject other combinations that we don't
    understand.

    Signed-off-by: J. Bruce Fields
    Signed-off-by: Neil Brown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    J.Bruce Fields
     
  • Use a different nfsv4->(draft posix) acl mapping which is
    1. completely backwards compatible,
    2. accepts any nfsv4 acl, and
    3. errs on the side of restricting permissions.

    In detail:

    1. completely backwards compatible: The new mapping produces the
    same result on any acl produced by the existing (draft
    posix)->nfsv4 mapping; the one exception is that we no longer
    attempt to guess the value of the mask by assuming certain denies
    represent the mask. Since the server still keeps track of the mask
    locally, sequences of chmod's will still be handled fine; the only
    thing this will change is sequences of chmod's with intervening
    read-modify-writes of the acl. That last case just isn't worth the
    trouble and the possible misrepresentations of the user's intent
    (if we guess that a certain deny indicates masking is in effect
    when it really isn't).

    2. accepts any nfsv4 acl: That's not quite true: we still reject
    acls that use combinations of inheritance flags that we don't
    support. We also reject acls that attempt to explicitly deny
    read_acl or read_attributes permissions, or that attempt to deny
    write_acl or write_attributes permissions to the owner of the file.

    3. errs on the side of restricting permissions: one exception to
    this last rule: we totally ignore some bits (write_owner,
    synchronize, read_named_attributes, etc.) that are completely alien
    to our filesystem semantics, in some cases even if that would mean
    ignoring an explicit deny that we have no intention of enforcing.
    Excepting that, the posix acl produced should be the most
    permissive acl that is not more permissive than the given nfsv4
    acl.

    And the new code's shorter, too. Neato.

    Signed-off-by: J. Bruce Fields
    Signed-off-by: Neil Brown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    J.Bruce Fields
     

11 Apr, 2006

2 commits

  • We're returning -1 in a few places in the NFSv4POSIX acl translation code
    where we could return a reasonable error.

    Also allows some minor simplification elsewhere.

    Signed-off-by: J. Bruce Fields
    Signed-off-by: Neil Brown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    NeilBrown
     
  • this fixes coverity id #3. Coverity detected dead code, since the == -1
    comparison only returns 0 or 1 to error. Therefore the if ( error < 0 )
    statement was always false. Seems that this was an if( error = nfs4... )
    statement some time ago, which got broken during cleanup.

    Signed-off-by: Eric Sesterhenn
    Signed-off-by: J. Bruce Fields
    Signed-off-by: Neil Brown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    NeilBrown
     

24 Mar, 2006

1 commit

  • Use ARRAY_SIZE macro instead of sizeof(x)/sizeof(x[0]) and remove a
    duplicate of ARRAY_SIZE. Some trailing whitespaces are also deleted.

    Signed-off-by: Tobias Klauser
    Cc: David Howells
    Cc: Dave Kleikamp
    Acked-by: Trond Myklebust
    Cc: Neil Brown
    Cc: Chris Mason
    Cc: Jeff Mahoney
    Cc: Christoph Hellwig
    Cc: Nathan Scott
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Tobias Klauser
     

24 Jun, 2005

1 commit


17 Apr, 2005

1 commit

  • Initial git repository build. I'm not bothering with the full history,
    even though we have it. We can create a separate "historical" git
    archive of that later if we want to, and in the meantime it's about
    3.2GB when imported into git - space that would just make the early
    git days unnecessarily complicated, when we don't have a lot of good
    infrastructure for it.

    Let it rip!

    Linus Torvalds