diff options
author | Nick Mathewson <nickm@torproject.org> | 2011-07-19 12:59:10 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2011-07-19 12:59:10 -0400 |
commit | c2d3da6303a6a5e41eabcb18b56ee5d8434a9817 (patch) | |
tree | 50b83261d97617f71faf1bdcb69be13a8c4339b4 /src/or | |
parent | 2163e420b2aea36b57a620eb4bb2ff1e7c9e966f (diff) | |
parent | 3e3aac5fd552b7b1949b0d2e12368cea26449b83 (diff) | |
download | tor-c2d3da6303a6a5e41eabcb18b56ee5d8434a9817.tar.gz tor-c2d3da6303a6a5e41eabcb18b56ee5d8434a9817.zip |
Merge remote-tracking branch 'origin/maint-0.2.2'
Diffstat (limited to 'src/or')
-rw-r--r-- | src/or/geoip.c | 4 | ||||
-rw-r--r-- | src/or/rendservice.c | 6 | ||||
-rw-r--r-- | src/or/rephist.c | 2 |
3 files changed, 7 insertions, 5 deletions
diff --git a/src/or/geoip.c b/src/or/geoip.c index 62c7a5c394..5596ff3253 100644 --- a/src/or/geoip.c +++ b/src/or/geoip.c @@ -996,7 +996,7 @@ geoip_dirreq_stats_write(time_t now) data_v2 = geoip_get_client_history(GEOIP_CLIENT_NETWORKSTATUS_V2); data_v3 = geoip_get_client_history(GEOIP_CLIENT_NETWORKSTATUS); format_iso_time(written, now); - out = start_writing_to_stdio_file(filename, OPEN_FLAGS_APPEND, + out = start_writing_to_stdio_file(filename, OPEN_FLAGS_APPEND | O_TEXT, 0600, &open_file); if (!out) goto done; @@ -1329,7 +1329,7 @@ geoip_entry_stats_write(time_t now) filename = get_datadir_fname2("stats", "entry-stats"); data = geoip_get_client_history(GEOIP_CLIENT_CONNECT); format_iso_time(written, now); - out = start_writing_to_stdio_file(filename, OPEN_FLAGS_APPEND, + out = start_writing_to_stdio_file(filename, OPEN_FLAGS_APPEND | O_TEXT, 0600, &open_file); if (!out) goto done; diff --git a/src/or/rendservice.c b/src/or/rendservice.c index 5888e390fc..a935241162 100644 --- a/src/or/rendservice.c +++ b/src/or/rendservice.c @@ -636,13 +636,15 @@ rend_service_load_keys(void) } /* Prepare client_keys and hostname files. */ - if (!(cfile = start_writing_to_stdio_file(cfname, OPEN_FLAGS_REPLACE, + if (!(cfile = start_writing_to_stdio_file(cfname, + OPEN_FLAGS_REPLACE | O_TEXT, 0600, &open_cfile))) { log_warn(LD_CONFIG, "Could not open client_keys file %s", escaped(cfname)); goto err; } - if (!(hfile = start_writing_to_stdio_file(fname, OPEN_FLAGS_REPLACE, + if (!(hfile = start_writing_to_stdio_file(fname, + OPEN_FLAGS_REPLACE | O_TEXT, 0600, &open_hfile))) { log_warn(LD_CONFIG, "Could not open hostname file %s", escaped(fname)); goto err; diff --git a/src/or/rephist.c b/src/or/rephist.c index cd74f1b720..1ad08fe93e 100644 --- a/src/or/rephist.c +++ b/src/or/rephist.c @@ -2490,7 +2490,7 @@ rep_hist_buffer_stats_write(time_t now) if (check_private_dir(statsdir, CPD_CREATE, get_options()->User) < 0) goto done; filename = get_datadir_fname2("stats", "buffer-stats"); - out = start_writing_to_stdio_file(filename, OPEN_FLAGS_APPEND, + out = start_writing_to_stdio_file(filename, OPEN_FLAGS_APPEND | O_TEXT, 0600, &open_file); if (!out) goto done; |