diff options
author | 2000-05-01 20:20:12 +0000 | |
---|---|---|
committer | 2000-05-01 20:20:12 +0000 | |
commit | 10eb6b9fc6e3de36c392015a3c40a67287b3fd96 (patch) | |
tree | eb3dd7e6b9f8c5556ac705efc56f27ee279f0736 | |
parent | accept valid intervals for -w (diff) | |
download | wireguard-openbsd-10eb6b9fc6e3de36c392015a3c40a67287b3fd96.tar.xz wireguard-openbsd-10eb6b9fc6e3de36c392015a3c40a67287b3fd96.zip |
Remove trailing '/' in exports pathnames so mount requests will match
properly.
-rw-r--r-- | sbin/mountd/mountd.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sbin/mountd/mountd.c b/sbin/mountd/mountd.c index 2595af5026e..a3699884fcd 100644 --- a/sbin/mountd/mountd.c +++ b/sbin/mountd/mountd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mountd.c,v 1.29 1999/04/21 02:13:57 alex Exp $ */ +/* $OpenBSD: mountd.c,v 1.30 2000/05/01 20:20:12 millert Exp $ */ /* $NetBSD: mountd.c,v 1.31 1996/02/18 11:57:53 fvdl Exp $ */ /* @@ -2062,6 +2062,11 @@ check_dirpath(dirp) int ret = 1; struct stat sb; + /* Remove trailing '/' */ + cp = dirp + strlen(dirp) - 1; + while (cp > dirp && *cp == '/') + *cp-- = '\0'; + cp = dirp + 1; while (*cp && ret) { if (*cp == '/') { |