diff options
author | 1998-08-07 01:56:11 +0000 | |
---|---|---|
committer | 1998-08-07 01:56:11 +0000 | |
commit | 10709f1c1dd4b6246dddc966f1296a0d5cb33cc1 (patch) | |
tree | fde0f1c0a30fc93cb352277041d9370a187191f0 | |
parent | Shrink kernels and make work for ramdisks better. (so they fit on floppy) (diff) | |
download | wireguard-openbsd-10709f1c1dd4b6246dddc966f1296a0d5cb33cc1.tar.xz wireguard-openbsd-10709f1c1dd4b6246dddc966f1296a0d5cb33cc1.zip |
Fix portal FS & PR #556
Basically, if file system consumes the slashes at the end of a component,
don't require that the component is a directory.
-rw-r--r-- | sys/kern/vfs_lookup.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/kern/vfs_lookup.c b/sys/kern/vfs_lookup.c index 109e144b36a..765d12444c1 100644 --- a/sys/kern/vfs_lookup.c +++ b/sys/kern/vfs_lookup.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vfs_lookup.c,v 1.14 1998/01/09 16:21:56 csapuntz Exp $ */ +/* $OpenBSD: vfs_lookup.c,v 1.15 1998/08/07 01:56:11 csapuntz Exp $ */ /* $NetBSD: vfs_lookup.c,v 1.17 1996/02/09 19:00:59 christos Exp $ */ /* @@ -497,6 +497,10 @@ unionlookup: * the last component consumed. */ if (cnp->cn_consume > 0) { + if (cnp->cn_consume >= slashes) { + cnp->cn_flags &= ~REQUIREDIR; + } + ndp->ni_pathlen -= cnp->cn_consume - slashes; ndp->ni_next += cnp->cn_consume - slashes; cnp->cn_consume = 0; |