From df4caab40f0b2d0fe77e807f5214d3ee89bb08f0 Mon Sep 17 00:00:00 2001 From: Ruslan Ermilov Date: Tue, 13 Feb 2001 16:55:42 +0000 Subject: Do not allow non-absolute pathnames in the manpath. --- gnu/usr.bin/man/manpath/manpath.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'gnu/usr.bin/man/manpath/manpath.c') diff --git a/gnu/usr.bin/man/manpath/manpath.c b/gnu/usr.bin/man/manpath/manpath.c index bdfbfc61d79e9..c500a55f2546e 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. -- cgit v1.2.3