diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2000-05-01 20:20:13 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2000-05-01 20:20:13 +0000 |
commit | 64f76012e64d5f42d43ab6fb30440366a4a4286f (patch) | |
tree | 82746947c8340a52c0c701fe087c87f37921e827 /sbin/mountd | |
parent | a07d6b314542aba13f2851051dd6b5190b757a83 (diff) |
Remove trailing '/' in exports pathnames so mount requests will match
properly.
Diffstat (limited to 'sbin/mountd')
-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 == '/') { |