aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-kerberos.c
AgeCommit message (Collapse)AuthorFilesLines
2014-08-27At least some compilers don't allow warning pragmas inside functions.Guy Harris1-23/+7
So wrap the entire function in USES_APPLE_DEPRECATED_API/USES_APPLE_RST. Change-Id: I6ae3e8ecc40bc407e6f7156ccc5d9dd8c51d650d Reviewed-on: https://code.wireshark.org/review/3885 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-08-27Be more selective about turning off deprecation warnings.Guy Harris1-7/+28
Only turn them off in the vicinity of those nasty cross-platform APIs. (This also checks in the generated Kerberos dissector, which we forgot to do in the last checkin.) Change-Id: I5dc9162ff64afe764e37866706590ed2ed965acb Reviewed-on: https://code.wireshark.org/review/3882 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-08-18Kerberos : Fix indent (use tabs) and add modelines infoAlexis La Goutte1-313/+324
Change-Id: I7965332ee474d10c90dfb2ef63a66f610cd6fc71 Reviewed-on: https://code.wireshark.org/review/3655 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-08-16Fix warning: no previous prototype for ... [-Wmissing-prototypes]Alexis La Goutte1-6/+9
Change-Id: Ic3152356c51ebe554e2356a360df5b0c23d89d63 Reviewed-on: https://code.wireshark.org/review/3632 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-08-09Eliminate (almost all) proto_tree_add_text calls from ASN.1 dissectors.Michael Mann1-14/+18
This mostly involved adding expert info capabilities to many of the dissectors so that they could correctly flag error conditions. Only remaining proto_tree_add_text calls are in H248.cnf, which has a convoluted way of using hf_ data to make its tree. Change-Id: I6412150c2ec1977d7fa38f3f0ed416680bdfb141 Reviewed-on: https://code.wireshark.org/review/3500 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-20batch of tvb-length conversionsEvan Huus1-21/+21
Change-Id: I5e40df8af6841e3dad71c41d7e43c7971611b15f Reviewed-on: https://code.wireshark.org/review/2473 Reviewed-by: Evan Huus <eapache@gmail.com>
2014-06-19Kerberos: fix dissection of packets when Record Mark is presentPascal Quantin1-1/+1
Bug: 10200 Change-Id: Ied8db64120131c029e276d66aeff8b81a45a7286 Reviewed-on: https://code.wireshark.org/review/2447 Reviewed-by: Evan Huus <eapache@gmail.com> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-06-19Revert "Fixup: tvb_* -> tvb_captured"Michael Mann1-22/+22
https://www.wireshark.org/lists/wireshark-dev/201406/msg00131.html This reverts commit 246fe2ca4c67d8c98caa84e2f57694f6322e2f96. Change-Id: Ib24bae0198c13a84bd7f731bf4af921212109a8f Reviewed-on: https://code.wireshark.org/review/2430 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-18Get rid of obsolete references to nettlePascal Quantin1-19/+6
Bug: 2089 Change-Id: Ie3337a1b750d8d95f6291c77dfd19cd1b0c57e83 Reviewed-on: https://code.wireshark.org/review/2388 Tested-by: Pascal Quantin <pascal.quantin@gmail.com> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-06-18Fixup: tvb_* -> tvb_capturedDario Lombardo1-22/+22
Change-Id: I9209c1271967405c34c1b6fa43e1726a4d3a5a3f Reviewed-on: https://code.wireshark.org/review/2377 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-05-28packet-kerberos.c: Use tfs_set_notset in hf[] entry instead of a local version.Bill Meier1-9/+7
Change-Id: I00a3ae7afb46eb50d7477c22cfa340c705cbb34a Reviewed-on: https://code.wireshark.org/review/1851 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-05-28packet-klerberos.c: Use typedef (true_false_string) to properly define a ↵Bill Meier1-2/+2
true_false_string. Change-Id: Ic89e5add39b8b0b2c3db254292f12ce6ae25b73c Reviewed-on: https://code.wireshark.org/review/1844 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-05-15Eliminate some calls to tvb_get_ptr().Guy Harris1-27/+25
Change-Id: I1c5e10467d68ed7372dfaa9109b350238418ffc1 Reviewed-on: https://code.wireshark.org/review/1645 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-04-25Kerberos: ensure that private data elements are stored in separate variablesPascal Quantin1-153/+118
Bug: 10028 Change-Id: I599cd5475d19b64c0d5b9d31d7054a3befc84af2 Reviewed-on: https://code.wireshark.org/review/1348 Reviewed-by: Evan Huus <eapache@gmail.com> Tested-by: Evan Huus <eapache@gmail.com>
2014-04-23Kerberos: use dissect_kerberos_ADDR_TYPE (removes an unused function warning)Pascal Quantin1-17/+7
Change-Id: I87d9c88d9db06c8f7dedd6e39152c39c13f8d32d Reviewed-on: https://code.wireshark.org/review/1314 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-04-23Add check for no kerberos keytab file.Stig Bjørlykke1-4/+11
Avoid printf warnings when loading a capture with kerberos packets when not having configured a keytab file. Change-Id: I0950daa18c42f4687d29101fac74f6f6bd6071b1 Reviewed-on: https://code.wireshark.org/review/1300 Reviewed-by: Evan Huus <eapache@gmail.com>
2014-04-23Kerberos: use auto generated code for ADDR-TYPE instead of a hand made ↵Pascal Quantin1-54/+73
value_string array Change-Id: I74089fe609368fdd582aef1f2cb00a3905e0641b Reviewed-on: https://code.wireshark.org/review/1301 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-04-23Kerberos: put PDU dissection under Kerberos tree and remove duplicate PDU namePascal Quantin1-3/+3
Change-Id: Id4824ad3a7bca1959579e5fd0a17a67c6bcda174 Reviewed-on: https://code.wireshark.org/review/1293 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-04-22Kerberos: define HostAddress/addr-type as a FT_UINT32 fieldPascal Quantin1-35/+33
Fixes part of bug 10019 Change-Id: Id367d6c86533c840ea2ff40ef96b1c1854b96150 Reviewed-on: https://code.wireshark.org/review/1288 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-04-18Use new BER functions in kpasswd.Stig Bjørlykke1-1/+34
Added RFC 3244 ChangePasswdData to the kerberos dissector. This is the last dissector using the "old BER" functions. Change-Id: I1d79047103c07c268d08e652745391f1ac37c82c Reviewed-on: https://code.wireshark.org/review/1198 Reviewed-by: Tomáš Kukosa <tomas.kukosa@unify.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-04-18Fix warning found by -Wunused-const-variable (Clang 3.5)Alexis La Goutte1-54/+37
../../asn1/kerberos/packet-kerberos-template.c:1076:27: error: unused variable 'w2k_pac_types' [-Werror,-Wunused-const-variable] ../../asn1/kerberos/packet-kerberos-template.c:1089:27: error: unused variable 'krb5_princ_types' [-Werror,-Wunused-const-variable] ../../asn1/kerberos/packet-kerberos-template.c:1146:27: error: unused variable 'krb5_encryption_types' [-Werror,-Wunused-const-variable] ../../asn1/kerberos/packet-kerberos-template.c:1184:27: error: unused variable 'krb5_checksum_types' [-Werror,-Wunused-const-variable] ../../asn1/kerberos/packet-kerberos-template.c:1222:27: error: unused variable 'krb5_ad_types' [-Werror,-Wunused-const-variable] ../../asn1/kerberos/packet-kerberos-template.c:1239:27: error: unused variable 'krb5_transited_types' [-Werror,-Wunused-const-variable] ../../asn1/kerberos/packet-kerberos-template.c:1244:27: error: unused variable 'krb5_address_types' [-Werror,-Wunused-const-variable] ../../asn1/kerberos/kerberos.cnf:153:27: error: unused variable 'kerberos_Applications_vals' [-Werror,-Wunused-const-variable] Change-Id: Ie842d236628efb46450f3e6c23b5590b2e622c25 Reviewed-on: https://code.wireshark.org/review/1199 Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2014-04-17Switch to using the ASN1 based kerberos dissector.AndersBroman1-4509/+3838
Change-Id: Ib8945cdad149b71e3f79bd88032fd10f55ba556d Reviewed-on: https://code.wireshark.org/review/1174 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-04Remove all $Id$ from top of fileAlexis La Goutte1-2/+0
(Using sed : sed -i '/^ \* \$Id\$/,+1 d') Fix manually some typo (in export_object_dicom.c and crc16-plain.c) Change-Id: I4c1ae68d1c4afeace8cb195b53c715cf9e1227a8 Reviewed-on: https://code.wireshark.org/review/497 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-02-25packet-kerberos: remember in what frame a key was learnedStefan Metzmacher1-0/+3
Change-Id: Icd05d4941fdacac44094fafbad07f08ec4cbe976 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-on: https://code.wireshark.org/review/364 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2013-12-19Use proto_tree_add_item() or tvb_get_string_enc() instead ofGuy Harris1-3/+2
tvb_get_unicode_string(). If there's an indication that the encoding is UCS-2, use that, otherwise use UTF-16. (For example, "BMP" stands for "Basic Multilingual Plane", which is the part of Unicode that can be encoded in 16 bits, hence UCS-2.) In the description of the "Use Heuristics for UDP" preference for the XML dissector, note that it's not just trying to recognize XML in UCS-2, it's trying to recognize XML in *big-endian* UCS-2. svn path=/trunk/; revision=54245
2013-12-18Fix [-Wmissing-prototypes]Anders Broman1-2/+2
svn path=/trunk/; revision=54209
2013-12-15Fix [-Wmissing-prototypes]Jakub Zawadzki1-0/+3
svn path=/trunk/; revision=54135
2013-12-01Looks like the problem with redefined symbols is not new, itJörg Mayer1-0/+2
just got a few new ones. Add HAVE_STRING_H and HAVE_STDLIB_H to the list. svn path=/trunk/; revision=53691
2013-11-27- Create/use several extended value_stringsBill Meier1-3/+3
(sort associated value_string arrays as needed); - Use new VALUE_STRING_LIST mechanism/macros to create enums and value_string arrays for: WERR_errors, DOS_errors, SRV_errors, and HRD_errors; - Declare certain global value_string arrays as static (local) and use global extended value_strings to reference same; (e.g., ms_coiuntry_codes value_string_array) - Rename SMBE_... defs used in several different value_string arrays to prevent potential name collisions: ( e.g., for SRV_errors: SMBE_... ==> SMBE_SRV_...) Done for value_string arrays: DOS_errors, SRV_errors, HRD_errors; - WERR_errors value_string array: Note that WERR associated defs no longer exist in the latest samba doserr.h. (The WERR_errors defs were originally generated from the samba doserr.h). For now: WERR_errors kept as is. - ToDo: Fix PIDL-generated dcerpc dissectors to use NT_errors_ext and WERR_errors_ext extended value_strings. - Add editor modelines to a few files. - Make whitespace changes. svn path=/trunk/; revision=53614
2013-11-24Move dceprc_procedure_name from packet_info to dcerpc_info. Doesn't appear ↵Michael Mann1-0/+2
to be "used" by dissectors, just stored (for help in debugging?). svn path=/trunk/; revision=53552
2013-11-10Use ASN.1 private data instead of pinfo->private_data to exchange kerberos ↵Michael Mann1-15/+6
callback functions. svn path=/trunk/; revision=53240
2013-11-10Add missing includes in order to remove exceptions.h from proto.h (next commit).Jakub Zawadzki1-0/+1
svn path=/trunk/; revision=53230
2013-11-09Add data parameter to tcp_dissect_pdus() as well as convert it to using ↵Michael Mann1-10/+11
"new" style dissectors. Now that "bytes consumed" can be determined, should tcp_dissect_pdus() take advantage of that? Should tcp_dissect_pdus return length (bytes consumed)? There are many dissectors that just call tcp_dissect_pdus() then return tvb_length(tvb). Seems like that could all be rolled into one. svn path=/trunk/; revision=53198
2013-11-06Remove pinfo->private_data from DCERPC dissectors and instead have ↵Michael Mann1-14/+7
dcerpc_info* infomation be passed in as a function parameter. Bug 9387 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9387) All "generated" source was manually modified (with the power of search/replace), but I believe the "source input" files have been adjusted (checked into revs 53098 and 53099) to reflect the necessary changes (with possible whitespace formatting differences). The Microsoft compiler doesn't flag "unused function parameters", so I apologize in advance if I may have missed a few. The "dcerpc_info* di" parameter is used in almost every function. svn path=/trunk/; revision=53100
2013-09-22emem -> wmem conversion:Pascal Quantin1-1/+1
- ep_tvb_get_bits() -> wmem_packet_tvb_get_bits() - tvb_g_memdup()/ep_tvb_memdup() -> tvb_memdup() - tvb_fake_unicode()/tvb_get_ephemeral_faked_unicode() -> tvb_get_faked_unicode() - tvb_get_g_string()/tvb_get_ephemeral_string()/tvb_get_seasonal_string() -> tvb_get_string() - tvb_get_g_unicode_string()/tvb_get_ephemeral_unicode_string() -> tvb_get_unicode_string() - tvb_get_ephemeral_string_enc() -> tvb_get_string_enc() - update docs accordingly svn path=/trunk/; revision=52172
2013-09-13Dario Lombardo <lomato@gmail.com> viaJörg Mayer1-2/+2
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9147 Migration from emem to wmem for trivial cases (ep_alloc only). svn path=/trunk/; revision=52002
2013-09-09expert_add_info_format_text -> expert_add_info_formatMichael Mann1-1/+1
svn path=/trunk/; revision=51852
2013-09-03Make Ubuntu buildbot happyAlexis La Goutte1-0/+3
packet-kerberos.c: In function 'proto_register_kerberos': packet-kerberos.c:5406:29: error: unused variable 'ei' [-Werror=unused-variable] svn path=/trunk/; revision=51691
2013-09-02Batch of filterable expert info.Michael Mann1-1/+6
svn path=/trunk/; revision=51688
2013-08-01Move a bunch of the crypt modules and pint.h into wsutil.Jeff Morriss1-1/+1
This means wsutil now links against libcrypt. Protect a bunch of the crypt header files from multiple inclusion. svn path=/trunk/; revision=51100
2013-06-21Cast away some errors of these types:Stephen Fisher1-5/+5
request for implicit conversion from 'gpointer' to 'char *' not permitted in C++ [-Werror=c++-compat] and enum conversion when passing argument 3 of 'krb5_crypto_init' is invalid in C++ [-Werror=c++-compat] svn path=/trunk/; revision=50108
2013-06-14Removed check_col() and the occasional tree.Michael Mann1-3/+3
svn path=/trunk/; revision=49938
2013-03-18From beroset:Anders Broman1-8/+8
remove C++ incompatibilities https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416 svn path=/trunk/; revision=48400
2013-03-01Export libwireshark symbols using WS_DLL_PUBLIC defineBalint Reczey1-2/+4
Also remove old WS_VAR_IMPORT define and related Makefile magic everywhere in the project. svn path=/trunk/; revision=47992
2013-02-27Move show_exception() and show_reported_bounds_error() toGuy Harris1-2/+2
epan/show_exception.c, as it's used outside epan/dissectors/packet-frame.c. Update their callers to include <epan/show_exception.h> to get their declaration. Add a CATCH_NONFATAL_ERRORS macro that catches all exceptions that, if there's more stuff in the packet to dissect after the dissector call that threw the exception, doesn't mean you shouldn't go ahead and dissect that stuff. Use it in all those cases, including ones where BoundsError was inappropriately being caught (you want those passed up to the top level, so that the packet is reported as having been cut short in the capture process). Add a CATCH_BOUNDS_ERRORS macro that catches all exceptions that correspond to running past the end of the data for a tvbuff; use it rather than explicitly catching those exceptions individually, and rather than just catching all exceptions (the only place that DissectorError should be caught, for example, is at the top level, so dissector bugs show up in the protocol tree). Don't catch and then immediately rethrow exceptions without doing anything else; just let the exceptions go up to the final catcher. Use show_exception() to report non-fatal errors, rather than doing it yourself. If a dissector is called from Lua, catch all non-fatal errors and use show_exception() to report them rather than catching only ReportedBoundsError and adding a proto_malformed item. Don't catch exceptions when constructing a trailer tvbuff in packet-ieee8023.c - just construct it after the payload has been dissected, and let whatever exceptions that throws be handled at the top level. Avoid some TRY/CATCH/ENDTRY cases by using checks such as tvb_bytes_exist() before even looking in the tvbuff. svn path=/trunk/; revision=47924
2013-02-19How can I get a new tvbuff that starts at an offset within a givenGuy Harris1-11/+9
tvbuff and runs to the end of the tvbuff? Let me count the ways.... Replace a bunch of different ways of doing that (some incorrect, in that they're not properly handling tvbuffs where the captured and reported lengths are different) with tvb_new_subset_remaining(). svn path=/trunk/; revision=47751
2013-02-08Add a directory name preference type (PREF_DIRNAME) and registrationGerald Combs1-1/+1
routine (prefs_register_directory_preference). Add PREF_FILENAME and PREF_DIRNAME support to the Qt module preferences. Change a couple of preferences to directory names. Clean up some names and default settings. svn path=/trunk/; revision=47573
2013-02-08Change string to filename preference so file can be browsed forMichael Mann1-1/+1
svn path=/trunk/; revision=47566
2012-12-21The KRB_RM_ #defines fit in 32 bits, so just make them unsigned, notGuy Harris1-4/+2
long. dissect_krb5_Checksum() is declared in epan/dissectors/packet-kerberos.h; don't declare it again here. svn path=/trunk/; revision=46666
2012-09-20We always HAVE_CONFIG_H so don't bother checking whether we have it or not.Jeff Morriss1-3/+1
svn path=/trunk/; revision=45017