Hi Peff,

On Sun, 20 Dec 2015, Jeff King wrote:

> On Sat, Dec 19, 2015 at 07:21:59PM +0100, Johannes Schindelin wrote:
> 
> > It was pointed out by Yaroslav Halchenko that the file containing the
> > commit message had the wrong permissions in a shared setting.
> > 
> > Let's fix that.
> > 
> > Signed-off-by: Johannes Schindelin <johannes.schinde...@gmx.de>
> 
> I think this is probably a step forward, but I have to wonder how many
> other files are in a similar situation (e.g., git-am state files, etc).

True.

> I think people generally haven't noticed because shared repositories are
> generally about a shared bare rendezvous repo. So refs and objects are
> important, but we don't expect people to commit.
> 
> So I don't have any real problem with this, but I suspect it's just the
> tip of the iceberg. We might want something like:
> 
>   FILE *fopen_shared(const char *path, const char *mode)
>   {
>       FILE *ret = fopen(path, mode);
>       if (!ret)
>               return NULL;
>       if (adjust_shared_perm(path)) {
>               fclose(ret);
>               return NULL;
>       }
>       return ret;
>   }
> 
> but of course the hard part is auditing all of the existing fopen()
> calls to see who needs to use it. :)

In principle, I agree, but I have to point out that the
adjust_shared_perm() call must come after the *fclose()* call, to avoid
modifying files to which we currently have open file handles.

Ciao,
Dscho
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to