summaryrefslogtreecommitdiff
path: root/sys/kern
diff options
context:
space:
mode:
authorConstantine Sapuntzakis <csapuntz@cvs.openbsd.org>1998-08-07 01:56:12 +0000
committerConstantine Sapuntzakis <csapuntz@cvs.openbsd.org>1998-08-07 01:56:12 +0000
commitfc0714d8946fd083aa2cd18d5e4f52e267705c7a (patch)
tree572fd5fb70b2f16899f0db88b5dd5157dbb92897 /sys/kern
parent0d26faabcfd3c5d81993e46b8fb085c965ee22f2 (diff)
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.
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/vfs_lookup.c6
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;