From: Ronnie Sahlberg Date: Tue, 24 Aug 2010 23:54:37 +0000 (+1000) Subject: When "ctdb pfetch" creates a new file, make sure we set some initial sane mode bits X-Git-Url: http://git.samba.org/?p=metze%2Fctdb%2Fwip.git;a=commitdiff_plain;h=87160c91bfd87e8b9c510dacbf00e5aa481d2305 When "ctdb pfetch" creates a new file, make sure we set some initial sane mode bits --- diff --git a/tools/ctdb.c b/tools/ctdb.c index 0d8ca35d..83fe0a61 100644 --- a/tools/ctdb.c +++ b/tools/ctdb.c @@ -2913,7 +2913,7 @@ static int control_pfetch(struct ctdb_context *ctdb, int argc, const char **argv } if (argc == 3) { - fd = open(argv[2], O_WRONLY|O_CREAT|O_TRUNC); + fd = open(argv[2], O_WRONLY|O_CREAT|O_TRUNC, 0600); if (fd == -1) { DEBUG(DEBUG_ERR,("Failed to open output file %s\n", argv[2])); talloc_free(tmp_ctx);