diff options
author | J. Bruce Fields <bfields@redhat.com> | 2014-06-20 17:52:21 +0200 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2014-07-08 23:14:23 +0200 |
commit | 52ee04330f585d1b5bc40442f07df07248fa3aee (patch) | |
tree | 6a176680872e4bc505cdf410645afe9252ad2619 /fs/nfsd/vfs.h | |
parent | nfsd: make NFSv2 null terminate symlink data (diff) | |
download | linux-52ee04330f585d1b5bc40442f07df07248fa3aee.tar.xz linux-52ee04330f585d1b5bc40442f07df07248fa3aee.zip |
nfsd: let nfsd_symlink assume null-terminated data
Currently nfsd_symlink has a weird hack to serve callers who don't
null-terminate symlink data: it looks ahead at the next byte to see if
it's zero, and copies it to a new buffer to null-terminate if not.
That means callers don't have to null-terminate, but they *do* have to
ensure that the byte following the end of the data is theirs to read.
That's a bit subtle, and the NFSv4 code actually got this wrong.
So let's just throw out that code and let callers pass null-terminated
strings; we've already fixed them to do that.
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd/vfs.h')
-rw-r--r-- | fs/nfsd/vfs.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfsd/vfs.h b/fs/nfsd/vfs.h index b84aef50f55d..20e4b6679e46 100644 --- a/fs/nfsd/vfs.h +++ b/fs/nfsd/vfs.h @@ -85,7 +85,7 @@ __be32 nfsd_write(struct svc_rqst *, struct svc_fh *,struct file *, __be32 nfsd_readlink(struct svc_rqst *, struct svc_fh *, char *, int *); __be32 nfsd_symlink(struct svc_rqst *, struct svc_fh *, - char *name, int len, char *path, int plen, + char *name, int len, char *path, struct svc_fh *res, struct iattr *); __be32 nfsd_link(struct svc_rqst *, struct svc_fh *, char *, int, struct svc_fh *); |