public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: "Lassi A. Tuura" <lat@iki.fi>
To: "Larry Hall (RFK Partners, Inc)" <lhall@rfk.com>
Cc: Sebastien Barre <Sebastien.Barre@utc.fr>, cygwin@sourceware.cygnus.com
Subject: Re: [HELP] stat(), file permission, r/w access : i'm LOST :(
Date: Wed, 31 Mar 1999 19:45:00 -0000	[thread overview]
Message-ID: <Pine.LNX.3.96.990302114152.659U-100000@pcatlas112.cern.ch> (raw)
Message-ID: <19990331194500.7GvO6xUo57Yrl3ESUgEGn9xwbtE8SXEhbp-zKjHNDCo@z> (raw)
In-Reply-To: <3.0.3.32.19990301174320.0098ad30@pop.ma.ultranet.com>

On Mon, 1 Mar 1999, Larry Hall (RFK Partners, Inc) wrote:
|> Fixing the bug in the source is also possible.  I know Corinna has been 
|> doing some work with making permissions track more closely with UNIX style.
|> I'm not sure whether his changes will help in this arena...

If somebody is going to fix this, I would strongly encourage to fix it
in a way that uses `access' to determine file permissions, not something
based on `stat'.

This would have the benefit of making things work on the AFS filesystem
as well, where using getuid and st_uid (or similar) to determine
accessibility is meaningless: AFS uses ACLs and tokens that determine
access rights, and the application has no way to know either of these
unless it links against the AFS/Kerberos libraries.  Please make the
scheme trust the operating system (or network file system deamons), and
not to build additional logic that fails with ACL-based systems.  For
example, GNU test program has this bug -- it depends on `stat' instead
of `access'. 

Presumably Win32 system calls responds like AFS with ACLs -- call the
right function (`access'?) and it will tell you whether you can access
the file or not.  Alternatively, `stat' should use the security API to
fill in the st_mode fields correctly, but I am not sure this will work
with networked file systems that implement their own security rules.

Cheers,
//lat
--
With sufficient thrust, pigs fly just fine.  However, this is not
necessarily a good idea.  It is hard to be sure where they are going
to land, and it could be dangerous sitting under them as they fly
overhead.  --RFC1925, "The Twelve Networking Truths"


--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com


  parent reply	other threads:[~1999-03-31 19:45 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-02-28 16:22 Cygwin participation threshold Christopher G. Faylor
     [not found] ` < 199903010022.QAA07416@rtl.cygnus.com >
1999-02-28 17:52   ` mySQL, mSQL, PostgreSQL with cygwin ? Sebastien Barre
1999-02-28 23:02     ` Sebastien Barre
1999-02-28 23:02     ` Stipe Tolj
1999-03-01  6:09       ` Sebastien Barre
     [not found]         ` < 4.1.19990301145716.017379b0@mail.club-internet.fr >
1999-03-01 13:28           ` [HELP] stat(), file permission, r/w access : i'm LOST :( Sebastien Barre
     [not found]             ` < 4.1.19990301211226.016b1250@mail.club-internet.fr >
1999-03-01 13:42               ` Larry Hall (RFK Partners, Inc)
     [not found]                 ` < 3.0.3.32.19990301163809.00994e00@pop.ma.ultranet.com >
1999-03-01 14:34                   ` Sebastien Barre
     [not found]                     ` < 4.1.19990301232226.01717350@mail.club-internet.fr >
1999-03-01 14:47                       ` Larry Hall (RFK Partners, Inc)
     [not found]                         ` < 3.0.3.32.19990301174320.0098ad30@pop.ma.ultranet.com >
1999-03-02  1:02                           ` Sebastien Barre
1999-03-02  3:26                             ` Heinz-Jürgen Oertel
1999-03-31 19:45                               ` Heinz-Jürgen Oertel
     [not found]                             ` < 4.1.19990302094806.016bc410@mail.club-internet.fr >
1999-03-02 23:55                               ` Geoffrey Noer
1999-03-31 19:45                                 ` Geoffrey Noer
1999-03-31 19:45                             ` Sebastien Barre
1999-03-02  3:04                           ` Lassi A. Tuura [this message]
1999-03-31 19:45                             ` Lassi A. Tuura
1999-03-06  2:49                           ` Sebastien Barre
     [not found]                             ` < 4.1.19990305214515.016caba0@mail.club-internet.fr >
1999-03-06 11:04                               ` Larry Hall
1999-03-31 19:45                                 ` Larry Hall
1999-03-31 19:45                             ` Sebastien Barre
1999-03-31 19:45                         ` Larry Hall (RFK Partners, Inc)
1999-03-31 19:45                     ` Sebastien Barre
1999-03-31 19:45                 ` Larry Hall (RFK Partners, Inc)
1999-03-01 13:55             ` John Fortin
     [not found]               ` < 36DB0B4F.8FC8757@ibm.net >
1999-03-01 14:33                 ` Sebastien Barre
     [not found]                   ` < 4.1.19990301232512.01714e60@mail.club-internet.fr >
1999-03-01 14:39                     ` DJ Delorie
1999-03-31 19:45                       ` DJ Delorie
1999-03-31 19:45                   ` Sebastien Barre
1999-03-31 19:45               ` John Fortin
1999-03-31 19:45             ` Sebastien Barre
1999-03-07  9:11         ` mySQL, mSQL, PostgreSQL with cygwin ? Stipe Tolj
1999-03-31 19:45           ` Stipe Tolj
1999-03-31 19:45         ` Sebastien Barre
1999-02-28 23:02 ` Cygwin participation threshold Christopher G. Faylor

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=Pine.LNX.3.96.990302114152.659U-100000@pcatlas112.cern.ch \
    --to=lat@iki.fi \
    --cc=Sebastien.Barre@utc.fr \
    --cc=cygwin@sourceware.cygnus.com \
    --cc=lhall@rfk.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).