From: "Christof Krüger" <git@christof-krueger.de>
To: "Rei Thiessen" <rei.thiessen@gmail.com>
Cc: git@vger.kernel.org, "Rei Thiessen" <rei.thiessen@gmail.com>
Subject: Re: [PATCH] cygwin: set write permission before unlink
Date: Wed, 29 Jun 2011 16:31:20 +0200 (CEST) [thread overview]
Message-ID: <09c0b1900a67bd1f701c0b23954a34ab.squirrel@mail.localhost.li> (raw)
In-Reply-To: <1309331898-32247-1-git-send-email-rei.thiessen@gmail.com>
> +#undef unlink
> +int cygwin_unlink(const char *pathname)
> +{
> + /* "read-only" files can't be unlinked */
> + chmod(pathname, 0666);
> + return unlink(pathname);
> +}
I've no idea on how cygwin maps file permissions to the underlying
filesystem, but the above raised my attention. Doesn't chmodding the file
to 0666 open a small windows where "group" and "other" users have read
access to the file? This might be unwanted by the user and could be
exploited by some attacker listening for changes on that file.
Or am I too paranoid?
Regards,
Chris
next prev parent reply other threads:[~2011-06-29 14:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-29 7:18 [PATCH] cygwin: set write permission before unlink Rei Thiessen
2011-06-29 14:31 ` Christof Krüger [this message]
2011-06-29 18:48 ` Rei Thiessen
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=09c0b1900a67bd1f701c0b23954a34ab.squirrel@mail.localhost.li \
--to=git@christof-krueger.de \
--cc=git@vger.kernel.org \
--cc=rei.thiessen@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).