efs crud
authorBill Joy <root@ucbvax.Berkeley.EDU>
Fri, 16 Jul 1982 11:50:13 +0000 (03:50 -0800)
committerBill Joy <root@ucbvax.Berkeley.EDU>
Fri, 16 Jul 1982 11:50:13 +0000 (03:50 -0800)
SCCS-vsn: sys/kern/vfs_lookup.c 4.17
SCCS-vsn: sys/ufs/ffs/ufs_lookup.c 4.17
SCCS-vsn: sys/ufs/ufs/ufs_lookup.c 4.17

usr/src/sys/kern/vfs_lookup.c
usr/src/sys/ufs/ffs/ufs_lookup.c
usr/src/sys/ufs/ufs/ufs_lookup.c

index dafd7d4..453264e 100644 (file)
@@ -1,4 +1,4 @@
-/*     vfs_lookup.c    4.16    82/06/07        */
+/*     vfs_lookup.c    4.17    82/07/15        */
 
 /* merged into kernel: @(#)nami.c 2.3 4/8/82 */
 
 
 /* merged into kernel: @(#)nami.c 2.3 4/8/82 */
 
 #include "../h/buf.h"
 #include "../h/conf.h"
 
 #include "../h/buf.h"
 #include "../h/conf.h"
 
+#ifdef EFS
+extern int     efs_major;
+#endif
+
 /*
  * Convert a pathname into a pointer to
  * a locked inode.
 /*
  * Convert a pathname into a pointer to
  * a locked inode.
@@ -90,6 +94,17 @@ dirloop:
         * must have X permission.
         * cp is a path name relative to that directory.
         */
         * must have X permission.
         * cp is a path name relative to that directory.
         */
+#ifdef EFS
+       /*
+        * But first, if the last component was a character special file
+        * and the major device is the extended file system device
+        * then return even if more pathname exists.
+        */
+       if ((dp->i_mode & IFMT) == IFCHR && major(dp->i_rdev) == efs_major) {
+               brelse(nbp);
+               return(dp);
+       }
+#endif
        if ((dp->i_mode&IFMT) != IFDIR)
                u.u_error = ENOTDIR;
        (void) access(dp, IEXEC);
        if ((dp->i_mode&IFMT) != IFDIR)
                u.u_error = ENOTDIR;
        (void) access(dp, IEXEC);
index b321279..2b99dd9 100644 (file)
@@ -1,4 +1,4 @@
-/*     ufs_lookup.c    4.16    82/06/07        */
+/*     ufs_lookup.c    4.17    82/07/15        */
 
 /* merged into kernel: @(#)nami.c 2.3 4/8/82 */
 
 
 /* merged into kernel: @(#)nami.c 2.3 4/8/82 */
 
 #include "../h/buf.h"
 #include "../h/conf.h"
 
 #include "../h/buf.h"
 #include "../h/conf.h"
 
+#ifdef EFS
+extern int     efs_major;
+#endif
+
 /*
  * Convert a pathname into a pointer to
  * a locked inode.
 /*
  * Convert a pathname into a pointer to
  * a locked inode.
@@ -90,6 +94,17 @@ dirloop:
         * must have X permission.
         * cp is a path name relative to that directory.
         */
         * must have X permission.
         * cp is a path name relative to that directory.
         */
+#ifdef EFS
+       /*
+        * But first, if the last component was a character special file
+        * and the major device is the extended file system device
+        * then return even if more pathname exists.
+        */
+       if ((dp->i_mode & IFMT) == IFCHR && major(dp->i_rdev) == efs_major) {
+               brelse(nbp);
+               return(dp);
+       }
+#endif
        if ((dp->i_mode&IFMT) != IFDIR)
                u.u_error = ENOTDIR;
        (void) access(dp, IEXEC);
        if ((dp->i_mode&IFMT) != IFDIR)
                u.u_error = ENOTDIR;
        (void) access(dp, IEXEC);
index b321279..2b99dd9 100644 (file)
@@ -1,4 +1,4 @@
-/*     ufs_lookup.c    4.16    82/06/07        */
+/*     ufs_lookup.c    4.17    82/07/15        */
 
 /* merged into kernel: @(#)nami.c 2.3 4/8/82 */
 
 
 /* merged into kernel: @(#)nami.c 2.3 4/8/82 */
 
 #include "../h/buf.h"
 #include "../h/conf.h"
 
 #include "../h/buf.h"
 #include "../h/conf.h"
 
+#ifdef EFS
+extern int     efs_major;
+#endif
+
 /*
  * Convert a pathname into a pointer to
  * a locked inode.
 /*
  * Convert a pathname into a pointer to
  * a locked inode.
@@ -90,6 +94,17 @@ dirloop:
         * must have X permission.
         * cp is a path name relative to that directory.
         */
         * must have X permission.
         * cp is a path name relative to that directory.
         */
+#ifdef EFS
+       /*
+        * But first, if the last component was a character special file
+        * and the major device is the extended file system device
+        * then return even if more pathname exists.
+        */
+       if ((dp->i_mode & IFMT) == IFCHR && major(dp->i_rdev) == efs_major) {
+               brelse(nbp);
+               return(dp);
+       }
+#endif
        if ((dp->i_mode&IFMT) != IFDIR)
                u.u_error = ENOTDIR;
        (void) access(dp, IEXEC);
        if ((dp->i_mode&IFMT) != IFDIR)
                u.u_error = ENOTDIR;
        (void) access(dp, IEXEC);