diff options
author | Sake Blok <sake@euronet.nl> | 2010-08-28 09:44:18 +0000 |
---|---|---|
committer | Sake Blok <sake@euronet.nl> | 2010-08-28 09:44:18 +0000 |
commit | 42a0f16cef0e3009168d8c2ffa6987ffcf8ecca4 (patch) | |
tree | c953245f7455ba7a1659a46d3113b4376ceeb177 | |
parent | fe34e9a3fbae90c4ea81a16db6904386697d6f78 (diff) | |
download | wireshark-42a0f16cef0e3009168d8c2ffa6987ffcf8ecca4.tar.gz |
We change the owner and group of the first file, so we also want to change owner and group of the rest of the files in the ringbuffer.
svn path=/trunk/; revision=33977
-rw-r--r-- | dumpcap.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -2749,6 +2749,9 @@ do_file_switch_or_stop(capture_options *capture_opts, if (ringbuf_switch_file(&global_ld.pdh, &capture_opts->save_file, &global_ld.save_file_fd, &global_ld.err)) { gboolean successful; +#ifndef _WIN32 + int ret; +#endif /* File switch succeeded: reset the conditions */ global_ld.bytes_written = 0; @@ -2777,6 +2780,10 @@ do_file_switch_or_stop(capture_options *capture_opts, report_packet_count(global_ld.inpkts_to_sync_pipe); global_ld.inpkts_to_sync_pipe = 0; report_new_capture_file(capture_opts->save_file); + +#ifndef _WIN32 + ret = fchown(global_ld.save_file_fd, capture_opts->owner, capture_opts->group); +#endif } else { /* File switch failed: stop here */ global_ld.go = FALSE; |