[Date Prev][Date Next] [Chronological] [Thread] [Top]

non-unix help needed: valid filename characters?



Which characters one can safely use in filenames on at least the
platforms OpenLDAP is ported to: Unix, Windows (cygwin), IBM zOS and
MacOS X according to ANNOUNCEMENT?  In particular Windows, since
that's the most common non-Unix platform.

I only know Unix filenames.  Googling around I've found a plethora of
conflicting info.

It's for a naming scheme for back-ldif filenames that will let back-ldif
work as a general backend, and hopefully won't conflict with its current
names for the config database.  ITS#5408.

Currently back-ldif takes the RDN and escapes the directory separator as
"\hex", which doesn't work on Windows where \ is a directory separator.


Some other notes:

- Don't need really general filenames.  OpenLDAP does in any case assume
  Unix/Windows/URL-style pathnames: root to the left, leaf to the
  right, a single directory separator character.

- Hopefully the characters "=-{}" can be used, since database config
  uses those characters.  E.g. olcDatabase={-1}frontend,cn=config.
  ",+" would be nice too, as separators in and between RDNs.

- Need some escape character.  Howard suggested % as in URL-escaping.
  First that sounded nice, but on second thought such a filename is
  not a valid file:// URL component for that file - the '%' must be
  URL-escaped again to access the file as an URL.  Not sure if that's
  a good argument either way.

  Full URL-escaping also escapes {} which is unfortunate (see point 1).

- For real paranoia, might escape uppercase characters in case-sensitive
  attribute types too.  I won't bother unless someone disagrees,
  both case-sensitive DNs and the use of back-ldif as a general database
  are fairly rare.

-- 
Hallvard