bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: tmpdir.c:path_search() v. VMS


From: Steven M. Schweda
Subject: Re: tmpdir.c:path_search() v. VMS
Date: Mon, 15 Jul 2013 15:39:36 -0500 (CDT)

From: Paul Eggert <address@hidden>

> +#ifdef __VMS
> +  if (dlen != 0 && dir[dlen - 1] == ':')
> +    add_slash = false;
> +#endif

   Oooh, I don't think that I'd do that.  If the victim specifies a VMS
directory, like, say, "dkc0:[sms]", for TMPDIR, then a ":" test on the
last character will fail.  As usual, everything's complicated.  You
could check for ":", "]", or ">", but, strictly speaking, you'd need to
make sure that the previous character was not the "^" escape used in
exotic ODS5 extended file names.  (As with many things on VMS, it gets
uglier than one might expect even faster than one might expect.)

   If the victim _really_ wants to specify a POSIX-like TMPDIR, then he
could include his own trailing slash when he does it.  I'd rather
document that quirk than add the code to do everything right (if that's
even possible without dragging $PARSE and/or $SEARCH into the mix).

   SMS.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]