Don't canonicalize home directories that don't start with a slash
authorChristos Zoulas <christos@ucbvax.Berkeley.EDU>
Tue, 25 Jun 1991 12:54:17 +0000 (04:54 -0800)
committerChristos Zoulas <christos@ucbvax.Berkeley.EDU>
Tue, 25 Jun 1991 12:54:17 +0000 (04:54 -0800)
SCCS-vsn: bin/csh/dir.c 5.11

usr/src/bin/csh/dir.c

index 314bd03..2ee146b 100644 (file)
@@ -6,7 +6,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)dir.c      5.10 (Berkeley) %G%";
+static char sccsid[] = "@(#)dir.c      5.11 (Berkeley) %G%";
 #endif /* not lint */
 
 #include <sys/param.h>
 #endif /* not lint */
 
 #include <sys/param.h>
@@ -810,7 +810,7 @@ dcanon(cp, p)
     /*
      * See if we're not in a subdir of STRhome
      */
     /*
      * See if we're not in a subdir of STRhome
      */
-    if (p1 && *p1 &&
+    if (p1 && *p1 == '/' &&
        (Strncmp(p1, cp, cc) != 0 || (cp[cc] != '/' && cp[cc] != '\0'))) {
        static ino_t home_ino = -1;
        static dev_t home_dev = -1;
        (Strncmp(p1, cp, cc) != 0 || (cp[cc] != '/' && cp[cc] != '\0'))) {
        static ino_t home_ino = -1;
        static dev_t home_dev = -1;