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>
Tue, 24 Aug 2010 23:54:37 +0000 (09:54 +1000)
tools/ctdb.c

index 1eaedce5d101e7b1560388bc7cbbd940e6a94528..52b5626b455ed4e299fe347d1b0e61bef0780ed8 100644 (file)
@@ -2875,7 +2875,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);