When "ctdb pfetch" creates a new file, make sure we set some initial sane mode bits
authorRonnie Sahlberg <ronniesahlberg@gmail.com>
Tue, 24 Aug 2010 23:54:37 +0000 (09:54 +1000)
committerRonnie Sahlberg <ronniesahlberg@gmail.com>
Wed, 25 Aug 2010 00:35:12 +0000 (10:35 +1000)
tools/ctdb.c

index 0d8ca35dbdc1a4bac98e1b519e5ded34f21b3cec..83fe0a61b898d096838ff1bfea64380a46a5b1dc 100644 (file)
@@ -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);