Commit Graph

242 Commits

Author SHA1 Message Date
Anders Broman 201b5205df Get rid of some unused code warnings and fix an Id marking and some indentation changes.
svn path=/trunk/; revision=25803
2008-07-23 12:45:24 +00:00
Stig Bjørlykke 2bb13ae2c2 From Jim Young:
Attached is a patch to the ldap_reinit() function to fix bug 2407.
This particular bug was triggered by the order of steps used to walk
and free the nodes of the ldap_info_items list.  

This should go into the next 1.0 release.

svn path=/trunk/; revision=24838
2008-04-07 22:29:27 +00:00
Jeff Morriss 19a95385be There are several g_malloc()'d things hanging off ldasp_conv_info_t's so don't se_ alloc that structure but rather g_malloc() it and free it after we've freed the contents. This fixes the LDAP part of the crash from http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=1113
svn path=/trunk/; revision=24664
2008-03-17 12:03:36 +00:00
Jeff Morriss a4436253ac Fix LDAP crash (on certain platforms) from http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=1613 : if the string is NULL pass "(null)" in instead (that's the behavior we get on Linux anyway).
svn path=/trunk/; revision=24660
2008-03-16 22:54:37 +00:00
Graeme Lunt fcef5823db 1) Support for configurable LDAP over SSL port
2) Support for RFC 3909 - cancelRequest extendedOperation
3) Support for RFC 3062 - passwordModify extendedOperation
4) Column information for ExtendedRequest, SearchResultRef and AbandonRequest
5) Column information for multiple LDAP operations in the same packet (uses " | " separator)


svn path=/trunk/; revision=24195
2008-01-26 10:12:22 +00:00
Stig Bjørlykke 7629966a00 - Removed some unused variables in asn1 dissectors
- Fixed last parameter to cry_cipher_open() in pkcs12

svn path=/trunk/; revision=24116
2008-01-16 20:41:23 +00:00
Graeme Lunt 8563c02137 Basic support for the LDAP start_tls extended operation and fix to match up extended operation arguments and results.
svn path=/trunk/; revision=24076
2008-01-13 14:12:47 +00:00
Anders Broman de16039c51 Get rid of dissect_ber_boolean_value() and change the signature of
dissect_ber_boolean() to return a value and update asn2wrs to generate the new signature.
Regenerate all BER dissectors.

svn path=/trunk/; revision=24015
2008-01-04 16:21:07 +00:00
Anders Broman a6d82ae12e Get rid of ber_last_created_item().
svn path=/trunk/; revision=24008
2008-01-04 12:39:52 +00:00
Jörg Mayer 3d22aa561b asn1/*/Makefile.nmake were not part of the source package.
Spotted by Tomas Kukosa.

svn path=/trunk/; revision=23921
2007-12-19 10:02:50 +00:00
Tomas Kukosa 1e794fc494 ANSI TCAP regenerated and tested with -T -X asn2wrs options
asn2wrs has -T (tagged types support) and -X (new BER sttructures) default behavior
remove all -T and -X usage

svn path=/trunk/; revision=23823
2007-12-10 08:35:41 +00:00
Ronnie Sahlberg affd07f1e4 dissect_ber_choice() returns the index of the taken arm not the tag
value


svn path=/trunk/; revision=23458
2007-11-15 10:32:10 +00:00
Anders Broman bec8475743 LDAP with -T
svn path=/trunk/; revision=23353
2007-11-04 17:16:01 +00:00
Anders Broman 92ba89b5d1 LDAP wasn't 'fixed' to handle -T option...
svn path=/trunk/; revision=23335
2007-11-01 22:29:02 +00:00
Anders Broman dbcabb1938 Get rid of most of the legacy oid stuff.
svn path=/trunk/; revision=23333
2007-11-01 22:07:43 +00:00
Anders Broman 9492700608 Change:
get_oid_str_name() -> oid_resolved_from_string()
get_oid_name() -> oid_resolved_from_encoded()

svn path=/trunk/; revision=23331
2007-11-01 19:36:39 +00:00
Anders Broman 7329ae8ac6 Use oid_add_from_string for adding names.
fix compil of gsmmap and inap.
Note xcopy of gsmmap does not work(rename packet-gsm_map -> packet-gsmmap ?)

svn path=/trunk/; revision=23325
2007-10-31 23:11:15 +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
Jörg Mayer 0e0bed500d - Remove -e option if the generated -exp.cnf file isn't used.
- Add EXPORT_FILES to all files that still contain -e.

svn path=/trunk/; revision=23145
2007-10-11 05:27:27 +00:00
Jörg Mayer 61cde0d09e - Change Makefiles to include preinc
- Add missing new directories to asn1/Makefile.nmake

svn path=/trunk/; revision=23141
2007-10-10 19:03:24 +00:00
Jörg Mayer 24470fdfae More conversions and updates to existing Makefile stuff
svn path=/trunk/; revision=23127
2007-10-10 08:09:19 +00:00
Martin Mathieson 3c46610074 Try to fix the build...
svn path=/trunk/; revision=23109
2007-10-09 11:10:59 +00:00
Anders Broman 6d1791db07 Fix:
packet-ldap-template.c(1330) : error C2220: warning treated as error - no object  file generated
packet-ldap-template.c(1330) : warning C4101: 'gss_len' : unreferenced local var iable NMAKE : fatal error U1077: 'cl' :

svn path=/trunk/; revision=22956
2007-09-25 16:51:49 +00:00
Ronnie Sahlberg 84b28f1399 only set ldap_info->first_auth_frame to 0 first time we see the
authentication packet or else we will get inconsistent dissection when 
clicking on packets.
(inconsistent as in :  a certain packet might/might not be dissected as 
LDAP/SASL depending on which packets we clicked on previously)
  

svn path=/trunk/; revision=22949
2007-09-25 08:05:17 +00:00
Ronnie Sahlberg dea0c3c9de not all SASL protected blobs use a GSS wrapper for the payload so we
cant check that the payload starts with BER tag 0x60 and an oid.
instead  check that the length byte (first 4 bytes) look sane and if 
SASL authentication has been negotiated on the connection

also, sometimes clients will mix both non-SASL and SASL protected LDAP 
traffic on the same tcp connection   by initially performing simple 
unauthenticated searches on the database before performing the Bind.



svn path=/trunk/; revision=22948
2007-09-25 07:47:00 +00:00
Ronnie Sahlberg 3acb5a0975 add support for yet another random combination of authentication
wrappers that can be used when connecting with sasl


svn path=/trunk/; revision=22945
2007-09-25 04:15:30 +00:00
Luis Ontanon 00c5e48a17 get users of oid_resolv to use the new oids, rollout packet-snmp.c
svn path=/trunk/; revision=22651
2007-08-25 01:14:24 +00:00
Jörg Mayer b312e64f6a get_ber_length doesn't need the tree argument, get rid of it.
Rebuild asn1 dissectors.

svn path=/trunk/; revision=22627
2007-08-24 07:12:04 +00:00
Jeff Morriss ffec5b8896 Convert a couple tvb_get_string()'s into tvb_get_ephemeral_string(). In the one remaining use of tvb_get_string(), g_free the old entry if the pointer is *not* NULL.
svn path=/trunk/; revision=22518
2007-08-15 22:41:49 +00:00
Anders Broman cfb7fb8599 Remove obsolete README file.
svn path=/trunk/; revision=22199
2007-06-27 06:03:13 +00:00
Ronnie Sahlberg 45b5adb97b remove some compiler warning due to unused pinfo parameter
a SASL encapsulated ldap blob can contain more than one LDAP message so 
the rest_is_pad parameter is bogus and thus removed.

make dissect_ldap_pdu handle when we have more than one LDAP message 
inside one sasl blob


svn path=/trunk/; revision=22181
2007-06-24 17:23:55 +00:00
Ronnie Sahlberg 35f3ff0246 add code to handle new insanity in how spnego and gss wrap
eachother



svn path=/trunk/; revision=22165
2007-06-22 19:32:02 +00:00
Tomas Kukosa 1dcf2aaef0 use ASN.1 type names in #.FN_BODY (instead of Wireshark type names)
svn path=/trunk/; revision=22054
2007-06-06 08:12:27 +00:00
Tomas Kukosa 31e45c7a21 not allow #.FN_HDR/FTR for Wireshark types but only for ASN.1 types
it makes interconnection between .cnf file and ASN.1 source more readable
(changes for #.FN_BODY will follow)

svn path=/trunk/; revision=22043
2007-06-05 12:00:57 +00:00
Anders Broman 8673ae26d3 - LDAP generated with -X option
- a minor update to MobileDomainDefinitions.asn adding ID and a document reference.

svn path=/trunk/; revision=22010
2007-05-30 21:50:31 +00:00
Anders Broman 4b2284cc35 Clean up the .cnf file a bit.
svn path=/trunk/; revision=21992
2007-05-29 19:08:26 +00:00
Anders Broman dca634c4de Prepare for the use of the new -X parameter for BER encoded protocols.
svn path=/trunk/; revision=21889
2007-05-22 16:17:54 +00:00
Anders Broman f08cd1e5e3 actx in the rest of dissect_ber..()l
svn path=/trunk/; revision=21773
2007-05-15 05:49:43 +00:00
Anders Broman c01f382974 Second step in introducing asn context to BER dissectors just like in PER.
svn path=/trunk/; revision=21753
2007-05-13 20:58:29 +00:00
Anders Broman 1cf1f16391 Split out common asn1 stuff to asn1.h and include that where needed.
svn path=/trunk/; revision=21635
2007-05-01 22:05:11 +00:00
Graeme Lunt c55b754264 Tidy ups for SASL/GSSAPI support:
1) Handle empty (zero length) saslCredentials
2) Handle "GSSAPI" auth_mech when identified from the bind
3) Annotate column info to show SASL service applied to LDAP operation


svn path=/trunk/; revision=20830
2007-02-17 11:06:25 +00:00
Guy Harris 34cd954555 Note that this isn't just cut and pasted from RFC 2251.
svn path=/trunk/; revision=20005
2006-11-27 19:41:07 +00:00
Ronnie Sahlberg 30a62fa3e7 remove file that is not used
bug 1247


svn path=/trunk/; revision=19997
2006-11-27 09:00:01 +00:00
Jaap Keuter 066cab237e Don't remove a preference, make it obsolete instead.
svn path=/trunk/; revision=19818
2006-11-06 11:41:02 +00:00
Graeme Lunt 326773f754 Tidy up of information column for NTLM authentication.
Related to Bug 1148.


svn path=/trunk/; revision=19810
2006-11-05 12:15:52 +00:00
Graeme Lunt e15d91a592 General updates to:
*) Remove maximum LDAP PDU size check - they can get large with either large attributes (e.g. CRLs, SPIFs) or with lots of results (see http://www.wireshark.org/lists/wireshark-users/200610/msg00197.html). The max size preference is also removed.
*) Support for dissecting LDAP controls including server side sorting and paged results. A new BER function is introduced to see if there is a dissector for a given OID.
*) Remove reference to removed BER preference in the LDAP reassembly preference.
*) Mark a LDAPURL as a URL


svn path=/trunk/; revision=19792
2006-11-04 09:14:54 +00:00
Ronnie Sahlberg 2d1bb39121 change the signature for the get_pdu_len() function pointer passed to tcp_dissect_pdus() to also include a packet_info pointer.
there are many reasons why some protocols actually need to be able to access the pinfo structure while determining the pdu size



svn path=/trunk/; revision=19751
2006-10-31 09:29:07 +00:00
Ulf Lamping 647533a5ef put every python script name into "" so the call won't fail on Win32 native python.
The problem is the slash in e.g.:

 @$(PYTHON) ../../tools/make-dissector-reg.py

is interpreted as an option instead of being part of the path.

I didn't wanted to use backslashes as this might introduce new problems with cygwin's python port.

svn path=/trunk/; revision=19730
2006-10-29 17:19:52 +00:00
Ronnie Sahlberg daa7210867 fix for 1148
pretty horrible hack to store an ntlmssp blob inside an ldap string

the info column is not entirely pretty but   the payload is at least decoded


svn path=/trunk/; revision=19490
2006-10-11 08:18:14 +00:00
Graeme Lunt 3001ad5169 When dissecting LDAP, the assumption was made that the maximum LDAP PDU size will be 65535. Anything bigger than this was considered not to be LDAP. However, LDAP can have PDU sizes bigger than this - a CRL can easily grow to be bigger than this, for example.
This patch makes the the maximum valid LDAP PDU size a preference. The default value for this new preference is 65535 for backwards compatibility.


svn path=/trunk/; revision=19288
2006-09-22 15:19:32 +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 cf6d4692aa in LDAP over TCP
use tcp_dissect_pdus() which works    insterad of trying to do the pdu tracking and signalling for reassembly manually.
This makes ldap pdu tracking and reassembly work properly for cases when hosts are streaming lpad over tcp and there is little or none alignlemt of pdus to the start of a segment



svn path=/trunk/; revision=18965
2006-08-20 06:00:16 +00:00
Guy Harris 338f7ede99 Squelch a compiler warning.
svn path=/trunk/; revision=18954
2006-08-19 02:56:16 +00:00
Ronnie Sahlberg 5f8e067936 for sec descriptors found inside ldap
decode the specific bits of the accessmask as the ldap specific accessmask bits

bit definitions from samba4


svn path=/trunk/; revision=18881
2006-08-11 07:59:58 +00:00
Ronnie Sahlberg 8969e45027 marik the request_in/response_to/time as generated fields
svn path=/trunk/; revision=18846
2006-08-07 10:35:26 +00:00
Ronnie Sahlberg 5a5dcdc8ad dissect nTSecurityDescriptor attribute as a security descriptor
svn path=/trunk/; revision=18845
2006-08-07 10:29:39 +00:00
Ronnie Sahlberg 5823354433 objectSid attribute contains a sid so decode it nively as a sid
svn path=/trunk/; revision=18844
2006-08-07 10:19:37 +00:00
Ronnie Sahlberg 2d5ec44674 add some more oid's
svn path=/trunk/; revision=18843
2006-08-06 14:31:58 +00:00
Ronnie Sahlberg b446810939 the ldap values for supportedControl and supportedCapabilities is an oid in ascii format.
resolve it into a anme if possible and present it.




svn path=/trunk/; revision=18842
2006-08-06 14:04:07 +00:00
Ronnie Sahlberg 3ef9bcfa26 "objectGUID" should be dissected as a GUID
also change the name of one of the strings we keep around since it is more generic than just used for attributeassertions



svn path=/trunk/; revision=18841
2006-08-06 13:13:42 +00:00
Gerald Combs d4819d4690 Make sure our strings aren't null before we pass them to strncmp().
svn path=/trunk/; revision=18723
2006-07-12 18:12:15 +00:00
Ronnie Sahlberg ed3e02ed61 prettify dissection od ldap attributes
special case some common special attributes such as DomainSid and DomainGuid
and dissect them as SIDs and GUIDs

examples of these special attributes can be seen in Xiaoguang Liu's email to wireshark dev



svn path=/trunk/; revision=18719
2006-07-12 09:02:00 +00:00
Gerald Combs e212e73354 Reset ldm_tree in dissect_ldap_pdu(). Fixes a couple of the current fuzz
bugs.

svn path=/trunk/; revision=18697
2006-07-10 13:42:59 +00:00
Gerald Combs 3ec4dc74e8 Fix a format string bug. This should fix some of the current fuzz
crashes.

svn path=/trunk/; revision=18666
2006-07-05 19:14:59 +00:00
Ronnie Sahlberg d0aae6dd3e from metze
prettify dissection of filters containing substring and extensiblematch



svn path=/trunk/; revision=18617
2006-06-29 21:04:37 +00:00
Gerald Combs 835afe4a96 Reset ldm_tree to NULL each time we dissect an LDAP packet. This should
fix a current Buildbot crash.  Fix up whitespace.

svn path=/trunk/; revision=18601
2006-06-28 22:07:23 +00:00
Tomas Kukosa 56d7db0c08 remove functions register_ber_oid_name() and get_ber_oid_name() from packet-ber.c, they were only OID but not BER related
use add_oid_str_name() and get_oid_str_name() instead of them

svn path=/trunk/; revision=18595
2006-06-28 14:19:08 +00:00
Ronnie Sahlberg 946a39d4fc the dissector for AssertionValue that is implemented in the template file
did not check the implicit_tag flag and caused extensiblematch filters to show up as malformed packets.




svn path=/trunk/; revision=18540
2006-06-22 10:29:49 +00:00
Guy Harris 2d20359c26 Include <epan/dissectors/packet-tcp.h> to declare tcp_dissect_pdus().
svn path=/trunk/; revision=18483
2006-06-16 07:18:25 +00:00
Ronnie Sahlberg 2f95f76a1e fix tcp reassembly to work again for
ldap   and ldap+sasl


remove a recent ber length validation in packet-ber.c that cant work and breaks reassembly  and also makes all ber pacvket sspanning multiple segments show up as malformed packets.



svn path=/trunk/; revision=18465
2006-06-14 11:51:25 +00:00
Ronnie Sahlberg f3c5f96124 from metze
make the display of the filters more similar to how the ldap c api represents
filters and how they are commonly represented in documentation and other texts.




svn path=/trunk/; revision=18449
2006-06-13 07:44:37 +00:00
Guy Harris 6d2e9ee5f7 Constify to fix compiler warnings.
Check for printable ASCII - 0x7F is >= 0x20, but it's not printable, and
0x80 through 0xFF aren't ASCII.

Note that we should perhaps be using RFC 2252-style schemas to figure
out which attribute and assertion values are text and which are binary.

svn path=/trunk/; revision=18447
2006-06-13 05:39:55 +00:00
Anders Broman f51e366267 Fix some warnings.
svn path=/trunk/; revision=18445
2006-06-12 21:48:51 +00:00
Ronnie Sahlberg b501e15fe9 prettify dissection of LDAP search filters.
svn path=/trunk/; revision=18431
2006-06-12 08:30:07 +00:00
Ronnie Sahlberg 452226586d rework the previous patch slightly since we really need to push a string upward to our callers to be able to generate and display nice filter expressions on the top line as the original ldap dissectopr did
svn path=/trunk/; revision=18421
2006-06-10 06:48:09 +00:00
Ronnie Sahlberg fcf198a69d add simple heuristics to the decoding of assertionvalues to make it display ascii strings as ascii and binary data as hex bytes
svn path=/trunk/; revision=18420
2006-06-10 05:07:42 +00:00
Ronnie Sahlberg 5e49882844 make CLDAP show up as CLDAP in the dissectyion tree and not as LDAP
this also makes the "cldap" filter work


svn path=/trunk/; revision=18419
2006-06-10 04:29:26 +00:00
Tomas Kukosa 55600fb60a Ethereal -> Wireshark
asn2eth -> asn2wrs

svn path=/trunk/; revision=18214
2006-05-23 15:17:14 +00:00
Tomas Kukosa 62da958bd9 - asn2eth renamed to asn2wrs
- remove obsolete -X option from makefiles
- not generate enumerated map table for BER

dissector will be regenerated later

svn path=/trunk/; revision=18199
2006-05-21 14:36:05 +00:00
Ronnie Sahlberg 89f022b12b name change
svn path=/trunk/; revision=18197
2006-05-21 05:12:17 +00:00
Graeme Lunt 146d22767c LDAP attribute type dissector framework including support for "netlogon" attribute and PKI attributes
svn path=/trunk/; revision=18109
2006-05-08 17:52:42 +00:00
Ronnie Sahlberg 5a8a9702fe force the AssertionValue type to be displayed as a STRING instead of as hex BYTES.
Most of the time  AssertionValue will contain an ascii string   so make it always display as a string to make the display "correct" most of the time insterad of being "wrong" most of the time.

There are situations when AssertionValue contains binary data though  and in those cases the display will be "wrong" (but not more wrong than the old dissector anyway)


What someone really should do (someone interested in ldap that is) to make it more correct would be to implement a dissector for AssertionValue in the template file and having the dissector check if any of the bytes of the octet string has a value <32   and if so display it in hex as   0x.....
It all bytes have values >=32   then it shoudlk display it as a string "...
instead.

Someone interested in ldap may spend time on this refinement.



svn path=/trunk/; revision=18089
2006-05-04 10:19:32 +00:00
Ronnie Sahlberg c18467254d do some template magic to make ethereal dissect CLDAP RPC again.
i dont think it is the optimal way to solve this but it is better than nothing for the time being.


svn path=/trunk/; revision=18083
2006-05-03 10:59:15 +00:00
Anders Broman 051a12aa9a Preparations to restore CLDAP dissection, no need to regenerate the dissector yet.
svn path=/trunk/; revision=18067
2006-05-02 05:35:55 +00:00
Guy Harris 30820fa73e Include <epan/strutil.h> to define g_ascii_isprint() on systems with
GLib 1.2[.x].

svn path=/trunk/; revision=18061
2006-05-01 17:43:29 +00:00
Guy Harris 53e371e8a7 Add a Makefile to generate the dissectors from UN*X.
svn path=/trunk/; revision=18060
2006-05-01 17:42:01 +00:00
Graeme Lunt 4efe0f2423 Request/result matching, port preference and display tweaks
svn path=/trunk/; revision=18042
2006-04-30 07:23:42 +00:00
Guy Harris a6930fe4ae Add distclean and maintainerclean rules.
svn path=/trunk/; revision=17999
2006-04-25 18:45:08 +00:00
Anders Broman 54f6b68edc Add parsertab.pyc in clean target
svn path=/trunk/; revision=17387
2006-02-23 20:05:52 +00:00
Anders Broman 3d728fcf08 Put in some of the old functionallity.
svn path=/trunk/; revision=17360
2006-02-21 18:56:25 +00:00
Jörg Mayer 50d94b2f95 Add missing propset ...
svn path=/trunk/; revision=16749
2005-12-09 16:46:24 +00:00
Ronnie Sahlberg 30a69454db add work in progress asn2eth generated ldap dissector from AndersB's email of
Nov 15

it is checked in but not copied to epan/dissectors so that those interested can work on it until it gets ready to replace the old one.



svn path=/trunk/; revision=16649
2005-12-02 10:41:46 +00:00