1. 08 8月, 2013 4 次提交
    • C
      NFS: Never use user credentials for lease renewal · 73d8bde5
      Chuck Lever 提交于
      Never try to use a non-UID 0 user credential for lease management,
      as that credential can change out from under us.  The server will
      block NFSv4 lease recovery with NFS4ERR_CLID_INUSE.
      
      Since the mechanism to acquire a credential for lease management
      is now the same for all minor versions, replace the minor version-
      specific callout with a single function.
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      73d8bde5
    • C
      NFS: Use root's credential for lease management when keytab is missing · d688f7b8
      Chuck Lever 提交于
      Commit 05f4c350 "NFS: Discover NFSv4 server trunking when mounting"
      Fri Sep 14 17:24:32 2012 introduced Uniform Client String support,
      which forces our NFS client to establish a client ID immediately
      during a mount operation rather than waiting until a user wants to
      open a file.
      
      Normally machine credentials (eg. from a keytab) are used to perform
      a mount operation that is protected by Kerberos.  Before 05fc350,
      SETCLIENTID used a machine credential, or fell back to a regular
      user's credential if no keytab is available.
      
      On clients that don't have a keytab, performing SETCLIENTID early
      means there's no user credential to fall back on, since no regular
      user has kinit'd yet.  05f4c350 seems to have broken the ability
      to mount with sec=krb5 on clients that don't have a keytab in
      kernels 3.7 - 3.10.
      
      To address this regression, commit 4edaa308 (NFS: Use "krb5i" to
      establish NFSv4 state whenever possible), Sat Mar 16 15:56:20 2013,
      was merged in 3.10.  This commit forces the NFS client to fall back
      to AUTH_SYS for lease management operations if no keytab is
      available.
      
      Neil Brown noticed that, since root is required to kinit to do a
      sec=krb5 mount when a client doesn't have a keytab, we can try to
      use root's Kerberos credential before AUTH_SYS.
      
      Now, when determining a principal and flavor to use for lease
      management, the NFS client tries in this order:
      
        1.  Flavor: AUTH_GSS, krb5i
            Principal: service principal (via keytab)
      
        2.  Flavor: AUTH_GSS, krb5i
            Principal: user principal established for UID 0 (via kinit)
      
        3.  Flavor: AUTH_SYS
            Principal: UID 0 / GID 0
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      d688f7b8
    • T
      NFSv4: Refuse mount attempts with proto=udp · 6da1a034
      Trond Myklebust 提交于
      RFC3530 disallows the use of udp as a transport protocol for NFSv4.
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      6da1a034
    • J
      nfs: verify open flags before allowing an atomic open · 9597c13b
      Jeff Layton 提交于
      Currently, you can open a NFSv4 file with O_APPEND|O_DIRECT, but cannot
      fcntl(F_SETFL,...) with those flags. This flag combination is explicitly
      forbidden on NFSv3 opens, and it seems like it should also be on NFSv4.
      Reported-by: NChao Ye <cye@redhat.com>
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      9597c13b
  2. 25 7月, 2013 1 次提交
    • T
      NFSv4: Fix nfs4_init_uniform_client_string for net namespaces · 55b59293
      Trond Myklebust 提交于
      Commit 6f2ea7f2 (NFS: Add nfs4_unique_id boot parameter) introduces a
      boot parameter that allows client administrators to set a string
      identifier for use by the EXCHANGE_ID and SETCLIENTID arguments in order
      to make them more globally unique.
      
      Unfortunately, that uniquifier is no longer globally unique in the presence
      of net namespaces, since each container expects to be able to set up their
      own lease when mounting a new NFSv4/4.1 partition.
      The fix is to add back in the container-specific hostname in addition to
      the unique id.
      
      Cc: Chuck Lever <chuck.lever@oracle.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      55b59293
  3. 24 7月, 2013 5 次提交
  4. 18 7月, 2013 1 次提交
  5. 10 7月, 2013 4 次提交
  6. 05 7月, 2013 1 次提交
  7. 04 7月, 2013 3 次提交
  8. 29 6月, 2013 12 次提交
  9. 20 6月, 2013 2 次提交
  10. 19 6月, 2013 4 次提交
  11. 09 6月, 2013 3 次提交