public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: David Rothenberger <daveroth@acm.org>
To: cygwin@cygwin.com
Subject: Re: [BUG 1.7] Read-only files are not.
Date: Thu, 01 Jan 2009 00:57:00 -0000	[thread overview]
Message-ID: <495C14C1.3090906@acm.org> (raw)
In-Reply-To: <loom.20090101T000200-655@post.gmane.org>

On 12/31/2008 4:06 PM, Eric Blake wrote:
> David Rothenberger <daveroth <at> acm.org> writes:
> 
>> It seems that read-only files in Cygwin 1.7 are not truly
>> read-only.
> 
> Are you perchance running as an Administrator, and therefore you have backup 
> privileges?

Yes.

> If so, then you have root-like power, and cygwin exposes that by 
> opening files with intent to backup even when the ACLs would otherwise make the 
> file unreadable.  Therefore, even though none of S_IRUSR, S_IRGRP, S_IROTH are 
> set in the posixy st_mode bits, access(file, R_OK) returns 0 and open() is able 
> to exploit your root-like powers to read that file.
> 
> I thought Corinna mentioned this in the release notes.

I didn't see anything mentioned in this message: 
http://cygwin.com/ml/cygwin-announce/2008-12/msg00009.html

>> (This issue was brought to my attention by a failing subversion test
>> after building for 1.7.)
> 
> The findutils testsuite also had to make accomodations to skip certain tests 
> when run with root-like privileges.

If this is indeed intended behavior, I will adjust the subversion test 
cases accordingly.


-- 
David Rothenberger  ----  daveroth@acm.org

pain, n.:
         One thing, at least it proves that you're alive!


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

  reply	other threads:[~2009-01-01  0:57 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-31 23:32 David Rothenberger
2008-12-31 23:59 ` Christopher Faylor
2009-01-01  1:17   ` David Rothenberger
2009-01-01  0:07 ` Eric Blake
2009-01-01  0:57   ` David Rothenberger [this message]
2009-01-01  3:39   ` Christopher Faylor
2009-01-07 14:31     ` Corinna Vinschen

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=495C14C1.3090906@acm.org \
    --to=daveroth@acm.org \
    --cc=cygwin@cygwin.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 read-only IMAP folder(s) and NNTP newsgroup(s).