This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc 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]

GNU C Library master sources branch master updated. glibc-2.19-678-ga4ccbc9


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  a4ccbc9b243926a9904624b387fb18583c3d4d4d (commit)
      from  9aea0cb842f02098d9c09b4855f883ddc8a8a97e (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a4ccbc9b243926a9904624b387fb18583c3d4d4d

commit a4ccbc9b243926a9904624b387fb18583c3d4d4d
Author: Joseph Myers <joseph@codesourcery.com>
Date:   Wed Jun 25 16:39:33 2014 +0000

    Remove __ASSUME_XFS_RESTRICTED_CHOWN.
    
    This patch removes the __ASSUME_XFS_RESTRICTED_CHOWN macro, now it can
    be presumed to be defined unconditionally.  I'm not sure if what's
    left of __statfs_chown_restricted is actually useful (if not, a
    followup could remove it), but I left it there to keep the patch
    conservative and avoid changing the code generated for glibc.
    
    Tested x86_64 that the disassembly of installed shared libraries is
    unchanged by the patch.
    
    	* sysdeps/unix/sysv/linux/kernel-features.h
    	(__ASSUME_XFS_RESTRICTED_CHOWN): Remove macro.
    	* sysdeps/unix/sysv/linux/pathconf.c (__statfs_chown_restricted)
    	[__ASSUME_XFS_RESTRICTED_CHOWN]: Make code unconditional.
    	(__statfs_chown_restricted) [!__ASSUME_XFS_RESTRICTED_CHOWN]:
    	Remove conditional code.

diff --git a/ChangeLog b/ChangeLog
index eea0ebe..0849f42 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2014-06-25  Joseph Myers  <joseph@codesourcery.com>
+
+	* sysdeps/unix/sysv/linux/kernel-features.h
+	(__ASSUME_XFS_RESTRICTED_CHOWN): Remove macro.
+	* sysdeps/unix/sysv/linux/pathconf.c (__statfs_chown_restricted)
+	[__ASSUME_XFS_RESTRICTED_CHOWN]: Make code unconditional.
+	(__statfs_chown_restricted) [!__ASSUME_XFS_RESTRICTED_CHOWN]:
+	Remove conditional code.
+
 2014-06-25  Will Newton  <will.newton@linaro.org>
 
 	* sysdeps/unix/sysv/linux/arm/dl-procinfo.c
diff --git a/sysdeps/unix/sysv/linux/kernel-features.h b/sysdeps/unix/sysv/linux/kernel-features.h
index 3c8ea50..665c348 100644
--- a/sysdeps/unix/sysv/linux/kernel-features.h
+++ b/sysdeps/unix/sysv/linux/kernel-features.h
@@ -228,7 +228,3 @@
 #if defined __x86_64__ && __LINUX_KERNEL_VERSION >= 0x030100
 # define __ASSUME_GETCPU_SYSCALL	1
 #endif
-
-/* 2.6.29 removed the XFS restricted_chown sysctl, so it is pointless looking
-   for it in newer kernels.  */
-#define __ASSUME_XFS_RESTRICTED_CHOWN 1
diff --git a/sysdeps/unix/sysv/linux/pathconf.c b/sysdeps/unix/sysv/linux/pathconf.c
index 578b736..086b2dc 100644
--- a/sysdeps/unix/sysv/linux/pathconf.c
+++ b/sysdeps/unix/sysv/linux/pathconf.c
@@ -289,35 +289,5 @@ __statfs_chown_restricted (int result, const struct statfs *fsbuf)
       return -1;
     }
 
-#if __ASSUME_XFS_RESTRICTED_CHOWN
   return 1;
-#else
-  int fd;
-  int save_errno;
-  long int retval = 1;
-  switch (fsbuf->f_type)
-    {
-    case XFS_SUPER_MAGIC:
-      save_errno = errno;
-      /* Read the value from /proc/sys/fs/xfs/restrict_chown.  If we cannot
-	 read it default to assume the restriction is in place.  */
-      fd = open_not_cancel_2 ("/proc/sys/fs/xfs/restrict_chown", O_RDONLY);
-      if (fd != -1)
-	{
-	  char buf[2];
-	  if (TEMP_FAILURE_RETRY (read_not_cancel (fd, buf, 2)) == 2
-	      && buf[0] >= '0' && buf[0] <= '1')
-	    retval = buf[0] - '0';
-
-	  close_not_cancel_no_status (fd);
-	}
-      __set_errno (save_errno);
-      break;
-
-    default:
-      break;
-    }
-
-  return retval;
-#endif
 }

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                                 |    9 ++++++++
 sysdeps/unix/sysv/linux/kernel-features.h |    4 ---
 sysdeps/unix/sysv/linux/pathconf.c        |   30 -----------------------------
 3 files changed, 9 insertions(+), 34 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources


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