summaryrefslogtreecommitdiffstats
path: root/gnu/usr.bin
diff options
context:
space:
mode:
authorru <ru@FreeBSD.org>2001-02-13 16:55:42 +0000
committerru <ru@FreeBSD.org>2001-02-13 16:55:42 +0000
commit6bbc17b8dc2680a87559ae6b8b7897eec8d39e66 (patch)
treecaa5d0e2c762a2d7a07b24149fbafbb4ddc8e988 /gnu/usr.bin
parente1ae34cd7eb529ac68cc6fed2f6d240dcde73c7b (diff)
downloadFreeBSD-src-6bbc17b8dc2680a87559ae6b8b7897eec8d39e66.zip
FreeBSD-src-6bbc17b8dc2680a87559ae6b8b7897eec8d39e66.tar.gz
Do not allow non-absolute pathnames in the manpath.
Diffstat (limited to 'gnu/usr.bin')
-rw-r--r--gnu/usr.bin/man/manpath/manpath.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/gnu/usr.bin/man/manpath/manpath.c b/gnu/usr.bin/man/manpath/manpath.c
index bdfbfc6..c500a55 100644
--- a/gnu/usr.bin/man/manpath/manpath.c
+++ b/gnu/usr.bin/man/manpath/manpath.c
@@ -423,6 +423,14 @@ get_manpath (perrs, path)
if (debug)
fprintf (stderr, "\npath directory %s ", p);
+ if (*p != '/')
+ {
+ if (debug)
+ fprintf (stderr, "is not an absolute pathname\n");
+
+ goto found; /* skip. */
+ }
+
/*
* The directory we're working on is in the config file.
* If we haven't added it to the list yet, do.
OpenPOWER on IntegriCloud