From: Mike Hommey <mh@glandium.org>
To: "Johannes Schindelin" <Johannes.Schindelin@gmx.de>,
"Torsten Bögershausen" <tboegi@web.de>,
git@vger.kernel.org, zwanzig12@googlemail.com,
stefanbeller@googlemail.com, kusmabite@gmail.com,
msysgit@googlegroups.com
Subject: Re: [PATCH] repack.c: chmod +w before rename()
Date: Sat, 25 Jan 2014 08:50:48 +0900 [thread overview]
Message-ID: <20140124235048.GA30427@glandium.org> (raw)
In-Reply-To: <20140124224911.GC58260@vauxhall.crustytoothpaste.net>
On Fri, Jan 24, 2014 at 10:49:13PM +0000, brian m. carlson wrote:
> On Fri, Jan 24, 2014 at 11:24:36PM +0100, Johannes Schindelin wrote:
> > > In general, I'm wary of changing permissions on a file to suit Windows's
> > > rename because of the symlink issue and the security issues that can
> > > result.
> >
> > I agree on the Windows issue.
>
> I personally feel that if Windows needs help to change permissions for a
> rename, that code should only ever be used on Windows. Doesn't
> mingw_rename automatically do this anyway, and if it doesn't, shouldn't
> we put the code there instead? Furthermore, it makes me very nervous to
> make the file 666. Isn't 644 enough?
Arguably, umask is supposed to take care of making things right. OTOH,
since it's the destination file that's the problem not the renamed file,
the equivalent to mv -f would be to unlink() that file first, not to change
its permissions. That would work properly on unix too.
Mike
next prev parent reply other threads:[~2014-01-24 23:51 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-24 21:05 [PATCH] repack.c: chmod +w before rename() Torsten Bögershausen
2014-01-24 21:40 ` brian m. carlson
2014-01-24 22:24 ` Johannes Schindelin
2014-01-24 22:49 ` brian m. carlson
2014-01-24 23:50 ` Mike Hommey [this message]
2014-01-24 23:32 ` Junio C Hamano
2014-01-24 23:31 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140124235048.GA30427@glandium.org \
--to=mh@glandium.org \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=kusmabite@gmail.com \
--cc=msysgit@googlegroups.com \
--cc=stefanbeller@googlemail.com \
--cc=tboegi@web.de \
--cc=zwanzig12@googlemail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.