All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andreas Dilger <adilger@sun.com>
To: Theodore Ts'o <tytso@mit.edu>
Cc: linux-ext4@vger.kernel.org
Subject: [PATCH] fix check_mntent_file() to pass mode for open(O_CREAT)
Date: Thu, 8 Nov 2007 18:20:15 -0700	[thread overview]
Message-ID: <20071109012015.GA14612@webber.adilger.int> (raw)

On my FC8 install, ismounted.c fails to build because open(O_CREAT) is
used without passing a mode.  The following trivial patch fixes it.

Signed-off-by: Andreas Dilger <adilger@dilger.ca>

Index: e2fsprogs-1.40.2/lib/ext2fs/ismounted.c
===================================================================
--- e2fsprogs-1.40.2.orig/lib/ext2fs/ismounted.c
+++ e2fsprogs-1.40.2/lib/ext2fs/ismounted.c
@@ -147,7 +147,7 @@ static errcode_t check_mntent_file(const
 is_root:
 #define TEST_FILE "/.ismount-test-file"		
 		*mount_flags |= EXT2_MF_ISROOT;
-		fd = open(TEST_FILE, O_RDWR|O_CREAT);
+		fd = open(TEST_FILE, O_RDWR|O_CREAT, 0600);
 		if (fd < 0) {
 			if (errno == EROFS)
 				*mount_flags |= EXT2_MF_READONLY;

Cheers, Andreas
--
Andreas Dilger
Sr. Software Engineer, Lustre Group
Sun Microsystems of Canada, Inc.

             reply	other threads:[~2007-11-09  1:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-09  1:20 Andreas Dilger [this message]
2007-11-09  3:30 ` [PATCH] fix check_mntent_file() to pass mode for open(O_CREAT) Eric Sandeen
2007-11-09 20:22   ` Andreas Dilger
     [not found] ` <47503222.7020502@redhat.com>
2007-11-30 23:29   ` Theodore Tso
2007-12-01 12:11 ` Theodore Tso

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=20071109012015.GA14612@webber.adilger.int \
    --to=adilger@sun.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=tytso@mit.edu \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.