Commit graph

164 commits

Author SHA1 Message Date
Alexis La Goutte
71f1f8b9d3 Fix indents (Use Spaces) Add Modelines
svn path=/trunk/; revision=49156
2013-05-04 08:12:25 +00:00
Evan Huus
c17893650c Silence a false-positive warning from older GCCs:
'acetype4' may be used uninitialized in this function

svn path=/trunk/; revision=49076
2013-04-27 15:00:52 +00:00
Evan Huus
132ee18259 From Cal Turney via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8605
Numerous improvements to NFS ACL/ACE dissection. For a complete list see
comment #11 of the bug.

From me:
- fix an infinite loop caught by fuzzing
- fix an out-of-bounds memory access caught by valgrind
- add missing {0,NULL} terminator to value_string array

svn path=/trunk/; revision=49074
2013-04-27 13:59:46 +00:00
Evan Huus
df0bbb4ffc Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8611
svn path=/trunk/; revision=49030
2013-04-25 13:57:02 +00:00
Evan Huus
e9f9ca4298 Fix format string typo causing
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8607

svn path=/trunk/; revision=49015
2013-04-24 14:05:30 +00:00
Alexis La Goutte
679decdac6 Fix warning: 'attr_mask_offset' may be used uninitialized in this function in Mac OS X
svn path=/trunk/; revision=48975
2013-04-22 18:29:34 +00:00
Alexis La Goutte
8a12090715 From Cal Turney via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8601 NFSv4 attribute and READDIR modifications
*  "dissect_nfs4_attribute()" was eliminated because the values dissection
   portion of that routine was identical to the "dissect_nfs_attributes()"
   routine.  The code in "dissect_nfs4_bitmap4()" and
   "dissect_nfs4_attrlist4()" was also similar so those routines
   were also eliminated and their code incorporated in dissect_nfs_fattr4s().
   These measures have reduced the size of 'packet-nfs.c' by almost 400 lines.

*  Attributes were relabeled according to RFC 5661 (NFS4v1).
    o “mand_attr” (REQUIRED attribute) header was changed to "reqd_attr”.
    o “recc_attr” (RECOMMENDED attributes) header was changed to “reco_attr”
      because "recommended" only has one ‘c’. =)

*  In order to be able to list the attribute names horizontally in the
   "Attr mask[x]" header (e.g., "Attr mask[0]: 0x0010111a (TYPE, CHANGE, SIZE,
   FSID, ACL, FILEID)", “FATTR4_” was removed from the attribute names
   (e.g., “FATTR4_TYPE (1)” is now “TYPE (1)”.  Note that RFC 5661 does not
   define them with a “FATTR4” prefix.

*  In GETATTR responses, the “resok4” and “obj_attributes” subtrees were
   eliminated because they are neither actual fields nor serve any practical
   purpose.

*  The READDIR "Directory Listing" subtree was reformatted. "Filename" was
   changed to "Entry" because entries can also be directories.
   "Value Follows", "cookie", and "Attr mask[n]" were moved within each entry.
   If an Entry header is left-clicked all the fields of that entry are
   highlighted in the Hex pane. If it is right-clicked the 'nfs.name'
   field (filter) can be obtained. Finally, the "attr_vals:<DATA>" (text)
   subtree was eliminated because it appears to serve no useful purpose and
   clutters the tree.

svn path=/trunk/; revision=48966
2013-04-22 17:31:15 +00:00
Evan Huus
c2c68fc2b9 s/mfs/nfs/
svn path=/trunk/; revision=48935
2013-04-19 18:19:05 +00:00
Evan Huus
7a173f9b0d From Cal Turney via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8581
Major NFS dissector cleanup. Consistent naming, spacing, line wrapping,
variable initialization, ...

For full details see comment #18 of the bug.

svn path=/trunk/; revision=48934
2013-04-19 18:16:50 +00:00
Evan Huus
2290bf6575 From J. Bruce Fields via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8584
Support for NFSv4.1 open access modes including delegation wants.

svn path=/trunk/; revision=48871
2013-04-16 02:03:01 +00:00
Evan Huus
cb4d9f982e Don't use seasonal memory for NFS file tracking tables (at least I think that's
what these are). It gets freed slightly before we need to access it in order to
correctly free other glib memory.

Discovered accidentally while valgrinding the capture from
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8584

svn path=/trunk/; revision=48870
2013-04-16 01:58:28 +00:00
Evan Huus
f7fbe1ccda From J. Bruce Fields via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8582
Fix a few misc. issues with NFS CB_SEQUENCE decoding.

svn path=/trunk/; revision=48868
2013-04-15 23:26:57 +00:00
Evan Huus
ddb1685c93 From J. Bruce Fields via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8580
Add support for the NFSv4.1 test_stateid operation.

svn path=/trunk/; revision=48849
2013-04-14 23:04:50 +00:00
Pascal Quantin
fc153bf23b From Cal Turney via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8576 :
Add ACE4_INHERITED_ACE flag and NFS4ERR_DELEG_REVOKED error code.
Replace NFS4ERR_NODEV error code by NFS4ERR_DQUOT error code.
See RFC 5661 for details.

svn path=/trunk/; revision=48825
2013-04-11 20:00:28 +00:00
Pascal Quantin
77a71eb936 From Cal Turney via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8575 :
Fix description of ACE4_APPEND_DATA

svn path=/trunk/; revision=48814
2013-04-11 08:41:28 +00:00
Evan Huus
a0d107beec Remove decode_enumerated_bitfield and decode_enumerated_bitfield_shifted.
Effectively inline the only remain call (and replace a static buffer with ep
memory). Much of the NFS dissector needs to be converted to use named fields
at which point this code can go away, but that's a much bigger job.

Also, add modelines to packet-nfs.c and mark some internal value_string
functions as WS_DLL_LOCAL.

svn path=/trunk/; revision=48635
2013-03-29 02:34:23 +00:00
Pascal Quantin
85048f5a96 From Ed Beroset via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416 :
Remove C++ incompatibilities from packet-nfs.c

svn path=/trunk/; revision=48172
2013-03-07 18:09:23 +00:00
Bill Meier
96a24cc79f Fix spelling/typos found using a list of commonly misspelled words.
The misspellings were mostly in comments but some were
in text strings visible to the user.


svn path=/trunk/; revision=47899
2013-02-26 04:42:26 +00:00
Bill Meier
d3a7f4b817 Use '#if 0 ... #endif' rather than /** ... **/ to comment out
unused hf[] entries (which I should have done in the first place).

svn path=/trunk/; revision=47390
2013-01-31 18:31:28 +00:00
Bill Meier
329f6e8cc0 Initialize some hf_... vars to -1;
(Reduces the number of checkhf false positives)

svn path=/trunk/; revision=47310
2013-01-26 21:42:36 +00:00
Bill Meier
0960e508e4 Comment out cases of unused hf array entries found by checkhf.
svn path=/trunk/; revision=47302
2013-01-26 18:54:53 +00:00
Guy Harris
8ed7a73e22 Fix a bunch of warnings.
Cast away some implicit 64-bit-to-32-bit conversion errors due to use of
sizeof.

Cast away some implicit 64-bit-to-32-bit conversion errors due to use of
strtol() and strtoul().

Change some data types to avoid those implicit conversion warnings.

When assigning a constant to a float, make sure the constant isn't a
double, by appending "f" to the constant.

Constify a bunch of variables, parameters, and return values to
eliminate warnings due to strings being given const qualifiers.  Cast
away those warnings in some cases where an API we don't control forces
us to do so.

Enable a bunch of additional warnings by default.  Note why at least
some of the other warnings aren't enabled.

randpkt.c and text2pcap.c are used to build programs, so they don't need
to be in EXTRA_DIST.

If the user specifies --enable-warnings-as-errors, add -Werror *even if
the user specified --enable-extra-gcc-flags; assume they know what
they're doing and are willing to have the compile fail due to the extra
GCC warnings being treated as errors.

svn path=/trunk/; revision=46748
2012-12-26 05:57:06 +00:00
Pascal Quantin
4ffc5d699b From J. Bruce Fields via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8103 :
Add parsing of free_stateid, why_no_delegation, backchannel_ctl, secinfo_no_name and destroy_session fields to NFSv4.1 dissector

svn path=/trunk/; revision=46596
2012-12-18 20:58:01 +00:00
Alexis La Goutte
4c58eabc9a Remove unused ett_nfs_security_label variable
svn path=/trunk/; revision=46560
2012-12-16 15:34:13 +00:00
Alexis La Goutte
baf4a0ed5a From Steve Dickson via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8081
Added the Labled NFS protocol dissector for NFS v4.1

Signed-off-by: Steve Dickson <steved@redhat.com>

svn path=/trunk/; revision=46505
2012-12-11 23:23:20 +00:00
Jeff Morriss
0266cceef3 Make all enum_val_t's const.
svn path=/trunk/; revision=46292
2012-11-29 20:15:37 +00:00
Michael Mann
99d0404b73 replaced decode_enumerated_bitfield calls with itemized filters
svn path=/trunk/; revision=45176
2012-09-27 16:49:31 +00:00
Guy Harris
9636d1655d Put the individual property flags under the properties item, rather than
at the top level.

svn path=/trunk/; revision=45159
2012-09-26 20:43:58 +00:00
Michael Mann
97c808c75c replaced decode_boolean_bitfield calls with itemized filters
svn path=/trunk/; revision=45152
2012-09-26 18:10:29 +00:00
Jeff Morriss
2552c750e5 We always HAVE_CONFIG_H so don't bother checking whether we have it or not.
svn path=/trunk/; revision=45017
2012-09-20 02:03:38 +00:00
Michael Mann
fd6b314416 parse nfsv4.1 SEQUENCE status flags (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7726)
svn path=/trunk/; revision=44970
2012-09-18 14:12:17 +00:00
Michael Mann
5dd7371960 more ephemeral memory cleanup
svn path=/trunk/; revision=44496
2012-08-14 17:58:41 +00:00
Bill Meier
2479be037f Use consistent indentation.
svn path=/trunk/; revision=44122
2012-07-29 21:59:25 +00:00
Bill Meier
c68e50e0e8 g_assert --> DISSECTOR_ASSERT
svn path=/trunk/; revision=44117
2012-07-29 20:19:38 +00:00
Bill Meier
4e1bad0218 Fix a typo :(
svn path=/trunk/; revision=44113
2012-07-29 19:05:18 +00:00
Bill Meier
3933d7591b Cast away a compile warning: "conversion from '__int64' to 'gulong', possible loss of data"
svn path=/trunk/; revision=44112
2012-07-29 19:00:46 +00:00
Bill Meier
7a22f13aa0 Fix crash when "file_name_snooping" & "file_full_name_snooping" prefs enabled.
Crash due to a g_snprintf() incorrect (too large) "max number of bytes" parameter.

Note that g_snprintf() apparently writes to (initializes ?) bytes beyond the
 actual string written.

Fixes Bug #7948: (To be confirmed by the user)
See: https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7498


svn path=/trunk/; revision=44111
2012-07-29 18:17:17 +00:00
Jeff Morriss
217514e565 Remove a couple set-but-unused variables. I *think* the new tree isn't
particularly useful...

svn path=/trunk/; revision=43577
2012-07-05 23:31:17 +00:00
Jakub Zawadzki
c7dbc44bf3 Fix bug #7436
offset returned from dissect_nfs_open_claim4, dissect_nfs_openflag4 were different
when we were building tree and where we didn't.
Fix other similar cases.

svn path=/trunk/; revision=43576
2012-07-05 21:09:34 +00:00
Jakub Zawadzki
bf81b42e1e Update Free Software Foundation address.
(COPYING will be updated in next commit)

svn path=/trunk/; revision=43536
2012-06-28 22:56:06 +00:00
Alexis La Goutte
566b6e021b Try to fix some Logic error (Function call argument is an uninitialized value ) Warning found by Clang
svn path=/trunk/; revision=42365
2012-04-30 21:54:45 +00:00
Jakub Zawadzki
8ab67b185e Like r42302 but in other place.
Followup to r42283: the loop which allocates operation summaries may not run
to completion, so don't try to free all the operation summaries.

svn path=/trunk/; revision=42303
2012-04-27 20:49:15 +00:00
Jeff Morriss
a8a5721d47 Fix fuzz failure reported in
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7209 :

Followup to r42283: the loop which allocates operation summaries may not run
to completion, so don't try to free all the operation summaries.

svn path=/trunk/; revision=42302
2012-04-27 20:43:22 +00:00
Anders Broman
9e506104ed From Evan Huus:
Memory leak in NFS Dissector

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7204

svn path=/trunk/; revision=42283
2012-04-27 08:24:02 +00:00
Jakub Zawadzki
8a1dc57c03 Remove doubled semicolons and semicolons outside function.
svn path=/trunk/; revision=42053
2012-04-13 20:22:31 +00:00
Jakub Zawadzki
23494db817 Add missing const attribute to some char *
Fix some "assignment discards qualifiers from pointer target type", etc

svn path=/trunk/; revision=41996
2012-04-09 18:44:10 +00:00
Jeff Morriss
17ce01b48d From Weston Andros Adamson via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7010 :
While developing SP4_MACH_CRED support for the linux nfs client, I noticed that
wireshark was displaying these bitmasks incorrectly (as fattrs instead of NFS
operations).

I also noticed that BACKCHANNEL_CTL (a required value in the mask for
SP4_MACH_CRED) wasn't in names_nfsv4_operation[], so I added it and verified
that we're not missing any other ops.

svn path=/trunk/; revision=41851
2012-03-30 17:50:08 +00:00
Bill Meier
2df5dc3d53 From Reinhard Speyerer: Fix several misspellings/typos in Wireshark
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6967

svn path=/trunk/; revision=41645
2012-03-18 22:24:24 +00:00
Jeff Morriss
3d98787379 From Weston Andros Adamson via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6919 :
Both deviceid4 and sessionid4 are currently decoded as rpc_opaque_data - this
means their values are never displayed in the "Packet Detail" section and to
see them you have to select the name in the "Packet Detail" section and look at
the byte range in the "Packet Bytes" section.

The attached patch (against today's SVN) adds dissectors for both so these
values are displayed in the "Packet Detail" section.

svn path=/trunk/; revision=41417
2012-03-08 03:57:48 +00:00
Chris Maynard
5debb5c5e3 Fix memory leaks involving tvb_get_string[z]().
svn path=/trunk/; revision=40312
2011-12-28 16:36:57 +00:00