set mnt_maxsymlinklen to a non-zero value so that COMPAT_43 routines
authorKirk McKusick <mckusick@ucbvax.Berkeley.EDU>
Mon, 13 Jul 1992 02:06:59 +0000 (18:06 -0800)
committerKirk McKusick <mckusick@ucbvax.Berkeley.EDU>
Mon, 13 Jul 1992 02:06:59 +0000 (18:06 -0800)
will know that we are setting the d_type field in directories (and can zero it
for unsuspecting binaries)

SCCS-vsn: sys/nfs/nfs_vfsops.c 7.43

usr/src/sys/nfs/nfs_vfsops.c

index 95f3aaa..801206f 100644 (file)
@@ -7,7 +7,7 @@
  *
  * %sccs.include.redist.c%
  *
  *
  * %sccs.include.redist.c%
  *
- *     @(#)nfs_vfsops.c        7.42 (Berkeley) %G%
+ *     @(#)nfs_vfsops.c        7.43 (Berkeley) %G%
  */
 
 #include "param.h"
  */
 
 #include "param.h"
@@ -352,10 +352,18 @@ mountnfs(argp, mp, nam, pth, hst, vpp)
                error = EPERM;
                goto bad;
        }
                error = EPERM;
                goto bad;
        }
-       if ((nmp->nm_flag & (NFSMNT_RDIRALOOK | NFSMNT_LEASETERM)) &&
-           (nmp->nm_flag & NFSMNT_NQNFS) == 0) {
-               error = EPERM;
-               goto bad;
+       if (nmp->nm_flag & (NFSMNT_RDIRALOOK | NFSMNT_LEASETERM)) {
+               if ((nmp->nm_flag & NFSMNT_NQNFS) == 0) {
+                       error = EPERM;
+                       goto bad;
+               }
+               /*
+                * We have to set mnt_maxsymlink to a non-zero value so
+                * that COMPAT_43 routines will know that we are setting
+                * the d_type field in directories (and can zero it for
+                * unsuspecting binaries).
+                */
+               mp->mnt_maxsymlinklen = 1;
        }
        nmp->nm_timeo = NFS_TIMEO;
        nmp->nm_retry = NFS_RETRANS;
        }
        nmp->nm_timeo = NFS_TIMEO;
        nmp->nm_retry = NFS_RETRANS;