Revision: 15691 http://gar.svn.sourceforge.net/gar/?rev=15691&view=rev Author: bdwalton Date: 2011-09-20 19:41:55 +0000 (Tue, 20 Sep 2011) Log Message: ----------- rsync/branches/3.1.0dev: using x_* stat functions requires a third argument
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:22:20 UTC (rev 15690) +++ 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:41:55 UTC (rev 15691) @@ -1,4 +1,4 @@ -From c7aae0e7f18b2f0cb85f8b7ab7bf4cca882f4fab Mon Sep 17 00:00:00 2001 +From 9652541115f4cb61512bf7dca85f74104ffe1c84 Mon Sep 17 00:00:00 2001 From: Ben Walton <bwal...@opencsw.org> Date: Sat, 17 Sep 2011 12:42:39 -0400 Subject: [PATCH] Modify syscall.c:do_readlink for systems without O_NOFOLLOW @@ -14,7 +14,7 @@ 1 files changed, 27 insertions(+), 0 deletions(-) diff --git a/syscall.c b/syscall.c -index c6c571a..b38cbe4 100644 +index c6c571a..9de3293 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 (x_lstat(path, &b_st) != 0) ++ if (x_lstat(path, &b_st, NULL) != 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 (x_fstat(fd, &a_st) != 0) ++ if (x_fstat(fd, &a_st, NULL) != 0) + return -1; + + /* If the file changed, bail out! */ 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