diff options
author | wengang wang <wen.gang.wang@oracle.com> | 2009-02-10 06:27:51 +0300 |
---|---|---|
committer | J. Bruce Fields <bfields@citi.umich.edu> | 2009-03-19 00:30:50 +0300 |
commit | 4ac35c2f794503d3acda20d98e89cf63f6e94332 (patch) | |
tree | 00a5afc26c1c59cda2c9b88cb07db5fc26e08bf6 /lib/prio_tree.c | |
parent | e33d1ea60c3a17b8b5c2910b1eef4c1faf0ac450 (diff) | |
download | linux-4ac35c2f794503d3acda20d98e89cf63f6e94332.tar.xz |
nfsd(v2/v3): fix the failure of creation from HPUX client
sometimes HPUX nfs client sends a create request to linux nfs server(v2/v3).
the dump of the request is like:
obj_attributes
mode: value follows
set_it: value follows (1)
mode: 00
uid: no value
set_it: no value (0)
gid: value follows
set_it: value follows (1)
gid: 8030
size: value follows
set_it: value follows (1)
size: 0
atime: don't change
set_it: don't change (0)
mtime: don't change
set_it: don't change (0)
note that mode is 00(havs no rwx privilege even for the owner) and it requires
to set size to 0.
as current nfsd(v2/v3) implementation, the server does mainly 2 steps:
1) creates the file in mode specified by calling vfs_create().
2) sets attributes for the file by calling nfsd_setattr().
at step 2), it finally calls file system specific setattr() function which may
fail when checking permission because changing size needs WRITE privilege but
it has none since mode is 000.
for this case, a new file created, we may simply ignore the request of
setting size to 0, so that WRITE privilege is not needed and the open
succeeds.
Signed-off-by: Wengang Wang <wen.gang.wang@oracle.com>
--
vfs.c | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Diffstat (limited to 'lib/prio_tree.c')
0 files changed, 0 insertions, 0 deletions