public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@sandeen.net>
To: xfs-oss <xfs@oss.sgi.com>
Subject: [PATCH] xfs_fsr: don't create ag temp subdirs with mode 0777
Date: Wed, 09 Dec 2009 22:06:41 -0600	[thread overview]
Message-ID: <4B2073D1.1040809@sandeen.net> (raw)

This addresses Debian bug #559490 - xfsdump: fsr creates files mode 666

I think that this mode is left over from when xfs_fsr used to
fork into the uid of the file's owner, and so needed somewhere
it was guaranteed to be able to write.

This behavior was removed in commit d51b892411c8d33374a02e20c5888df280811549
(in the xfsdump tree, before xfs_fsr got moved) and so these
wide-open permissions should no longer be needed.

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Nathan Scott <nscott@aconex.com>
---

(Note: I already got a review from Nathan, so barring any complaint
I'll push this to the xfsprogs-dev tree soon.)

diff --git a/fsr/xfs_fsr.c b/fsr/xfs_fsr.c
index 253a55d..21f08c3 100644
--- a/fsr/xfs_fsr.c
+++ b/fsr/xfs_fsr.c
@@ -1541,7 +1541,7 @@ tmp_init(char *mnt)
 	}
 	for (i=0; i < fsgeom.agcount; i++) {
 		sprintf(buf, "%s/.fsr/ag%d", mnt, i);
-		if (mkdir(buf, 0777) < 0) {
+		if (mkdir(buf, 0700) < 0) {
 			if (errno == EEXIST) {
 				if (dflag)
 					fsrprintf(


_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

             reply	other threads:[~2009-12-10  4:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-10  4:06 Eric Sandeen [this message]
2009-12-10  9:08 ` [PATCH] xfs_fsr: don't create ag temp subdirs with mode 0777 Christoph Hellwig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4B2073D1.1040809@sandeen.net \
    --to=sandeen@sandeen.net \
    --cc=xfs@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox