diff options
author | Julian Elischer <julian@FreeBSD.org> | 1999-06-30 02:53:51 +0000 |
---|---|---|
committer | Julian Elischer <julian@FreeBSD.org> | 1999-06-30 02:53:51 +0000 |
commit | c1f020038b13593280b1fe23a75a1f23c524b12f (patch) | |
tree | 79673b1e526ff2919fea38bb1dc026de2a6437d8 /sys/nfsclient/nfs_vnops.c | |
parent | 3e478b390108aa3ca980a30512c6c91573ef9884 (diff) | |
download | src-c1f020038b13593280b1fe23a75a1f23c524b12f.tar.gz src-c1f020038b13593280b1fe23a75a1f23c524b12f.zip |
Submitted by: Conrad Minshall <conrad@apple.com>
Reviewed by: Matthew Dillon <dillon@apollo.backplane.com>
The following ugly hack to the exit path of nfs_readlinkrpc() circumvents
an Auspex bug: for symlinks longer than 112 (0x70) they return a 1024 byte
xdr string - the correct data with many nulls appended. Without this fix
namei returns ENAMETOOLONG, at least it does on our source base and on
FreeBSD 3.0. Note we do not (and should not) rely upon their null padding.
Notes
Notes:
svn path=/head/; revision=48357
Diffstat (limited to 'sys/nfsclient/nfs_vnops.c')
-rw-r--r-- | sys/nfsclient/nfs_vnops.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/nfsclient/nfs_vnops.c b/sys/nfsclient/nfs_vnops.c index f146631f3bb2..c01e7bcd130b 100644 --- a/sys/nfsclient/nfs_vnops.c +++ b/sys/nfsclient/nfs_vnops.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)nfs_vnops.c 8.16 (Berkeley) 5/27/95 - * $Id: nfs_vnops.c,v 1.132 1999/06/26 02:46:32 mckusick Exp $ + * $Id: nfs_vnops.c,v 1.133 1999/06/28 12:34:40 peter Exp $ */ @@ -1009,6 +1009,11 @@ nfs_readlinkrpc(vp, uiop, cred) nfsm_postop_attr(vp, attrflag); if (!error) { nfsm_strsiz(len, NFS_MAXPATHLEN); + if (len == NFS_MAXPATHLEN) { + struct nfsnode *np = VTONFS(vp); + if (np->n_size && np->n_size < NFS_MAXPATHLEN) + len = np->n_size; + } nfsm_mtouio(uiop, len); } nfsm_reqdone; |