NFS: Add secinfo procedure

This patch adds the nfs4 operation secinfo as a
valid nfs rpc operation.

Signed-off-by: Bryan Schumaker <bjschuma@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
This commit is contained in:
Bryan Schumaker
2011-03-24 17:12:29 +00:00
committed by Trond Myklebust
parent 7c5130588d
commit 5a5ea0d485
4 changed files with 208 additions and 0 deletions

View File

@@ -3,6 +3,7 @@
#include <linux/nfsacl.h>
#include <linux/nfs3.h>
#include <linux/sunrpc/gss_api.h>
/*
* To change the maximum rsize and wsize supported by the NFS client, adjust
@@ -14,6 +15,9 @@
#define NFS_DEF_FILE_IO_SIZE (4096U)
#define NFS_MIN_FILE_IO_SIZE (1024U)
/* Forward declaration for NFS v3 */
struct nfs4_secinfo_flavors;
struct nfs_fsid {
uint64_t major;
uint64_t minor;
@@ -936,6 +940,38 @@ struct nfs4_fs_locations_res {
struct nfs4_sequence_res seq_res;
};
struct nfs4_secinfo_oid {
unsigned int len;
char data[GSS_OID_MAX_LEN];
};
struct nfs4_secinfo_gss {
struct nfs4_secinfo_oid sec_oid4;
unsigned int qop4;
unsigned int service;
};
struct nfs4_secinfo_flavor {
unsigned int flavor;
struct nfs4_secinfo_gss gss;
};
struct nfs4_secinfo_flavors {
unsigned int num_flavors;
struct nfs4_secinfo_flavor flavors[0];
};
struct nfs4_secinfo_arg {
const struct nfs_fh *dir_fh;
const struct qstr *name;
struct nfs4_sequence_args seq_args;
};
struct nfs4_secinfo_res {
struct nfs4_secinfo_flavors *flavors;
struct nfs4_sequence_res seq_res;
};
#endif /* CONFIG_NFS_V4 */
struct nfstime4 {
@@ -1118,6 +1154,7 @@ struct nfs_rpc_ops {
struct iattr *iattr);
int (*init_client) (struct nfs_client *, const struct rpc_timeout *,
const char *, rpc_authflavor_t, int);
int (*secinfo)(struct inode *, const struct qstr *, struct nfs4_secinfo_flavors *);
};
/*