Commit graph

162 commits

Author SHA1 Message Date
Gerasimos Dimitriadis
c840cdd5a0 Remove the address operator from value_string arrays fed to VALS()
svn path=/trunk/; revision=30995
2009-11-17 18:35:27 +00:00
Jaap Keuter
be342f9e26 From Bernard Imbert:
If the "Level Of Interest" referenced in the smb.trans2.FIND_FIRST/FIND_NEXT
requests is 262, wireshark is unable to decode properly (neither the request
nor the response).

svn path=/trunk/; revision=30923
2009-11-10 19:24:50 +00:00
Jeff Morriss
2d8acf2a74 Fix an off-by-one error (<= instead of <) that caused the dissector to
reference uninitialized memory, possibly leading to a crash (found by turning
memory scrubbing on).

svn path=/trunk/; revision=30595
2009-10-18 14:46:39 +00:00
Ronnie Sahlberg
2ee73bdf0c add proper support for infolevel 105 for ff
they are different.


svn path=/trunk/; revision=30568
2009-10-16 06:17:55 +00:00
Ronnie Sahlberg
9339cf747c add dissection of infolevel 0x105 for findfirst
this is actually identical to infolevel 0x104 in smb  while they differ 
in smb2


svn path=/trunk/; revision=30567
2009-10-16 05:31:43 +00:00
Jaap Keuter
75f1e13c12 Cleanup header fields.
svn path=/trunk/; revision=30394
2009-10-07 23:08:22 +00:00
Kovarththanan Rajaratnam
65c53fedb6 Don't guard col_append_str with check_col
svn path=/trunk/; revision=30125
2009-09-24 20:00:21 +00:00
Kovarththanan Rajaratnam
ebaaada382 Only duplicate string the first time around, i.e. 'pinfo->fd->flags.visited == FALSE' or else we end up leaking memory
svn path=/trunk/; revision=30013
2009-09-20 13:36:16 +00:00
Bill Meier
6f004d3f46 From yami<yamisoe At ...>: Fix Bug #3542: get_dfs_referral referral entry is not dissected corectly.
(See https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3542)

The current get_dfs_referral response code is based on old protocol specs,
which are unofficial, erroneous. 

I modify packet-smb.c to be confirm to protocol's official spec. Some
changes are:

  1. handle referral entry version 2, 3, 4 separately. The current code does
not distinguish v3 from v2, however they are not same.
  2. change server type, referral flags etc.
  3. refactor some code, such as string dissecting.

Also: From me: a small change to handle possible overflow
when subtracting from a guint16.


svn path=/trunk/; revision=29986
2009-09-18 22:41:04 +00:00
Kovarththanan Rajaratnam
8b515e9340 Switch a bunch of dissectors over to using tvb_new_subset_remaining()
svn path=/trunk/; revision=29446
2009-08-16 12:36:22 +00:00
Kovarththanan Rajaratnam
ac463d2697 Don't guard col_clear with col_check
svn path=/trunk/; revision=29346
2009-08-09 08:14:59 +00:00
Kovarththanan Rajaratnam
6110a96f68 Don't guard col_set_str (COL_INFO/COL_PROTOCOL) with col_check
svn path=/trunk/; revision=29345
2009-08-09 07:59:51 +00:00
Stig Bjørlykke
4d8dd01e8e Changed flags_set_truth -> tfs_set_notset
svn path=/trunk/; revision=28989
2009-07-07 14:54:15 +00:00
Stig Bjørlykke
0437f102c3 From Kovarththanan Rajaratnam:
More FT_XXX cleanup.

svn path=/trunk/; revision=28971
2009-07-07 09:02:59 +00:00
Stig Bjørlykke
b228488bc0 From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
    for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
    FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero

svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
Guy Harris
cf91fdf16b Have tap listeners specify whether the "packet" routine requires
a protocol tree;

	the column values.

This includes stats-tree listeners.

Have the routines to build the packet list, and to retap packets, honor
those requirements.  This means that cf_retap_packets() no longer needs
an argument to specify whether to construct the column values or not, so
get rid of that argument.

This also means that there's no need for a tap to have a fake filter
to ensure that the protocol tree will be built, so don't set up a fake
"frame" filter.

While we're at it, clean up some cases where "no filter" was represented
as a null string rather than a null pointer.

Have a routine to return an indication of the number of tap listeners
with filters; use that rather than the global num_tap_filters.

Clean up some indentation and some gboolean vs. gint items.

svn path=/trunk/; revision=28645
2009-06-05 22:42:47 +00:00
Anders Broman
b4aeb97ed5 tvb_new_real_data -> tvb_new_child_real_data
svn path=/trunk/; revision=28517
2009-05-29 06:16:43 +00:00
Stig Bjørlykke
0258be0b05 From Jakub Zawadzki:
More remove checking for NULL before g_free().

svn path=/trunk/; revision=27728
2009-03-15 18:08:46 +00:00
Gerald Combs
6d04f793f0 Back out r27047 and r27053.
svn path=/trunk/; revision=27062
2008-12-19 17:39:52 +00:00
Gerald Combs
fc71188963 Update calls to proto_tree_add_bytes_format to reflect r27047.
svn path=/trunk/; revision=27053
2008-12-18 20:19:49 +00:00
Bill Meier
33c99f44fd Fix typos and spelling (mostly in text strings)
svn path=/trunk/; revision=27028
2008-12-17 00:08:38 +00:00
Gerald Combs
5f9afcd2c1 Squelch a couple of Valgrind warnings.
svn path=/trunk/; revision=26946
2008-12-09 17:16:20 +00:00
Bill Meier
69336f7d96 Minor cleanup for proto_reg-handoff & etc
svn path=/trunk/; revision=26285
2008-09-27 14:02:23 +00:00
Ronnie Sahlberg
0536955ab3 track smb dialects between negprot request to the responses so we can
show the name of the selected dialect in the response and not just the 
index


svn path=/trunk/; revision=26263
2008-09-24 16:16:01 +00:00
Jeff Morriss
4a0826ef2f From yami via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2603 : register the SMB dissector by name.
svn path=/trunk/; revision=25444
2008-06-12 13:39:55 +00:00
Guy Harris
bdd6b807d7 Note underflow/overflow possibilities (there used to be checks that
clamped at TIME_T_MIN and TIME_T_MAX, but newer versions of GCC
"helpfully" warn that the usual checks for overflow or underflow "can't
fail").

svn path=/trunk/; revision=25391
2008-05-29 16:51:49 +00:00
Bill Meier
44af6ef887 Fix some of the Errors/warnings detected by checkapi.
svn path=/trunk/; revision=25290
2008-05-14 01:47:41 +00:00
Jörg Mayer
60547db130 gcc 4.3 will not handle an overflow in the expected way but will warn instead. -Werror does the rest
svn path=/trunk/; revision=25029
2008-04-14 21:33:56 +00:00
Jeff Morriss
dd11fc1385 Fix another crash from http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=1113 : conv_tables_t hold several g_malloc()'d things that need to be freed in smb_init_protocol() but the conv_tables themselves were se_ allocated so they have already been freed by the time we want to try to free them. Fix this by g_malloc()'ing them and freeing them after we've freed their contents.
svn path=/trunk/; revision=24669
2008-03-17 17:46:05 +00:00
Stig Bjørlykke
b091b8d26c Rewrote to use g_strlcpy and g_strlcat.
svn path=/trunk/; revision=24525
2008-03-01 17:23:39 +00:00
Stig Bjørlykke
28ae535b00 Removed even more "statement not reached" warnings.
svn path=/trunk/; revision=24286
2008-02-07 15:44:45 +00:00
Ronnie Sahlberg
7e919ef623 add support for qpi level 516 : posix acl
svn path=/trunk/; revision=24052
2008-01-09 23:10:17 +00:00
Ronnie Sahlberg
9a3eeab4ee add some more names for Query/Set path info levels and add empty stubs
for these blobs


svn path=/trunk/; revision=23831
2007-12-10 21:16:17 +00:00
Gerald Combs
3697704b62 Fix bug 2019: The SMB dissector was dereferencing a NULL pointer.
svn path=/trunk/; revision=23593
2007-11-25 23:08:09 +00:00
Anders Broman
6226035893 Apply yet another set of the optimization patches:
When offset parameter is 0 replace tvb_bytes_exist() with the faster tvb_length().

On the other hand 
	if (tvb_bytes_exist(tvb, 0, 20)
is more readable than
	if (tvb_length(tvb) >= 20

so only do it in heuristic function

svn path=/trunk/; revision=23412
2007-11-09 06:01:18 +00:00
Anders Broman
4d07f32a41 Apply yet another set of the optimization patches:
- Move proto_tree_add_xxxx calls inside 'if (tree) {}' block

svn path=/trunk/; revision=23403
2007-11-08 22:38:06 +00:00
Anders Broman
1950ffc214 Apply the small performance enhancment patches for:
- if offset is 0, tvb_length is the same as tvb_length_remaining, just faster.
Replace 
- col_append_fstr() with faster  col_append_str() 
- col_add_str() with col_set_str()
when it's safe

svn path=/trunk/; revision=23252
2007-10-23 05:50:00 +00:00
Ronnie Sahlberg
331d267b50 we need to track the fid in the rwdata structure so that reassembly of
connectionoriented dcerpc over smb pipes will be able to find the fid 
used for reassembly


svn path=/trunk/; revision=22557
2007-08-20 08:09:52 +00:00
Ronnie Sahlberg
f74d20b142 track filenames between rename requests and responses to make it easier to
diagnose why a rename failed


svn path=/trunk/; revision=22122
2007-06-17 23:58:01 +00:00
Ronnie Sahlberg
0adc338017 remember locking info between requests and repsonses so it is easier to
diagnose why an operation returned an error


svn path=/trunk/; revision=22121
2007-06-17 20:57:34 +00:00
Guy Harris
ad07451fd1 For various routines used by dissect_smb_fid() to dissect various FID
attributes specified at open time, have them take a length value, and
pass 4 if the values are extracted from the current packet and 0 if they
come from values saved when the FID was opened (as they're generated
values not found in the packet) - that fixes bug 1638.

svn path=/trunk/; revision=22053
2007-06-05 21:23:49 +00:00
Ronnie Sahlberg
49849c691e show the directory name in replies to CreateDir/Checkdir and DeleteDir
svn path=/trunk/; revision=21899
2007-05-22 23:12:58 +00:00
Ronnie Sahlberg
bc33880788 show the filename that was to be deleted in the Delete reply
svn path=/trunk/; revision=21897
2007-05-22 23:05:25 +00:00
Ronnie Sahlberg
9f69a4eae2 improve FIND_FIRST2 useability in the same way as in the previous
patches


svn path=/trunk/; revision=21881
2007-05-22 03:55:54 +00:00
Ronnie Sahlberg
050a0508e1 remember the object name from a QUERY_PATH_INFO and show it as a
generated item in the response.

also show the infolevel in the response as a generated item


svn path=/trunk/; revision=21880
2007-05-22 03:33:51 +00:00
Ronnie Sahlberg
dac8664c9e show the QUERY_FS_INFO level as a generated item in the response packet
svn path=/trunk/; revision=21875
2007-05-22 02:14:35 +00:00
Ronnie Sahlberg
c5575a6894 add the level of interest to the dissection of QUERY_PATH_INFO/QUERY_FILE_INFO responses
as a generated item


svn path=/trunk/; revision=21874
2007-05-22 01:42:56 +00:00
Ronnie Sahlberg
196ed78ce8 add the disposition to the data we store for how a fid is opened
svn path=/trunk/; revision=21873
2007-05-22 01:26:32 +00:00
Ronnie Sahlberg
52143e84d0 add tracking of OFFSET/LENGTH to reads/writes so we can easily see in a failed read/write
what offset/length was requested


svn path=/trunk/; revision=21858
2007-05-21 07:17:36 +00:00
Ronnie Sahlberg
274ef386b0 since we now have a generic "track fid for transactions" we no longer need to do this
explicitely in the read/write functions


svn path=/trunk/; revision=21857
2007-05-21 06:49:18 +00:00