diff options
author | Sake Blok <sake@euronet.nl> | 2010-08-28 11:05:51 +0000 |
---|---|---|
committer | Sake Blok <sake@euronet.nl> | 2010-08-28 11:05:51 +0000 |
commit | f17c5ac01f9198a033f6c1cb97ee54676121453e (patch) | |
tree | cec416f861481d0c1acfba756b4f816347c974a4 /capture_opts.c | |
parent | 42a0f16cef0e3009168d8c2ffa6987ffcf8ecca4 (diff) | |
download | wireshark-f17c5ac01f9198a033f6c1cb97ee54676121453e.tar.gz wireshark-f17c5ac01f9198a033f6c1cb97ee54676121453e.tar.bz2 wireshark-f17c5ac01f9198a033f6c1cb97ee54676121453e.zip |
As mentioned on the users-mailinglist[1], it could be useful to have groups read access to the ringbuffer that dumpcap creates. That way, a group of people can access the capture files without having to use root access.
[1] http://www.wireshark.org/lists/wireshark-users/201008/msg00235.html
svn path=/trunk/; revision=33978
Diffstat (limited to 'capture_opts.c')
-rw-r--r-- | capture_opts.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/capture_opts.c b/capture_opts.c index e24ec8fed1..a736037bfb 100644 --- a/capture_opts.c +++ b/capture_opts.c @@ -85,6 +85,7 @@ capture_opts_init(capture_options *capture_opts, void *cf) capture_opts->linktype = -1; /* the default linktype */ capture_opts->saving_to_file = FALSE; capture_opts->save_file = NULL; + capture_opts->group_read_access = FALSE; capture_opts->use_pcapng = FALSE; /* the default is pcap */ capture_opts->real_time_mode = TRUE; capture_opts->show_info = TRUE; @@ -159,6 +160,7 @@ capture_opts_log(const char *log_domain, GLogLevelFlags log_level, capture_optio g_log(log_domain, log_level, "LinkType : %d", capture_opts->linktype); g_log(log_domain, log_level, "SavingToFile : %u", capture_opts->saving_to_file); g_log(log_domain, log_level, "SaveFile : %s", (capture_opts->save_file) ? capture_opts->save_file : ""); + g_log(log_domain, log_level, "GroupReadAccess : %u", capture_opts->group_read_access); g_log(log_domain, log_level, "Fileformat : %s", (capture_opts->use_pcapng) ? "PCAPNG" : "PCAP"); g_log(log_domain, log_level, "RealTimeMode : %u", capture_opts->real_time_mode); g_log(log_domain, log_level, "ShowInfo : %u", capture_opts->show_info); @@ -530,6 +532,9 @@ capture_opts_add_opt(capture_options *capture_opts, int opt, const char *optarg_ #endif status = capture_opts_output_to_pipe(capture_opts->save_file, &capture_opts->output_to_pipe); return status; + case 'g': /* enable group read access on the capture file(s) */ + capture_opts->group_read_access = TRUE; + break; case 'y': /* Set the pcap data link type */ capture_opts->linktype = linktype_name_to_val(optarg_str_p); if (capture_opts->linktype == -1) { |