From cea608a115bbed94c2ddd45e0d9f58b8264db9d6 Mon Sep 17 00:00:00 2001 From: Chris Dunlop Date: Thu, 12 Aug 2010 15:21:07 +1000 Subject: [PATCH] Fix temp file perms to allow reading xattrs Signed-off-by: Chris Dunlop --- receiver.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/receiver.c b/receiver.c index 6688dda..6a64ba7 100644 --- a/receiver.c +++ b/receiver.c @@ -169,11 +169,11 @@ int open_tmpfile(char *fnametmp, const char *fname, struct file_struct *file) if (!get_tmpname(fnametmp, fname, False)) return -1; - /* We initially set the perms without the setuid/setgid bits or group - * access to ensure that there is no race condition. They will be + /* We initially set the perms with only write and read (reading + * is required to access, at least, xattrs). They will be * correctly updated after the right owner and group info is set. * (Thanks to snabb@epipe.fi for pointing this out.) */ - fd = do_mkstemp(fnametmp, file->mode & INITACCESSPERMS); + fd = do_mkstemp(fnametmp, 0600); #if 0 /* In most cases parent directories will already exist because their -- 1.6.3.3