summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/dumpcap.pod7
-rw-r--r--doc/tshark.pod7
-rw-r--r--dumpcap.c2
-rw-r--r--tshark.c2
4 files changed, 17 insertions, 1 deletions
diff --git a/doc/dumpcap.pod b/doc/dumpcap.pod
index a99efef4e7..676a3ae066 100644
--- a/doc/dumpcap.pod
+++ b/doc/dumpcap.pod
@@ -13,6 +13,7 @@ S<[ B<-c> E<lt>capture packet countE<gt> ]>
S<[ B<-d> ]>
S<[ B<-D> ]>
S<[ B<-f> E<lt>capture filterE<gt> ]>
+S<[ B<-g> ]>
S<[ B<-h> ]>
S<[ B<-i> E<lt>capture interfaceE<gt>|rpcap://E<lt>hostE<gt>/E<lt>capture interfaceE<gt>|TCP@E<lt>hostE<gt>:E<lt>portE<gt>|- ]>
S<[ B<-I> ]>
@@ -173,6 +174,12 @@ the interface specified by the last B<-i> option occurring before
this option. If the capture filter expression is not set specifically,
the default capture filter expression is used if provided.
+=item -g
+
+This option causes the output file(s) to be created with group-read permission
+(meaning that the output file(s) can be read by other members of the calling
+user's group).
+
=item -h
Print the version and options and exits.
diff --git a/doc/tshark.pod b/doc/tshark.pod
index 22ef5d7b6c..b21b8e372b 100644
--- a/doc/tshark.pod
+++ b/doc/tshark.pod
@@ -18,6 +18,7 @@ S<[ B<-e> E<lt>fieldE<gt> ]>
S<[ B<-E> E<lt>field print optionE<gt> ]>
S<[ B<-f> E<lt>capture filterE<gt> ]>
S<[ B<-F> E<lt>file formatE<gt> ]>
+S<[ B<-g> ]>
S<[ B<-h> ]>
S<[ B<-H> E<lt>input hosts fileE<gt> ]>
S<[ B<-i> E<lt>capture interfaceE<gt>|- ]>
@@ -341,6 +342,12 @@ option. The output written with the B<-w> option is raw packet data, not
text, so there is no B<-F> option to request text output. The option B<-F>
without a value will list the available formats.
+=item -g
+
+This option causes the output file(s) to be created with group-read permission
+(meaning that the output file(s) can be read by other members of the calling
+user's group).
+
=item -G [fields|fields2|fields3|protocols|values|decodes|defaultprefs|currentprefs]
The B<-G> option will cause B<Tshark> to dump one of several types of glossaries
diff --git a/dumpcap.c b/dumpcap.c
index da4eb5673b..be59fcef7b 100644
--- a/dumpcap.c
+++ b/dumpcap.c
@@ -4453,13 +4453,13 @@ main(int argc, char *argv[])
case 'b': /* Ringbuffer option */
case 'c': /* Capture x packets */
case 'f': /* capture filter */
+ case 'g': /* enable group read accesson file(s) */
case 'i': /* Use interface x */
case 'n': /* Use pcapng format */
case 'p': /* Don't capture in promiscuous mode */
case 'P': /* Use pcap format */
case 's': /* Set the snapshot (capture) length */
case 'w': /* Write to capture file x */
- case 'g': /* enable group read accesson file(s) */
case 'y': /* Set the pcap data link type */
#ifdef HAVE_PCAP_REMOTE
case 'u': /* Use UDP for data transfer */
diff --git a/tshark.c b/tshark.c
index 84f2f14f1c..bc4f02612b 100644
--- a/tshark.c
+++ b/tshark.c
@@ -320,6 +320,7 @@ print_usage(gboolean print_ver)
fprintf(output, " -u s|hms output format of seconds (def: s: seconds)\n");
fprintf(output, " -l flush standard output after each packet\n");
fprintf(output, " -q be more quiet on stdout (e.g. when using statistics)\n");
+ fprintf(output, " -g enable group read access on the output file(s)\n");
fprintf(output, " -W n Save extra information in the file, if supported.\n");
fprintf(output, " n = write network address resolution information\n");
fprintf(output, " -X <key>:<value> eXtension options, see the man page for details\n");
@@ -1185,6 +1186,7 @@ main(int argc, char *argv[])
case 'b': /* Ringbuffer option */
case 'c': /* Capture x packets */
case 'f': /* capture filter */
+ case 'g': /* enable group read accesson file(s) */
case 'i': /* Use interface x */
case 'p': /* Don't capture in promiscuous mode */
#ifdef HAVE_PCAP_REMOTE