diff options
author | Andreas Gruenbacher <agruen@suse.de> | 2005-06-22 13:16:26 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2005-06-22 16:07:23 -0400 |
commit | a257cdd0e2179630d3201c32ba14d7fcb3c3a055 (patch) | |
tree | accf4139050690a65f3f2600355cbcd1a602663b /fs/nfsd/nfssvc.c | |
parent | 9ba02638e4be28dd4ff724202a640264427c62d1 (diff) |
[PATCH] NFSD: Add server support for NFSv3 ACLs.
This adds functions for encoding and decoding POSIX ACLs for the NFSACL
protocol extension, and the GETACL and SETACL RPCs. The implementation is
compatible with NFSACL in Solaris.
Signed-off-by: Andreas Gruenbacher <agruen@suse.de>
Acked-by: Olaf Kirch <okir@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfsd/nfssvc.c')
-rw-r--r-- | fs/nfsd/nfssvc.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/fs/nfsd/nfssvc.c b/fs/nfsd/nfssvc.c index 02ded7cfbdcf..79b25b19fec8 100644 --- a/fs/nfsd/nfssvc.c +++ b/fs/nfsd/nfssvc.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <linux/nfsd/stats.h> | 31 | #include <linux/nfsd/stats.h> |
32 | #include <linux/nfsd/cache.h> | 32 | #include <linux/nfsd/cache.h> |
33 | #include <linux/lockd/bind.h> | 33 | #include <linux/lockd/bind.h> |
34 | #include <linux/nfsacl.h> | ||
34 | 35 | ||
35 | #define NFSDDBG_FACILITY NFSDDBG_SVC | 36 | #define NFSDDBG_FACILITY NFSDDBG_SVC |
36 | 37 | ||
@@ -362,6 +363,31 @@ nfsd_dispatch(struct svc_rqst *rqstp, u32 *statp) | |||
362 | return 1; | 363 | return 1; |
363 | } | 364 | } |
364 | 365 | ||
366 | #if defined(CONFIG_NFSD_V2_ACL) || defined(CONFIG_NFSD_V3_ACL) | ||
367 | static struct svc_stat nfsd_acl_svcstats; | ||
368 | static struct svc_version * nfsd_acl_version[] = { | ||
369 | [2] = &nfsd_acl_version2, | ||
370 | [3] = &nfsd_acl_version3, | ||
371 | }; | ||
372 | |||
373 | #define NFSD_ACL_NRVERS (sizeof(nfsd_acl_version)/sizeof(nfsd_acl_version[0])) | ||
374 | static struct svc_program nfsd_acl_program = { | ||
375 | .pg_prog = NFS_ACL_PROGRAM, | ||
376 | .pg_nvers = NFSD_ACL_NRVERS, | ||
377 | .pg_vers = nfsd_acl_version, | ||
378 | .pg_name = "nfsd", | ||
379 | .pg_stats = &nfsd_acl_svcstats, | ||
380 | }; | ||
381 | |||
382 | static struct svc_stat nfsd_acl_svcstats = { | ||
383 | .program = &nfsd_acl_program, | ||
384 | }; | ||
385 | |||
386 | #define nfsd_acl_program_p &nfsd_acl_program | ||
387 | #else | ||
388 | #define nfsd_acl_program_p NULL | ||
389 | #endif /* defined(CONFIG_NFSD_V2_ACL) || defined(CONFIG_NFSD_V3_ACL) */ | ||
390 | |||
365 | extern struct svc_version nfsd_version2, nfsd_version3, nfsd_version4; | 391 | extern struct svc_version nfsd_version2, nfsd_version3, nfsd_version4; |
366 | 392 | ||
367 | static struct svc_version * nfsd_version[] = { | 393 | static struct svc_version * nfsd_version[] = { |
@@ -376,6 +402,7 @@ static struct svc_version * nfsd_version[] = { | |||
376 | 402 | ||
377 | #define NFSD_NRVERS (sizeof(nfsd_version)/sizeof(nfsd_version[0])) | 403 | #define NFSD_NRVERS (sizeof(nfsd_version)/sizeof(nfsd_version[0])) |
378 | struct svc_program nfsd_program = { | 404 | struct svc_program nfsd_program = { |
405 | .pg_next = nfsd_acl_program_p, | ||
379 | .pg_prog = NFS_PROGRAM, /* program number */ | 406 | .pg_prog = NFS_PROGRAM, /* program number */ |
380 | .pg_nvers = NFSD_NRVERS, /* nr of entries in nfsd_version */ | 407 | .pg_nvers = NFSD_NRVERS, /* nr of entries in nfsd_version */ |
381 | .pg_vers = nfsd_version, /* version table */ | 408 | .pg_vers = nfsd_version, /* version table */ |