Commit Graph

56 Commits

Author SHA1 Message Date
Bill Meier 4748747a51 Fix a few proto_tree_add_item() encoding args.
svn path=/trunk/; revision=39519
2011-10-23 18:48:50 +00:00
Bill Meier 67ee5049d4 Convert 'encoding' parameter of certain proto_tree_add_item() calls in non-autogenerated epan/dissectors:
Specifically:  Replace FALSE|0 and TRUE|1 by ENC_BIG_ENDIAN|ENC_LITTLE_ENDIAN as
  the encoding parameter for proto_tree_add_item() calls which directly reference
  an item in hf[] which has a type of:
     FT_BOOLEAN
     FT_IPv4
     FT_EUI64
     FT_GUID
     FT_UINT_STRING

Also: For type FT_ITv6 use ENC_NA. (This was missed in SVN #39260)

svn path=/trunk/; revision=39328
2011-10-10 00:39:31 +00:00
Bill Meier 4e57694d4a Convert 'encoding' parameter of certain proto_tree_add_item() calls in non-autogenerated epan/dissectors:
Specifically:  Replace FALSE|0 and TRUE|1 by ENC_BIG_ENDIAN|ENC_LITTLE_ENDIAN as
 the encoding parameter for proto_tree_add_item() calls which directly reference
 an item in hf[] which has a type of:
    FT_UINT8
    FT_UINT16
    FT_UINT24
    FT_UINT32
    FT_UINT64
    FT_INT8
    FT_INT16
    FT_INT24
    FT_INT32
    FT_INT64
    FT_FLOAT
    FT_DOUBLE


svn path=/trunk/; revision=39288
2011-10-06 03:35:44 +00:00
Alexis La Goutte 5147a51e3a From Gregor Beck via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6004
dissect_nt_v2_ace: doesn't support ace type > 8

svn path=/trunk/; revision=37692
2011-06-17 12:28:21 +00:00
Jeff Morriss 278caa12d9 Fix some (value) mistakes in value_strings. Found by Martin's patch on the -dev list.
svn path=/trunk/; revision=37262
2011-05-18 21:07:59 +00:00
Chris Maynard 0ea2cd66e7 Delete assignment of item as it's not used. Fixes Coverity CID 869.
svn path=/trunk/; revision=37131
2011-05-13 19:15:21 +00:00
Stig Bjørlykke 27344a90fe Removed some unneeded assignments.
Found by clang.

svn path=/trunk/; revision=36698
2011-04-18 15:29:25 +00:00
Anders Broman d75443b02c packet-windows-common.c:1492: warning: 'wkwn_sid2_len' may be used uninitialized in this function
svn path=/trunk/; revision=35648
2011-01-25 15:34:52 +00:00
Anders Broman c2202875d1 Fix:
Error: the blurb for field "Well-known SID" ("nt.sid.wkwn") matches the field name in packet-windows-common.c

svn path=/trunk/; revision=35647
2011-01-25 15:33:36 +00:00
Anders Broman 3605d892f0 From Cal Turney:
Enhancements to SID dissection.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5613

svn path=/trunk/; revision=35643
2011-01-25 13:53:35 +00:00
Jeff Morriss 9d007f19f1 From Yaniv Kaul via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5372 :
Fix crash in LDAP dissector, in a generic way (for all callers of
dissect_nt_sid()).

svn path=/trunk/; revision=35127
2010-12-06 15:57:39 +00:00
Jeff Morriss 8c7c46d0fc Remove trailing space in field name.
svn path=/trunk/; revision=34639
2010-10-25 00:57:41 +00:00
Stig Bjørlykke 14d908de38 Corrected check for end of well_known_sids.
This fixes bug 5328.

svn path=/trunk/; revision=34619
2010-10-22 10:48:14 +00:00
Stig Bjørlykke efd9c3e0c9 Fixed printing guint64 variables.
Removed unused variables.

svn path=/trunk/; revision=34617
2010-10-22 06:42:55 +00:00
Anders Broman e64d2d99c0 C++ style comments in packet-windows-common.c
svn path=/trunk/; revision=34616
2010-10-22 06:26:42 +00:00
Anders Broman 9c9db7d4d4 From CaL Turney:
Add support for well-known SIDs/RIDs and option to display in hex.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5286

svn path=/trunk/; revision=34613
2010-10-22 05:15:25 +00:00
Bill Meier 066ba23f0b Fix some gcc -Wshadow warnings
svn path=/trunk/; revision=31673
2010-01-26 01:00:15 +00:00
Gerald Combs 9a35ed601d Remove more unused variables.
svn path=/trunk/; revision=29249
2009-07-30 23:47:36 +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 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 33ab682655 Use an emem_strbuf_t for the string for the subauthorities; it's a bit
cleaner, and also means that if there are no subauthorities we don't get
an uninitialized string.

svn path=/trunk/; revision=28272
2009-05-05 03:17:06 +00:00
Bill Meier 6d740b3d00 From: yami <yamisoe [AT] gmail.com>: Update comment in .c file; copy same to .h file
svn path=/trunk/; revision=27909
2009-03-31 11:59:59 +00:00
Bill Meier d6a5a7c761 P64 changes: Fix some cases for which size_t is not required
svn path=/trunk/; revision=27822
2009-03-22 20:55:31 +00:00
Ronnie Sahlberg b94c255167 the security info bitmask is 4 bytes, not 2
svn path=/trunk/; revision=26341
2008-10-03 02:48:52 +00:00
Ronnie Sahlberg 48cabe4f20 SAMR updates
svn path=/trunk/; revision=26340
2008-10-03 02:39:17 +00:00
Ronnie Sahlberg db3711d720 this error is returned in srvsvc when a SessDel fails because no matching session can be
found


svn path=/trunk/; revision=21823
2007-05-18 05:25:31 +00:00
Ronnie Sahlberg c6addcd89f add a new dos error code
svn path=/trunk/; revision=21809
2007-05-17 01:19:26 +00:00
Stephen Fisher 64cc1b407c From Sebastien Tandel:
(Fixing warnings)

stripped away some unused variables/parameters
+ in prefs.c
    suggestion of parentheses makes gcc happy


svn path=/trunk/; revision=21156
2007-03-23 18:45:21 +00:00
Ronnie Sahlberg 1b3847969e we did not have a proper WERR error table for the windows errors insterad we justkept adding the errors to the DOS error table (this merging does work ok since there is so very little overlap between he values in both ranges)
Add a new WERR error table to packet-windows-common    so that PIDL generated dissectors can use this table instead of the DOS table.


To make this table as complete and accurate as possible and to avoid having to type all the values in by hand    the table is generated from the samba doserr.h file and two small commandlines.
The commends in pakcet-windows-common.h explains how to regenerate the table from doserr.h






svn path=/trunk/; revision=19306
2006-09-23 21:55:40 +00:00
Ronnie Sahlberg 7bed417e5e make dissect_nt_sid return ep allocated memory and thus fix a few memory leaks
(this function is often called from dcerpc dissectors)


svn path=/trunk/; revision=19243
2006-09-16 09:20:34 +00:00
Ronnie Sahlberg 542380d974 fix for bug 1054
there were instances where the function dissect_nt_sid() would not fill in the return pointer for the sid string
causing callers that rely on that this string will ALWAYS be assigned try to access and g_free() an uninitialized pointer.

dissect_nt_sid() should be changed to use and return ep allocated memory instead of gmalloced memory



svn path=/trunk/; revision=19154
2006-09-05 15:13:39 +00:00
Guy Harris a9469ccb31 Squelch a compiler warning.
svn path=/trunk/; revision=18988
2006-08-21 23:23:22 +00:00
Ronnie Sahlberg c0e5ca30ad add some well known rids from s4 security.idl and code to show the name of this rid
when dissecting a security descriptor


svn path=/trunk/; revision=18959
2006-08-19 09:22:20 +00:00
Ronnie Sahlberg 23426c8901 add missing ace revision 4 and several new types some of which contain optional GUIDs
from samba4   security.idl


svn path=/trunk/; revision=18875
2006-08-10 13:21:57 +00:00
Ronnie Sahlberg feab79e328 change a whole bunch of ethereal into wireshark
svn path=/trunk/; revision=18196
2006-05-21 04:49:01 +00:00
Jörg Mayer 1900bf87fc done:
packet-ntp.c: Rather confused and incorrect use of g_snprintf return value
packet-pim.c: whitespace change
packet-icmpv6.c: g_snprintf takes trailing \0 into account, fix off by 1 error
packet-clnp.c: Fix incorrect use of g_snprintf return value
packet-isakmp.c: g_snprintf takes trailing \0 into account
packet-tr.c: Fix incorrect use of g_snprintf return value
packet-radius.c: Fix incorrect use of g_snprintf return value
packet-radius.h: constify a string variable
packet-ldap.c: The return value isn't needed, so don't use it incorrectly
packet-tcp.c: Fix incorrect use of g_snprintf return value
packet-windows-common.c: Remove unneeded DISSECTOR_ASSERT
packet-smb-sidsnooping.c: g_snprintf takes trailing \0 into account
packet-pvfs2.c: g_snprintf takes trailing \0 into account
packet-ptp.c: Remove #include snprintf
packet-ppp.c: Fix incorrect use of g_snprintf return value
packet-ospf.c: Fix incorrect use of g_snprintf return value
packet-mip6.c: snprintf -> g_snprintf
packet-bootp.c: Remove a commented out bad use of g_snprintf
packet-ber.c: snprintf -> g_snprintf, g_snprintf takes trailing \0 into account

2do:

     52 packet-ieee80211.c: 2DO
      2 packet-nfs.c: 2DO - too many side effects
     33 packet-bgp.c: 2DO
     18 packet-dns.c: 2DO
     14 packet-dcm.c: 2DO
     13 packet-x11.c: 2DO
     11 packet-kerberos.c: 2DO
     10 packet-diameter.c: 2DO
      9 packet-snmp.c: 2DO
      9 packet-pgm.c: 2DO
      7 packet-nbns.c: 2DO
      6 packet-fcswils.c: 2DO
      5 packet-wccp.c: 2DO
      5 packet-cops.c: 2DO
      4 packet-wtp.c: 2DO


svn path=/trunk/; revision=17038
2006-01-16 07:59:44 +00:00
Jörg Mayer 122671b36c Jaap Keuter:
I'm not too fond of using pointer arithmetic in such cases. How about
this:


svn path=/trunk/; revision=17031
2006-01-14 23:09:44 +00:00
Jörg Mayer 0bfcf705cd We may not work with the length returned by g_snprintf, as this is
the number of bytes that would have been used if the buffer was long
enough.
Fixes http://bugs.ethereal.com/bugzilla/show_bug.cgi?id=686

svn path=/trunk/; revision=17030
2006-01-14 11:29:24 +00:00
Ronnie Sahlberg 4e518c616d some ACEs are not used for authorization and thus do NOT contain an access mask and a SID.
make the dissection of the ACL check the type for each individual ACE and only dissect  as access mask and sid  those ACEs we know how to handle.


this prevents ethereal from dumping on w32 if we encounter any of these "special" ACE entries,   such as the ones used for storing location data for offline files.




svn path=/trunk/; revision=16881
2005-12-22 08:51:50 +00:00
Guy Harris 2a8e47b11a Don't ensure all the bytes of a security descriptor exist before calling
"dissect_nt_sec_desc()".  Add a Boolean argument to
"dissect_nt_sec_desc()" to indicate whether a length was passed to it
(so we don't treat -1 as a special value; we want to stop treating -1 as
a special length value, and, in fact, want to stop treating *any*
negative length values specially, so that we don't have to worry about
passing arbitrary 32-bit values from packets as lengths), and have
"dissect_nt_sec_desc()" initially create the protocol tree item for the
security descriptor with a length of "go to the end of the tvbuff", and
set the length once we're done dissecting it - and, if the length was
specified, check at *that* point, *after* we've dissected the security
descriptor, whether we have the entire security descriptor in the
tvbuff.

That means that we don't have to worry about overflows after
"dissect_nt_sec_desc()" returns - if the length was so large that we
would have gotten an overflow, we'd have thrown an exception in the
"tvb_ensure_bytes_exist()" call at the end of "dissect_nt_sec_desc()".

Do sanity checks on offsets within the security descriptor, so we know
the item referred to by the offset is after the fixed-length portion of
the descriptor.

svn path=/trunk/; revision=16113
2005-10-04 10:23:40 +00:00
Guy Harris ab2dca9114 Move some headers for stuff defined by a dissector into epan/dissectors
- and rename smb.h to packet-smb.h, as it's packet-smb.c's header file.

svn path=/trunk/; revision=15845
2005-09-17 00:31:15 +00:00
Guy Harris b7b80d94be Move a pile of protocol-related headers from the top-level source
directory to the epan directory.  Some of them should perhaps ultimately
be moved to epan/dissectors, if they pertain only to stuff exported by a
particular dissector.

Fix Gerald's e-mail address in files we're moving.

svn path=/trunk/; revision=15844
2005-09-17 00:02:31 +00:00
Ronnie Sahlberg 259de71199 change one g_string_sprintf() into g_snprintf() and move one array of characters from the stack into emem allocated memory
svn path=/trunk/; revision=15617
2005-08-30 08:23:50 +00:00
Jörg Mayer 2b2506f0f6 More char -> const char warning fixes
svn path=/trunk/; revision=15222
2005-08-05 13:10:58 +00:00
Guy Harris 89e823ea4f Yet more constification.
svn path=/trunk/; revision=14788
2005-06-26 21:11:22 +00:00
Ulf Lamping bb4e980df1 bugfix: use g_snprintf instead of sprintf to prevent a buffer overflow
svn path=/trunk/; revision=14515
2005-06-01 19:17:59 +00:00
Ronnie Sahlberg a43da7a4ff add dissection of three new flags in the security descriptor
svn path=/trunk/; revision=13210
2005-01-30 23:15:10 +00:00
Guy Harris 7e7d12b446 Update a URL.
svn path=/trunk/; revision=12864
2004-12-30 02:21:33 +00:00
Ulf Lamping e8459f4ea1 Again, some warnings removed.
svn path=/trunk/; revision=12831
2004-12-25 10:30:58 +00:00
Guy Harris e501ee7f01 Check for all bogus ACE lengths, i.e. all lengths < 4.
Clean up indentation.

Add a comment asking whether the revision in an ACL is *really* 2 bytes
and the ACE count is *really* 4 bytes.

svn path=/trunk/; revision=12816
2004-12-22 10:44:20 +00:00