[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

r4998 - in glibc-package/branches/glibc-branch-squeeze/debian: . patches/kfreebsd



Author: ps-guest
Date: 2011-10-18 07:11:41 +0000 (Tue, 18 Oct 2011)
New Revision: 4998

Modified:
   glibc-package/branches/glibc-branch-squeeze/debian/changelog
   glibc-package/branches/glibc-branch-squeeze/debian/patches/kfreebsd/local-sysdeps.diff
Log:
kfreebsd/local-sysdeps.diff, update to r3743 (from squeeze glibc-bsd).



Modified: glibc-package/branches/glibc-branch-squeeze/debian/changelog
===================================================================
--- glibc-package/branches/glibc-branch-squeeze/debian/changelog	2011-10-18 06:56:51 UTC (rev 4997)
+++ glibc-package/branches/glibc-branch-squeeze/debian/changelog	2011-10-18 07:11:41 UTC (rev 4998)
@@ -27,10 +27,12 @@
     - patches/amd64/cvs-avx-tcb-alignment.diff
     - patches/any/submitted-etc-resolv.conf.diff
     - patches/any/cvs-audit-suid.diff
-  * kfreebsd/local-sysdeps.diff, update to r3691 (from squeeze glibc-bsd).
+  * kfreebsd/local-sysdeps.diff, update to r3743 (from squeeze glibc-bsd).
     - fixes LD_PRELOAD with a kfreebsd-9 kernel. Closes: #630695.
     - uses upstream RFTSIGZMB for exit signal selection when available.
     - fixes a crash in if_nameindex() with more than 3 interfaces.
+    - alter faccessat() X_OK tests similarly as access(). See #640334.
+    - fix __libc_sa_len() for AF_LOCAL. See #645527.
   * Fix preinst script wrt 3.0 kernel. Patch by Colin Watson.  Closes: 
     #630077.
   * Update submitted-resolv.conf-thread.diff from upstream to fix a 

Modified: glibc-package/branches/glibc-branch-squeeze/debian/patches/kfreebsd/local-sysdeps.diff
===================================================================
--- glibc-package/branches/glibc-branch-squeeze/debian/patches/kfreebsd/local-sysdeps.diff	2011-10-18 06:56:51 UTC (rev 4997)
+++ glibc-package/branches/glibc-branch-squeeze/debian/patches/kfreebsd/local-sysdeps.diff	2011-10-18 07:11:41 UTC (rev 4998)
@@ -8903,7 +8903,7 @@
 +#endif
 --- /dev/null
 +++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/faccessat.c
-@@ -0,0 +1,172 @@
+@@ -0,0 +1,199 @@
 +/* Test for access to file, relative to open directory.  Linux version.
 +   Copyright (C) 2006 Free Software Foundation, Inc.
 +   This file is part of the GNU C Library.
@@ -8938,6 +8938,16 @@
 +extern int __syscall_faccessat (int fd, const char *path, int mode, int flag);
 +libc_hidden_proto (__syscall_faccessat)
 +
++/*
++   The FreeBSD kernel do not test file access correctly when the 
++   process' real user ID is superuser. In particular, they always return
++   zero when testing execute permissions without regard to whether the 
++   file is executable.
++
++   While this behaviour conforms to POSIX.1-2008, it is explicitely 
++   discouraged. This wrapper implements the recommended behaviour.
++ */
++
 +int
 +faccessat (fd, file, mode, flag)
 +     int fd;
@@ -8955,7 +8965,24 @@
 +	__have_atfcts = -1;
 +      else
 +# endif
++      {
++        if ((result == 0) && (mode & X_OK))
++        {
++          uid_t uid = (flag & AT_EACCESS) ? __geteuid () : __getuid ();
++          if (uid == 0)
++          {
++            struct stat64 stats;
++            if (fstatat64 (fd, file, &stats, flag & AT_SYMLINK_NOFOLLOW))
++              return -1;
++            if ((stats.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH)) == 0)
++            {
++              __set_errno (EACCES);
++              return -1;
++	    }
++          }
++	}
 +	return result;
++      }	
 +    }
 +
 +#ifndef __ASSUME_ATFCTS
@@ -20315,7 +20342,7 @@
 +    case AF_IPX:
 +      return sizeof (struct sockaddr_ipx);
 +    case AF_LOCAL:
-+      return sizeof (struct sockaddr_un);
++      return sizeof (struct sockaddr_un) - 4;
 +    }
 +  return 0;
 +}


Reply to: