[Ocfs2-tools-devel] libocfs2: specify mode with O_CREAT open
Joel Becker
Joel.Becker at oracle.com
Thu Feb 21 16:00:53 PST 2008
On Thu, Feb 21, 2008 at 03:53:48PM -0800, Mark Fasheh wrote:
> Without this, we'll fail to build when _FORTIFY_SOURCE is defined
>
> Signed-off-by: Mark Fasheh <mark.fasheh at oracle.com>
Signed-off-by: Joel Becker <joel.becker at oracle.com>
> ---
> libocfs2/ismounted.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/libocfs2/ismounted.c b/libocfs2/ismounted.c
> index c6ddf31..83b4d83 100644
> --- a/libocfs2/ismounted.c
> +++ b/libocfs2/ismounted.c
> @@ -153,7 +153,7 @@ static errcode_t check_mntent_file(const char *mtab_file, const char *file,
> is_root:
> #define TEST_FILE "/.ismount-test-file"
> *mount_flags |= OCFS2_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 |= OCFS2_MF_READONLY;
> --
> 1.5.3.6
>
>
> _______________________________________________
> Ocfs2-tools-devel mailing list
> Ocfs2-tools-devel at oss.oracle.com
> http://oss.oracle.com/mailman/listinfo/ocfs2-tools-devel
--
"Always give your best, never get discouraged, never be petty; always
remember, others may hate you. Those who hate you don't win unless
you hate them. And then you destroy yourself."
- Richard M. Nixon
Joel Becker
Principal Software Developer
Oracle
E-mail: joel.becker at oracle.com
Phone: (650) 506-8127
More information about the Ocfs2-tools-devel
mailing list