[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

RFC: svnserve.conf umask directive

From: Greg Hudson <ghudson_at_MIT.EDU>
Date: 2003-11-30 17:14:04 CET

We could add a "umask" directive to the repository's
conf/svnserve.conf, so that people could set svnserve's umask that way
instead of wrapping svnserve in a script which sets the umask.

There is no APR interface to umask(); we'd either have to add one
(along with APR_HAS_UMASK, since the concept is very Unix-specific),
or just write some #ifdef'd Unix-specific code.

The directive would be most useful for tunnel mode, but in some
configurations people might find it a useful sanity check for daemon
mode. Unfortunately, there lies a catch: if on Unix you run svnserve
-d -T (threaded mode), and you have multiple repositories with
different umask directives, you will not get predictable behavior,
because the umask is process-global state.

So, we have two orthogonal sets of options. On the portability axis:

  * Decide not to implement this, because it's Unix-specific.
  * Add APR interface to umask. (If you recommend this option, let me
    know where you think it fits into APR, if possible.)
  * Wrap umask code in HAVE_UMASK, and add an AC_CHECK_FUNCS(umask) to
    configure.in (we don't have any other AC_CHECK_FUNCS directives
    currently). Or, ifdef it some other way. If we go with #2, we
    could also do this as a stopgap while we wait for the apr code to
    percolate into an Apache release.

On the failure to work properly in threaded mode:

  * Decide not to implement this, because of the threaded mode issue.
  * Make the umask option apply only to tunnel mode, avoiding the
    issue.
  * Remove the -T option, so that threaded mode only applies to
    systems without APR_HAS_FORK. (Every system which has umask()
    also has fork(), I am certain.) I didn't like the -T option in
    the first place, so I like this choice, but I'm sure Phillip would
    object.
  * Undocument the -T option, and call it a debugging aide in the help
    output.
  * In the svnserve.conf comments, document that "umask" won't work
    right with the -T option unless you make the umask consistent
    across all repositories served by svnserve.
  * Check for the "umask" directive being used in combination with the
    -T option, and error out. I don't like this option because it
    would be complicated to implement, and because it would preclude
    setting the umask consistently across repositories.
  * Silently ignore the "umask" directive when used in combination
    with the -T option. Again, I don't like the idea of implementing
    this, and it doesn't sit right with me.

Comments?

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sun Nov 30 17:14:37 2003

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.