You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by John Peacock <jp...@rowman.com> on 2003/12/01 01:35:30 UTC

Re: RFC: svnserve.conf umask directive

Tobias Ringstrom wrote:
> A solution could perhaps be to only check that the current umask is 
> correct, and abort if not.  That would prevent repository "corruption" 
> and let the user fix the problem.  Unfortunately I'm not sure if it's 
> possible to read the umask without setting it.  Anyone?
> 

It appears that on some architectures, getumask() is available (and is supposed 
to be threadsafe), but all others would have to use:


               mode_t getumask(void) {
                    mode_t mask = umask(0);
                    umask(mask);
                    return mask;
               }

[direct quote from the getumask man page) and worry about threads conflicting.

John

-- 
John Peacock
Director of Information Research and Technology
Rowman & Littlefield Publishing Group
4720 Boston Way
Lanham, MD 20706
301-459-3366 x.5010
fax 301-429-5747


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: RFC: svnserve.conf umask directive

Posted by Kalle Olavi Niemitalo <ko...@iki.fi>.
Ben Reser <be...@reser.org> writes:

> Nope, getumask isn't available at all.

Except on GNU/Hurd, where glibc-2.3.2/sysdeps/mach/hurd/umask.c
and glibc-2.3.2/hurd/getumask.c simply write and read the
_hurd_umask variable.  (The man page seems to be wrong about
locks; I don't see any in the code.)

I presume most Subversion servers are not running on the Hurd.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: RFC: svnserve.conf umask directive

Posted by John Peacock <jp...@rowman.com>.
Ben Reser wrote:
> Nope, getumask isn't available at all.  If you go back and re-read that
> man page you'll note it isn't implemented and is vapourware. :(
> 

Oops; you're right!  I didn't read that section carefully enough...

John

-- 
John Peacock
Director of Information Research and Technology
Rowman & Littlefield Publishing Group
4501 Forbes Boulevard
Suite H
Lanham, MD  20706
301-459-3366 x.5010
fax 301-429-5748


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: RFC: svnserve.conf umask directive

Posted by Ben Reser <be...@reser.org>.
On Sun, Nov 30, 2003 at 08:35:30PM -0500, John Peacock wrote:
> It appears that on some architectures, getumask() is available (and is 
> supposed to be threadsafe), but all others would have to use:

Nope, getumask isn't available at all.  If you go back and re-read that
man page you'll note it isn't implemented and is vapourware. :(

I think the man page is a bit of a joke and exists so people can figure
out how to find out what the current umask is while warning them about
the thread issues.  

-- 
Ben Reser <be...@reser.org>
http://ben.reser.org

"Conscience is the inner voice which warns us somebody may be looking."
- H.L. Mencken

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org