This is the mail archive of the cygwin-patches mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [1.7] bugs in faccessat


On Sep  3 15:18, Christopher Faylor wrote:
> On Thu, Sep 03, 2009 at 01:08:57PM -0600, Eric Blake wrote:
> >-----BEGIN PGP SIGNED MESSAGE-----
> >Hash: SHA1
> >
> >According to Eric Blake on 9/3/2009 9:58 AM:
> >> faccessat has at least two, and probably three bugs.
> >
> >Here's a fix for 1 (typo) and 3 (check for EINVAL in more places), but not
> >for 2 (euidaccess, and the followup request of lchmod).
> >
> >2009-09-03  Eric Blake  <ebb9@byu.net>
> >
> >	* syscalls.cc (faccessat): Fix typo, reject bad flags.
> >	(fchmodat, fchownat, fstatat, utimensat, linkat, unlinkat): Reject
> >	bad flags.
> >
> >diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc
> >index 3798587..6dee7d3 100644
> >--- a/winsup/cygwin/syscalls.cc
> >+++ b/winsup/cygwin/syscalls.cc
> >@@ -3825,7 +3825,8 @@ faccessat (int dirfd, const char *pathname, int mode, int flags)
> >   char *path = tp.c_get ();
> >   if (!gen_full_path_at (path, dirfd, pathname))
> >     {
> >-      if (flags & ~(F_OK|R_OK|W_OK|X_OK))
> >+      if ((mode & ~(F_OK|R_OK|W_OK|X_OK))
> >+	  || (flags & ~(AT_SYMLINK_NOFOLLOW|AT_EACCESS)))
> 
> It's hard to tell from the patch.  Is this properly aligned?  The || should be under the
> (mode.
> 
> With that minor comment please check in.

Thanks for the patches Eric, but, here's a problem.  We still have no
copyright assignment in place from you.  The fcntl patch is barely
trivial, but the faccessat patch certainly isn't anymore.  Would it
be a big problem for you to send the filled out copyright assignemnt form
from http://cygwin.com/assign.txt to Red Hat ASAP?  With any luck it
will have arrived and will be signed before I'm back from vacation.


Thanks in advance,
Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]