[csw-devel] SF.net SVN: gar:[15693] csw/mgar/pkg/rsync/branches/3.1.0dev
bdwalton at users.sourceforge.net
bdwalton at users.sourceforge.net
Tue Sep 20 21:54:59 CEST 2011
Revision: 15693
http://gar.svn.sourceforge.net/gar/?rev=15693&view=rev
Author: bdwalton
Date: 2011-09-20 19:54:59 +0000 (Tue, 20 Sep 2011)
Log Message:
-----------
rsync/branches/3.1.0dev: incorporate the O_NOFOLLOW modification from the updated 3.1.0dev upstream tarball
Modified Paths:
--------------
csw/mgar/pkg/rsync/branches/3.1.0dev/Makefile
csw/mgar/pkg/rsync/branches/3.1.0dev/checksums
Removed Paths:
-------------
csw/mgar/pkg/rsync/branches/3.1.0dev/files/0005-Modify-syscall.c-do_readlink-for-systems-without-O_N.patch
Modified: csw/mgar/pkg/rsync/branches/3.1.0dev/Makefile
===================================================================
--- csw/mgar/pkg/rsync/branches/3.1.0dev/Makefile 2011-09-20 19:47:51 UTC (rev 15692)
+++ csw/mgar/pkg/rsync/branches/3.1.0dev/Makefile 2011-09-20 19:54:59 UTC (rev 15693)
@@ -21,7 +21,6 @@
PATCHFILES += 0002-Testsuite-Honour-PATH-when-finding-fakeroot.patch
PATCHFILES += 0003-Testsuite-Honour-PATH-when-finding-sh.patch
PATCHFILES += 0004-Testsuite-Extend-xattr-manipulation-for-Solaris.patch
-PATCHFILES += 0005-Modify-syscall.c-do_readlink-for-systems-without-O_N.patch
VERSION_FLAG_PATCH = 1
Modified: csw/mgar/pkg/rsync/branches/3.1.0dev/checksums
===================================================================
--- csw/mgar/pkg/rsync/branches/3.1.0dev/checksums 2011-09-20 19:47:51 UTC (rev 15692)
+++ csw/mgar/pkg/rsync/branches/3.1.0dev/checksums 2011-09-20 19:54:59 UTC (rev 15693)
@@ -1 +1 @@
-1e5beb2479cec3c91d87a0302c373e6b rsync-3.1.0dev.tar.gz
+bc92b00c1655727ef7bf4bd7543c22f6 rsync-3.1.0dev.tar.gz
Deleted: csw/mgar/pkg/rsync/branches/3.1.0dev/files/0005-Modify-syscall.c-do_readlink-for-systems-without-O_N.patch
===================================================================
--- csw/mgar/pkg/rsync/branches/3.1.0dev/files/0005-Modify-syscall.c-do_readlink-for-systems-without-O_N.patch 2011-09-20 19:47:51 UTC (rev 15692)
+++ csw/mgar/pkg/rsync/branches/3.1.0dev/files/0005-Modify-syscall.c-do_readlink-for-systems-without-O_N.patch 2011-09-20 19:54:59 UTC (rev 15693)
@@ -1,58 +0,0 @@
-From 21a3d63ffa75c0b462bd66a266b99ccc7c6b4636 Mon Sep 17 00:00:00 2001
-From: Ben Walton <bwalton at opencsw.org>
-Date: Sat, 17 Sep 2011 12:42:39 -0400
-Subject: [PATCH] Modify syscall.c:do_readlink for systems without O_NOFOLLOW
-
-To facilitate systems without O_NOFOLLOW (eg: Solaris 9), add
-conditional handling of the open() call with two stat() checks
-bracketing it. This lets systems with extended attributes but no
-O_NOFOLLOW still support the xattr code paths.
-
-Signed-off-by: Ben Walton <bwalton at opencsw.org>
----
- syscall.c | 27 +++++++++++++++++++++++++++
- 1 files changed, 27 insertions(+), 0 deletions(-)
-
-diff --git a/syscall.c b/syscall.c
-index c6c571a..794d64a 100644
---- a/syscall.c
-+++ b/syscall.c
-@@ -87,8 +87,35 @@ ssize_t do_readlink(const char *path, char *buf, size_t bufsiz)
- {
- /* For --fake-super, we read the link from the file. */
- if (am_root < 0) {
-+#ifndef O_NOFOLLOW
-+ /* Before and After stat to detect changes during race */
-+ struct stat b_st, a_st;
-+ if (lstat(path, &b_st) != 0)
-+ return -1;
-+
-+ if (!S_ISREG(b_st.st_mode))
-+ return -1;
-+
-+ int fd = open(path, O_RDONLY);
-+#else
- int fd = open(path, O_RDONLY|O_NOFOLLOW);
-+#endif
-+
- if (fd >= 0) {
-+#ifndef O_NOFOLLOW
-+ /* Handle the race condition...File may have been
-+ changed between lstat() and open(). Double check
-+ that device and inode are the same as the
-+ pre-flight test. */
-+ if (fstat(fd, &a_st) != 0)
-+ return -1;
-+
-+ /* If the file changed, bail out! */
-+ if (a_st.st_dev != b_st.st_dev ||
-+ a_st.st_ino != b_st.st_ino)
-+ return -1;
-+#endif
-+
- int len = read(fd, buf, bufsiz);
- close(fd);
- return len;
---
-1.7.6.1
-
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the devel
mailing list