diff options
author | Felix Blyakher <felixb@sgi.com> | 2009-02-03 11:38:41 -0500 |
---|---|---|
committer | Felix Blyakher <felixb@sgi.com> | 2009-02-03 11:38:41 -0500 |
commit | 6d2160bfe7826aca1c94b4bca77093908a452ae7 (patch) | |
tree | 8153fcd8a7c467e5de136f312e8ef5b27bea9d6b /fs/nfsd | |
parent | f0e0059b9c18426cffdcc04161062251a8f9741e (diff) | |
parent | b1792e367053968f2ddb48bc911d314143ce6242 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 into for-linus
Diffstat (limited to 'fs/nfsd')
-rw-r--r-- | fs/nfsd/Kconfig | 80 | ||||
-rw-r--r-- | fs/nfsd/auth.c | 3 | ||||
-rw-r--r-- | fs/nfsd/nfs4state.c | 1 |
3 files changed, 83 insertions, 1 deletions
diff --git a/fs/nfsd/Kconfig b/fs/nfsd/Kconfig new file mode 100644 index 000000000000..44d7d04dab95 --- /dev/null +++ b/fs/nfsd/Kconfig | |||
@@ -0,0 +1,80 @@ | |||
1 | config NFSD | ||
2 | tristate "NFS server support" | ||
3 | depends on INET | ||
4 | select LOCKD | ||
5 | select SUNRPC | ||
6 | select EXPORTFS | ||
7 | select NFS_ACL_SUPPORT if NFSD_V2_ACL | ||
8 | help | ||
9 | Choose Y here if you want to allow other computers to access | ||
10 | files residing on this system using Sun's Network File System | ||
11 | protocol. To compile the NFS server support as a module, | ||
12 | choose M here: the module will be called nfsd. | ||
13 | |||
14 | You may choose to use a user-space NFS server instead, in which | ||
15 | case you can choose N here. | ||
16 | |||
17 | To export local file systems using NFS, you also need to install | ||
18 | user space programs which can be found in the Linux nfs-utils | ||
19 | package, available from http://linux-nfs.org/. More detail about | ||
20 | the Linux NFS server implementation is available via the | ||
21 | exports(5) man page. | ||
22 | |||
23 | Below you can choose which versions of the NFS protocol are | ||
24 | available to clients mounting the NFS server on this system. | ||
25 | Support for NFS version 2 (RFC 1094) is always available when | ||
26 | CONFIG_NFSD is selected. | ||
27 | |||
28 | If unsure, say N. | ||
29 | |||
30 | config NFSD_V2_ACL | ||
31 | bool | ||
32 | depends on NFSD | ||
33 | |||
34 | config NFSD_V3 | ||
35 | bool "NFS server support for NFS version 3" | ||
36 | depends on NFSD | ||
37 | help | ||
38 | This option enables support in your system's NFS server for | ||
39 | version 3 of the NFS protocol (RFC 1813). | ||
40 | |||
41 | If unsure, say Y. | ||
42 | |||
43 | config NFSD_V3_ACL | ||
44 | bool "NFS server support for the NFSv3 ACL protocol extension" | ||
45 | depends on NFSD_V3 | ||
46 | select NFSD_V2_ACL | ||
47 | help | ||
48 | Solaris NFS servers support an auxiliary NFSv3 ACL protocol that | ||
49 | never became an official part of the NFS version 3 protocol. | ||
50 | This protocol extension allows applications on NFS clients to | ||
51 | manipulate POSIX Access Control Lists on files residing on NFS | ||
52 | servers. NFS servers enforce POSIX ACLs on local files whether | ||
53 | this protocol is available or not. | ||
54 | |||
55 | This option enables support in your system's NFS server for the | ||
56 | NFSv3 ACL protocol extension allowing NFS clients to manipulate | ||
57 | POSIX ACLs on files exported by your system's NFS server. NFS | ||
58 | clients which support the Solaris NFSv3 ACL protocol can then | ||
59 | access and modify ACLs on your NFS server. | ||
60 | |||
61 | To store ACLs on your NFS server, you also need to enable ACL- | ||
62 | related CONFIG options for your local file systems of choice. | ||
63 | |||
64 | If unsure, say N. | ||
65 | |||
66 | config NFSD_V4 | ||
67 | bool "NFS server support for NFS version 4 (EXPERIMENTAL)" | ||
68 | depends on NFSD && PROC_FS && EXPERIMENTAL | ||
69 | select NFSD_V3 | ||
70 | select FS_POSIX_ACL | ||
71 | select RPCSEC_GSS_KRB5 | ||
72 | help | ||
73 | This option enables support in your system's NFS server for | ||
74 | version 4 of the NFS protocol (RFC 3530). | ||
75 | |||
76 | To export files using NFSv4, you need to install additional user | ||
77 | space programs which can be found in the Linux nfs-utils package, | ||
78 | available from http://linux-nfs.org/. | ||
79 | |||
80 | If unsure, say N. | ||
diff --git a/fs/nfsd/auth.c b/fs/nfsd/auth.c index c903e04aa217..5573508f707f 100644 --- a/fs/nfsd/auth.c +++ b/fs/nfsd/auth.c | |||
@@ -49,6 +49,8 @@ int nfsd_setuser(struct svc_rqst *rqstp, struct svc_export *exp) | |||
49 | new->fsuid = exp->ex_anon_uid; | 49 | new->fsuid = exp->ex_anon_uid; |
50 | new->fsgid = exp->ex_anon_gid; | 50 | new->fsgid = exp->ex_anon_gid; |
51 | gi = groups_alloc(0); | 51 | gi = groups_alloc(0); |
52 | if (!gi) | ||
53 | goto oom; | ||
52 | } else if (flags & NFSEXP_ROOTSQUASH) { | 54 | } else if (flags & NFSEXP_ROOTSQUASH) { |
53 | if (!new->fsuid) | 55 | if (!new->fsuid) |
54 | new->fsuid = exp->ex_anon_uid; | 56 | new->fsuid = exp->ex_anon_uid; |
@@ -85,6 +87,7 @@ int nfsd_setuser(struct svc_rqst *rqstp, struct svc_export *exp) | |||
85 | new->cap_effective = cap_raise_nfsd_set(new->cap_effective, | 87 | new->cap_effective = cap_raise_nfsd_set(new->cap_effective, |
86 | new->cap_permitted); | 88 | new->cap_permitted); |
87 | put_cred(override_creds(new)); | 89 | put_cred(override_creds(new)); |
90 | put_cred(new); | ||
88 | return 0; | 91 | return 0; |
89 | 92 | ||
90 | oom: | 93 | oom: |
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index 88db7d3ec120..b6f60f48e94b 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c | |||
@@ -2871,7 +2871,6 @@ nfsd4_lockt(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, | |||
2871 | file_lock.fl_owner = (fl_owner_t)lockt->lt_stateowner; | 2871 | file_lock.fl_owner = (fl_owner_t)lockt->lt_stateowner; |
2872 | file_lock.fl_pid = current->tgid; | 2872 | file_lock.fl_pid = current->tgid; |
2873 | file_lock.fl_flags = FL_POSIX; | 2873 | file_lock.fl_flags = FL_POSIX; |
2874 | file_lock.fl_lmops = &nfsd_posix_mng_ops; | ||
2875 | 2874 | ||
2876 | file_lock.fl_start = lockt->lt_offset; | 2875 | file_lock.fl_start = lockt->lt_offset; |
2877 | file_lock.fl_end = last_byte_offset(lockt->lt_offset, lockt->lt_length); | 2876 | file_lock.fl_end = last_byte_offset(lockt->lt_offset, lockt->lt_length); |