diff options
author | ru <ru@FreeBSD.org> | 2001-02-13 16:55:42 +0000 |
---|---|---|
committer | ru <ru@FreeBSD.org> | 2001-02-13 16:55:42 +0000 |
commit | 6bbc17b8dc2680a87559ae6b8b7897eec8d39e66 (patch) | |
tree | caa5d0e2c762a2d7a07b24149fbafbb4ddc8e988 /gnu | |
parent | e1ae34cd7eb529ac68cc6fed2f6d240dcde73c7b (diff) | |
download | FreeBSD-src-6bbc17b8dc2680a87559ae6b8b7897eec8d39e66.zip FreeBSD-src-6bbc17b8dc2680a87559ae6b8b7897eec8d39e66.tar.gz |
Do not allow non-absolute pathnames in the manpath.
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/usr.bin/man/manpath/manpath.c | 8 |
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. |