git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] Add two core.sharedRepository options: group-readable and world-readable

From
HOHeikki Orsila <shdl@zakalwe.fi>
Date
Apr 12, 2008, 03:00 UTC
Message-ID
<20080412030021.GB31039@zakalwe.fi>
In-Reply-To
<7vfxtrnban.fsf@gitster.siamese.dyndns.org>
On Fri, Apr 11, 2008 at 05:53:36PM -0700, Junio C Hamano wrote:
Show 12 quoted lines
> That's not a "Warning" (which tends to mean "you can violate this if you
> know what you are doing"), but should be stronger than that.  Something
> like (also notice the multi-line comment style --- the first line ends
> with "/*\n"):
> 
> /*
>  * NOTE NOTE NOTE!!
>  *
>  * Do not reorder this list; numerically written core.sharedrepository
>  * in config files have always been valid, and you would break existing
>  * repositories if you move these around.
>  */
OK
Show 10 quoted lines
> >  enum sharedrepo {
> >  	PERM_UMASK = 0,
> >  	PERM_GROUP,
> > -	PERM_EVERYBODY
> > +	PERM_EVERYBODY,
> > +	PERM_GROUP_READABLE,
> > +	PERM_WORLD_READABLE,
> >  };
> 
> But I have to wonder if this patch is necessary.

It is necessary for us, and I suspect it will be useful in some organizations. The situation is this:

* multiple groups on the same machine
* users may want to keep umask 0077 as the default
> Neither am I convinced if this set is sufficient.

It will be easy to add new groups if the need arises, but I can't see many other useful combinations..

> For example, you may want to enforce "ug+rw,o=" in a repository.  How
> would you do that?
Isn't that PERM_GROUP? The user always keeps u+rw for oneself.
Show 8 quoted lines
> Perhaps if you really wanted to have such a fine grained control, you
> would be better off defining core.sharedrepository as a set/unset pair?
> 
> 	core.sharedrepository = 0660,007 ;# ug+rw,o-rwx
> 
> Or even stronger "set to this bit pattern"?
> 
> 	core.sharedrepository = 0660 ;# ug=rw,o=
The latter approach is simpler and probably more understandable.
> (I think you would need to flip executable bit for directories if you go
> this route).
I can put x flag mode checking.
Do you accept these proposals? I can submit another patch.
-- 
Heikki Orsila			Barbie's law:
heikki.orsila@iki.fi		"Math is hard, let's go shopping!"
http://www.iki.fi/shd
Previous: Junio C HamanoNext: Junio C Hamano
Message 3 of 9 in “Add two core.sharedRepository options: group-readable and world-readable”
  1. Add two core.sharedRepository options: group-readable and world-readableHeikki Orsila, Apr 11, 2008
  2. Junio C HamanoApr 12, 2008
  3. Heikki OrsilaApr 12, 2008
  4. Junio C HamanoApr 12, 2008
  5. Björn SteinbrinkApr 12, 2008
  6. Junio C HamanoApr 12, 2008
  7. Heikki OrsilaApr 12, 2008
  8. Heikki OrsilaApr 12, 2008
  9. Heikki OrsilaApr 12, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.