Questions about charset modules

Benjamin Riefenstahl Benjamin.Riefenstahl at
Thu Oct 2 17:45:52 GMT 2003

Hi all,

I have written a charset module for the Mac OS X filesystem encoding,
using OS services to do the work.  During the design and testing some
questions came up on which I'd like some advice.

- I'd like to avoid memory management in these functions as much as
  possible.  But I need buffers for temporary storage (e.g. to do
  byte-swapping).  Is there an upper limit to the length of the
  strings passed to the module, so that I could use fixed-length

- The charset functions are called with invalid data from some places,
  I have seen is_legal_name() in smbd/mangle_hash2.c and
  check_for_pipe() in smbd/open.c.  Both functions cut strings at
  arbitrary places and so create invalid multi-byte sequences at the
  end.  How should the charset functions respond?  Currently they just
  return an error and do nothing.

- How should the charset module be named?  I currently use
  modules/charset_macosxfs.c for the source and macosxfs.dylib for the


More information about the samba-technical mailing list