aboutsummaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-mkstemp.patch
diff options
context:
space:
mode:
authorJackie Huang <jackie.huang@windriver.com>2017-06-23 13:36:44 +0800
committerJoe MacDonald <joe_macdonald@mentor.com>2017-06-28 10:29:36 -0400
commit4267eede662006f54694d6062ceea98835b99dd6 (patch)
tree6f5b0091428d1d86519b5653afbc876f58922c66 /meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-mkstemp.patch
parent7d5f8acc42305040d5387f3773e1f78d01c6ec01 (diff)
downloadmeta-openembedded-contrib-4267eede662006f54694d6062ceea98835b99dd6.tar.gz
rdist: add new recipe
rdist is a remote file distribution client and server. Signed-off-by: Jackie Huang <jackie.huang@windriver.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
Diffstat (limited to 'meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-mkstemp.patch')
-rw-r--r--meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-mkstemp.patch28
1 files changed, 28 insertions, 0 deletions
diff --git a/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-mkstemp.patch b/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-mkstemp.patch
new file mode 100644
index 0000000000..e49e3e4d1d
--- /dev/null
+++ b/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-mkstemp.patch
@@ -0,0 +1,28 @@
+Upstream-Status: Inappropriate [1]
+
+[1] Not the author, the patch is from:
+http://vault.centos.org/5.8/os/SRPMS/rdist-6.1.5-44.src.rpm
+
+--- rdist-6.1.5/src/server.c.mkstemp 2004-05-25 14:29:37.279312752 +0200
++++ rdist-6.1.5/src/server.c 2004-05-25 14:31:27.050744340 +0200
+@@ -1479,11 +1479,18 @@
+ *file = '/';
+ }
+ fd = mkstemp(new);
+- if (fd < 0) {
++ /*
++ * Don't consider it a fatal error if mkstemp() fails
++ * because parent directory didn't exist. (Missing
++ * parents are created later (in recvfile())
++ */
++ if ((fd < 0) && (errno != ENOENT)) {
+ error("Cannot set file name.");
+ return;
++ } else if (fd >= 0) {
++ close(fd);
++ unlink(new); /* Or symlink() will fail */
+ }
+- close(fd);
+ }
+
+ /*