Revision: 15690 http://gar.svn.sourceforge.net/gar/?rev=15690&view=rev Author: bdwalton Date: 2011-09-20 19:22:20 +0000 (Tue, 20 Sep 2011) Log Message: ----------- rsync/branches/3.1.0dev: update solaris9 patch to use x_* stat functions instead of calling stat functions directly
Modified 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/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:17:16 UTC (rev 15689) +++ 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:22:20 UTC (rev 15690) @@ -1,7 +1,7 @@ -From ad3aa8df6fae500f7b123de8fe80106e87510455 Mon Sep 17 00:00:00 2001 +From c7aae0e7f18b2f0cb85f8b7ab7bf4cca882f4fab Mon Sep 17 00:00:00 2001 From: Ben Walton <bwal...@opencsw.org> Date: Sat, 17 Sep 2011 12:42:39 -0400 -Subject: [PATCH 5/5] Modify syscall.c:do_readlink for systems without O_NOFOLLOW +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 @@ -14,7 +14,7 @@ 1 files changed, 27 insertions(+), 0 deletions(-) diff --git a/syscall.c b/syscall.c -index c6c571a..974e4fa 100644 +index c6c571a..b38cbe4 100644 --- a/syscall.c +++ b/syscall.c @@ -87,8 +87,35 @@ ssize_t do_readlink(const char *path, char *buf, size_t bufsiz) @@ -24,7 +24,7 @@ +#ifndef O_NOFOLLOW + /* Before and After stat to detect changes during race */ + struct stat b_st, a_st; -+ if (lstat(path, &b_st) != 0) ++ if (x_lstat(path, &b_st) != 0) + return -1; + + if (!S_ISREG(b_st.st_mode)) @@ -41,7 +41,7 @@ + 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) ++ if (x_fstat(fd, &a_st) != 0) + return -1; + + /* If the file changed, bail out! */ @@ -54,5 +54,5 @@ close(fd); return len; -- -1.7.4.1 +1.7.6.1 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. _______________________________________________ devel mailing list devel@lists.opencsw.org https://lists.opencsw.org/mailman/listinfo/devel