aboutsummaryrefslogtreecommitdiffstats
path: root/packet-ldap.c
AgeCommit message (Collapse)AuthorFilesLines
2004-07-18Move dissectors to epan/dissectors directory.Gilbert Ramirez1-3006/+0
Also move ncp222.py, x11-fields, process-x11-fields.pl, make-reg-dotc, and make-reg-dotc.py. Adjust #include lines in files that include packet-*.h files. svn path=/trunk/; revision=11410
2004-07-18Set the svn:eol-style property on all text files to "native", so thatGuy Harris1-1/+1
they have LF at the end of the line on UN*X and CR/LF on Windows; hopefully this means that if a CR/LF version is checked in on Windows, the CRs will be stripped so that they show up only when checked out on Windows, not on UN*X. svn path=/trunk/; revision=11400
2004-04-20try to dissect the ms cldap netlogon rpc flags bits.Ronnie Sahlberg1-6/+139
the information comes from the samba sources and may or may not be reliable or menaingful. ms documentation in their knowledgebase says that the only really important part in the netlogon response is the sitename. (i have reasons to belive at least one of the flags, closest, is completely bogous) svn path=/trunk/; revision=10649
2004-01-19Before checking for SASL security stuff, make sure the bytes you'reGuy Harris1-2/+3
going to check exist. Doing so arranges that "tvb_reported_length_remaining(tvb, offset) is >= 5 (unless the reported length is less than the data length, but that "shouldn't happen"). Instead of comparing "tvb_get_ntohl(tvb, offset) - 4" against "tvb_reported_length_remaining(tvb, offset)", which runs the risk of giving a bogus answer if "tvb_get_ntohl(tvb, offset)" is < 4, compare "tvb_get_ntohl(tvb, offset) against "tvb_reported_length_remaining(tvb, offset)-4", as the latter is guaranteed to be > 0 (and cast the latter expression to get rid of the signed/unsigned comparison warning that caused me to notice this issue in the first place). svn path=/trunk/; revision=9738
2004-01-19Update to CLDAPRonnie Sahlberg1-39/+349
dissect the CLDAP netlogon rpc call svn path=/trunk/; revision=9730
2003-12-18From Ronnie Sahlberg: if the GSSAPI token is empty, don't dissect it.Guy Harris1-1/+5
svn path=/trunk/; revision=9344
2003-12-04update to ldap.Ronnie Sahlberg1-4/+73
some implementations specify GSSAPI in the bind call. the encapsulation seems to be the same as GSS-SPNEGO so handle it the same way svn path=/trunk/; revision=9169
2003-11-10Not all LDAP PDUs are aligned to the start of a TCP segment.Ronnie Sahlberg1-2/+8
If we failed to dissect the GSS-SPNEGO blob it probably means that the segment is somewhere in the middle of an LDAP PDU. Just bail out and stop dissecting the PDU instead of aborting ethereal completely using g_assert() since this is not really a pathological error, its just something that can and will happen normally. svn path=/trunk/; revision=8925
2003-11-07In some captures we might have already established and BOUND LDAPRonnie Sahlberg1-1/+16
session where GSS-SPNEGO is used. If we havent seen the BIND call ethereal would assume it is vanilla non-GSS-SPNEGO LDAP and would fail to decode the packet. Add heuristics to the LDAP dissector so that IF the first 4 bytes of the LDAP PDU looks like ity could be a length field and IF the fifth byte has the value 0x60 then assume what we have is GSS-SPNEGO and assume this and all further commands on this session is GSS-SPNEGO as well. svn path=/trunk/; revision=8904
2003-11-06Update to LDAP and TCPRonnie Sahlberg1-9/+15
LDAP messages that span multiple segments will throw an exception unless we have reassembly enabled. Update TCP so that IF an exception was thrown that we still pick up any hints provided by the subdissector about where the next PDU starts. Update LDAP so that it will rpovide hints to TCP about where the next LDAP PDU starts in the sequence number space. Thus now ethereal can find and dissect LDAP PDUs that starts somewhere in the middle of a TCP segment. svn path=/trunk/; revision=8895
2003-11-05A "GHashFunc()" returns a "guint", not a "gint".Guy Harris1-3/+5
svn path=/trunk/; revision=8887
2003-11-05update for LDAPRonnie Sahlberg1-175/+344
measure the response time for some LDAP commands and add a service response time dialog for it svn path=/trunk/; revision=8885
2003-08-17Sigh. I think I once tried making the last argument to "col_set_str()"Guy Harris1-3/+3
be a "const gchar *", and it ended up being like pulling a thread out of a sweater - more things had to change, which meant still more things had to change, and I might've even run into something that didn't change very well at all. (Or perhaps that was constifying something else.) For now, we just cast away the constness in calls to "col_set_str()"; the column code won't actually overwrite the string. svn path=/trunk/; revision=8174
2003-08-12Put CLDAP instead of LDAP in COL_INFO for LDAP over UDP.Tim Potter1-5/+12
svn path=/trunk/; revision=8161
2003-07-31From Bernd Leibing: catch another place where we weren't checkingGuy Harris1-2/+2
whether the domain name was null before putting it into the Info column. svn path=/trunk/; revision=8114
2003-07-30"read_string()" can return a null pointer for the string, so check forGuy Harris1-3/+3
that. svn path=/trunk/; revision=8103
2003-07-18Put in an XXX comment about the code to remember the number of resultsGuy Harris1-1/+5
between the LDAP_RES_SEARCH_ENTRY and LDAP_RES_SEARCH_RESULT messages depending on those messages occurring in the same frame. svn path=/trunk/; revision=8044
2003-07-14COL_INFO goodies for ldap dissector:Tim Potter1-81/+125
- display DN in COL_INFO for bindi, search and add requests - display errors in COL_INFO for all replies - for search entries, display the number of results returned - display the message type in the "top level" protocol item svn path=/trunk/; revision=8021
2003-07-03The Windows 2000 global catalog is LDAP on TCP port 3268, as per IANA assignedTim Potter1-1/+3
port numbers document. svn path=/trunk/; revision=7961
2003-07-02Dissect LDAPv3 search result references (s4.5.3 in rfc 2251).Tim Potter1-1/+15
svn path=/trunk/; revision=7959
2003-06-09Each LDAP message gets a top-level LDAP tree of its own; there's no needGuy Harris1-32/+26
for a subtree for the message. svn path=/trunk/; revision=7814
2003-04-29From Jean-Baptiste Marchand: fix typo in value_string table for LDAPGuy Harris1-2/+2
message types. svn path=/trunk/; revision=7595
2003-04-25From Tony Schene: after freeing saved authentication mechanism stringsGuy Harris1-1/+3
in the "auth_info_items" list, and free all the items in that list, we need to null out the pointer to that list to indicate that it's been emptied out. svn path=/trunk/; revision=7563
2003-04-21From Jean-Baptiste Marchand: put the LDAP message ID and message typeGuy Harris1-4/+4
into the protocol tree as visible fields. svn path=/trunk/; revision=7515
2002-11-28Don't dissect SASL stuff as GSS_Wrapped unless we're actually usingGuy Harris1-31/+43
GSS-SPNEGO. svn path=/trunk/; revision=6693
2002-11-28Handle GSS_Wrap header information as well as context-level tokens. AGuy Harris1-10/+41
call to "gssapi_init_oid()" supplies both dissectors for context-level tokens and GSS_Wrap header information; the latter dissector should return the number of bytes of header information, so that if the header information and the message for the protocol that's using GSSAPI are treated as a single blob of data (as is the case with LDAP, but not with DCE RPC, for example), the dissector for the protocol using GSSAPI knows where to start dissecting. We associate a pointer to the entire data structure for the OID, not the handle for context-level token dissector for the OID, with conversations and frames. Make the dissector for NTLMSSP verifiers be the handler for GSS_Wrap stuff for NTLMSSP, and add support for GSS_Wrap stuff for Kerberos. Support SASL GSS-SPNEGO wrapping of LDAP messages. (XXX - this should really check for GSS-SPNEGO.) svn path=/trunk/; revision=6692
2002-11-27Try to handle LDAP messages encapsulated inside a SASL security layer.Guy Harris1-191/+463
Reorganize the desegmentation to match a bit more closely the desegmentation code in "tcp_dissect_pdus()" (eventually, we should see if we can just use that code). svn path=/trunk/; revision=6676
2002-11-25From Jason Greene:Guy Harris1-2/+3
This patch fixes decoding of the newSuperior attribute of an LDAPv3 modrdn request. The current implementation attempts to decode the attribute as an LDAPDN (Octext String, 0x4), when its definition is actually Context 0 (0x80). svn path=/trunk/; revision=6672
2002-11-12From Ronald Henderson: in LDAP dissector, handle Sequence Of headerGuy Harris1-2/+27
being split across TCP segments. svn path=/trunk/; revision=6618
2002-09-09If we see SASL authentication in a bind request, attach to theGuy Harris1-53/+242
conversation a data structure containing the authentication type and mechanism, and use that to dissect the credentials in subsequent bind responses. Call the bind request and response dissectors regardless of whether we're building a protocol tree or not, so that we call the authentication subdissectors. "read_string()" doesn't return anything through the string-pointer argument if the string is zero-length; handle those cases. svn path=/trunk/; revision=6241
2002-08-28Removed trailing whitespaces from .h and .c files using theJörg Mayer1-46/+46
winapi_cleanup tool written by Patrik Stridvall for the wine project. svn path=/trunk/; revision=6117
2002-08-26Dissect SASL credentials.Guy Harris1-8/+155
svn path=/trunk/; revision=6087
2002-08-21Dissect udp port 389 which is connectionless LDAP as implemented byTim Potter1-1/+3
Microsoft. It would be nice if this proto was called CLDAP in the protocol field - maybe later. svn path=/trunk/; revision=6041
2002-08-02Replace the types from sys/types.h and netinet/in.h by their glib.hJörg Mayer1-9/+1
equivalents for the toplevel directory. The removal of winsock2.h will hopefully not cause any problems under MSVC++, as those files using struct timeval still include wtap.h, which still includes winsock2.h. svn path=/trunk/; revision=5932
2002-05-06Note that not all attribute values are text strings.Guy Harris1-1/+13
svn path=/trunk/; revision=5406
2002-03-31Get rid of an unused variable.Guy Harris1-2/+1
svn path=/trunk/; revision=5060
2002-03-03Report ASN.1 BER parsing errors closer to the point at which they'reGuy Harris1-206/+320
detected, so we do a better job of reporting the item with the problem. svn path=/trunk/; revision=4853
2002-03-02As there's nothing to dissect for LDAP_REQ_UNBIND, set "ret" toGuy Harris1-2/+3
ASN1_ERR_NOERROR, as you can't have a dissection error if you've dissected nothing. When dissecting a Bind reply, set "ret" to the return value of "dissect_ldap_response_bind()", so errors get reported properly. svn path=/trunk/; revision=4851
2002-03-02Don't check the message type if it's not of class ASN1_APL; instead,Guy Harris1-49/+58
just display the message type and body as an error. If the message type isn't a type we dissect, display the "Unknown message type" entry with the right offset and length. svn path=/trunk/; revision=4850
2002-03-02Treat LDAP_REQ_UNBIND as a request with nothing in it, not as an unknownGuy Harris1-4/+7
request type. Put the request types in order in the switch statement. svn path=/trunk/; revision=4849
2002-03-01Have the routines that supply a pointer to a newly-constructed itemGuy Harris1-22/+18
always set that pointer if they return ASN1_ERR_NOERROR. Have the routines that call them use the value only if the routine returns ASN1_ERR_NOERROR. Don't bother setting the pointer before calling the routine. Report unknown modify operation types. svn path=/trunk/; revision=4834
2002-03-01Add a routine to "asn1.c" to translate ASN1_ERR_ values to strings. UseGuy Harris1-142/+283
that in the SNMP dissector. Check the return values of ASN.1 routines in the LDAP dissector, and have all the subroutines in that disesctor that can return error indications return ASN1_ERR_ values. Have the routines that can supply a pointer to a newly-created protocol-tree item use the right type for items ("proto_item *", not "proto_tree *", even though they are, at least currently, typedefs for the same type), and use "proto_item" for the type of the item a pointer to which is passed to those routines. Before calling those routines, set the item pointer to null, in case the routine fails. Don't check the return value of "parse_filter_strings()" against -1 - that routine can't return -1. svn path=/trunk/; revision=4833
2002-01-24Replace a bunch of "tvb_length()" and "tvb_length_remaining()" calls inGuy Harris1-4/+4
arguments to "proto_tree_add_text()", and to "proto_tree_add_XXX()" calls that add FT_NONE or FT_PROTO items to the protocol tree, with -1. Replace some calls to "tvb_length()" or "tvb_length_remaining()" with calls to "tvb_reported_length()" and "tvb_reported_length_remaining()", as those give the actual length of the data in the packet, not just the data that happened to be captured. svn path=/trunk/; revision=4605
2002-01-21Include files from the "epan" directory and subdirectories thereof withGuy Harris1-2/+2
"epan/..." pathnames, so as to avoid collisions with header files in any of the directories in which we look (e.g., "proto.h", as some other package has its own "proto.h" file which it installs in the top-level include directory). Don't add "-I" flags to search "epan", as that's no longer necessary (and we want includes of "epan" headers to fail if the "epan/" is left out, so that we don't re-introduce includes lacking "epan/"). svn path=/trunk/; revision=4586
2002-01-14Give each LDAP packet its own top-level protocol tree item. (This alsoGuy Harris1-17/+30
means if there are no complete LDAP packets in a TCP segment, there is no LDAP top-level protocol tree item, which is as it should be.) svn path=/trunk/; revision=4539
2002-01-14Add support for TCP desegmentation.Guy Harris1-10/+51
svn path=/trunk/; revision=4538
2001-12-10Move the pointer to the "column_info" structure in the "frame_data"Guy Harris1-11/+11
structure to the "packet_info" structure; only stuff that's permanently stored with each frame should be in the "frame_data" structure, and the "column_info" structure is not guaranteed to hold the column values for that frame at all times - it was only in the "frame_data" structure so that it could be passed to dissectors, and, as all dissectors are now passed a pointer to a "packet_info" structure, it could just as well be put in the "packet_info" structure. That saves memory, by shrinking the "frame_data" structure (there's one of those per frame), and also lets us clean up the code a bit. svn path=/trunk/; revision=4370
2001-12-03Make "dissector_add()", "dissector_delete()", and "dissector_change()"Guy Harris1-3/+6
take a dissector handle as an argument, rather than a pointer to a dissector function and a protocol ID. Associate dissector handles with dissector table entries. svn path=/trunk/; revision=4308
2001-10-26Fix the rest of the signed/unsigned comparison warnings.Gilbert Ramirez1-2/+2
svn path=/trunk/; revision=4088
2001-06-18From Joerg Mayer: explicitly fill in all members of aGuy Harris1-31/+31
"header_field_info" structure, including the ones that are later set by the routines to register fields. svn path=/trunk/; revision=3561