* [PATCH] xfs_fsr: don't create ag temp subdirs with mode 0777
@ 2009-12-10 4:06 Eric Sandeen
2009-12-10 9:08 ` Christoph Hellwig
0 siblings, 1 reply; 2+ messages in thread
From: Eric Sandeen @ 2009-12-10 4:06 UTC (permalink / raw)
To: xfs-oss
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] xfs_fsr: don't create ag temp subdirs with mode 0777
2009-12-10 4:06 [PATCH] xfs_fsr: don't create ag temp subdirs with mode 0777 Eric Sandeen
@ 2009-12-10 9:08 ` Christoph Hellwig
0 siblings, 0 replies; 2+ messages in thread
From: Christoph Hellwig @ 2009-12-10 9:08 UTC (permalink / raw)
To: Eric Sandeen; +Cc: xfs-oss
On Wed, Dec 09, 2009 at 10:06:41PM -0600, Eric Sandeen wrote:
> 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.
Looks good to me,
Reviewed-by: Christoph Hellwig <hch@lst.de>
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-12-10 9:08 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-10 4:06 [PATCH] xfs_fsr: don't create ag temp subdirs with mode 0777 Eric Sandeen
2009-12-10 9:08 ` Christoph Hellwig
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox