HomePhorge

Fixed #6091 - Changed POSIX path matching to allow multiple leading slashes
878f266fbf89Unpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

Fixed #6091 - Changed POSIX path matching to allow multiple leading slashes

According to
http://pubs.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap03.html#tag_03_266:

"Multiple successive slashes are considered to be the same as one
slash.", so '//tmp/xxx' is a valid POSIX pathname.

Thomas Bellman adds:

You should probably read section 3.2 then as well:

   3.2 Absolute Pathname

   A pathname beginning with a single or more than two slashes;
   see also Pathname.

Note that a pathname starting with exactly two slashes is *not*
an absolute pathname according to Posix.  And 4.11 (Pathname
Resolution) says:

   A pathname that begins with two successive slashes may be
   interpreted in an implementation-defined manner, although
   more than two leading slashes shall be treated as a single
   slash.

Posix has this rule to accomodate DomainOS, which was a Unix-
like OS from Apollo, where paths on the form "//foo/bar/gazonk"
meant the file "/bar/gazonk" on the machine named "foo".  You may
recognize this format from URLs, or MS Windows SMB paths (with
backslashes instead of forward slashes).

This ignores that complication, since none of our supported platforms treat
the '//' form as significant.

Signed-off-by: James Turnbull <james@lovedthanlost.net>
Signed-off-by: Daniel Pittman <daniel@puppetlabs.com>
Signed-off-by: Rick Bradley <rick@rickbradley.com>

Details

Provenance
James Turnbull <james@lovedthanlost.net>Authored on
Daniel Pittman <daniel@rimspace.net>Committed on Jan 31 2011, 8:09 PM
vanmeeuwenPushed on Jun 2 2015, 2:22 PM
Parents
rPUeb97aa5f7cbf: Bug #6091 -- test leading double-slash in filenames are allowed.
Branches
Unknown
Tags
Unknown

Event Timeline

Daniel Pittman <daniel@rimspace.net> committed rPU878f266fbf89: Fixed #6091 - Changed POSIX path matching to allow multiple leading slashes (authored by James Turnbull <james@lovedthanlost.net>).Jan 31 2011, 8:09 PM