summaryrefslogtreecommitdiff
path: root/epan/dissectors/packet-dcerpc-spoolss.c
AgeCommit message (Collapse)AuthorFilesLines
2016-11-24dissectors: add PRINTER_INFO_5 decoding for DCE/RPC spoolss dissector.Günther Deschner1-0/+52
Guenther Change-Id: I9eb8be636ebdf81092b7abd8d4749410cc5dcc06 Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-on: https://code.wireshark.org/review/18932 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2016-10-30DCERPC: save strings in wmem file scopePascal Quantin1-1/+1
Bug: 13072 Change-Id: Ib5f3d91be822a3d7180d95e3299dec978941c1d5 Reviewed-on: https://code.wireshark.org/review/18564 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-06-27tvb_get_string_enc + proto_tree_add_item = proto_tree_add_item_ret_stringMichael Mann1-8/+6
Also some other tricks to remove unnecessary tvb_get_string_enc calls. Change-Id: I2f40d9175b6c0bb0b1364b4089bfaa287edf0914 Reviewed-on: https://code.wireshark.org/review/16158 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2016-06-06*_stdup_printf -> strdup for "single string only" formatting.Michael Mann1-4/+4
Done for performance improvements. This could probably be done in checkAPIs.pl, but this was just a quick manual check with grepping. Change-Id: I91ff102cb528bb00fa2f65489de53890e7e46f2d Reviewed-on: https://code.wireshark.org/review/15751 Reviewed-by: Michael Mann <mmann78@netscape.net> Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl>
2016-04-21Do not mix wmem and glib allocatorsPascal Quantin1-27/+7
Change-Id: I4bf861ed9e6b767341f2cbd4e926606d4919f2ef Reviewed-on: https://code.wireshark.org/review/15041 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-04-18spoolss (DCERPC): fix 'drep' was marked unused but was used ↵Alexis La Goutte1-45/+45
[-Werror,-Wused-but-marked-unused] Change-Id: I0d52992f9b35fb0bceb41800d70719c282442177 Reviewed-on: https://code.wireshark.org/review/14972 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-03-30SPOOLSS: Try to avoid an infinite loop.Gerald Combs1-2/+3
Use tvb_reported_length_remaining in dissect_spoolss_uint16uni. Make sure our offset always increments in dissect_spoolss_keybuffer. Change-Id: I7017c9685bb2fa27161d80a03b8fca4ef630e793 Reviewed-on: https://code.wireshark.org/review/14687 Reviewed-by: Gerald Combs <gerald@wireshark.org> Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-01-24Add the packet number to the packet_info structure, and use it.Guy Harris1-7/+7
That removes most of the uses of the frame number field in the frame_data structure. Change-Id: Ie22e4533e87f8360d7c0a61ca6ffb796cc233f22 Reviewed-on: https://code.wireshark.org/review/13509 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-12-12Remove -Wwrite-strings compiler flagJoão Valverde1-1/+1
The "-Wwrite-strings" flag produces nuisance warnings. These warnings are not useful, they're impossible to fix in a sane way and therefore are being handled with casts of static strings to (char *). This just moves the warning to [-Wcast-qual] and a compiler pragma is in turn required (and used) to squelch that warning. Remove the Wwrite-strings warning. Let that responsibility fall on the programmer (as is done by casting). Change-Id: I5a44dfd9decd6d80797a521a3373593074962fb5 Reviewed-on: https://code.wireshark.org/review/12162 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-08-12Eliminate proto_tree_add_text from some dissectors.Michael Mann1-108/+138
Change-Id: I7a7778802c442b254626a7676cb74ca2855fa65e Reviewed-on: https://code.wireshark.org/review/9977 Reviewed-by: Michael Mann <mmann78@netscape.net> Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-06-23Remove more deprecated tvb_lengthEvan Huus1-3/+3
Change-Id: Iac23a6c804ad3720d37186559477909b2ff33eb2 Reviewed-on: https://code.wireshark.org/review/9042 Reviewed-by: Evan Huus <eapache@gmail.com>
2015-04-18Convert proto_tree_add_boolean to ↵Michael Mann1-385/+121
proto_tree_add_bitmask_[value|value_with_flags|list] Part 1 of a few Change-Id: I413f23dfa92da5488ca8a7f62ca0738b25004635 Reviewed-on: https://code.wireshark.org/review/8117 Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-03-03Eliminate e_uuid_t in favor of e_guid_t.Guy Harris1-2/+2
That eliminates a redundant and confusing data type, and avoids issues with one piece of code using e_uuid_t but wanting to use routines expecting an e_guid_t. Change-Id: I95e172d46d342ab40f6254300ecbd2a0530cde60 Reviewed-on: https://code.wireshark.org/review/7506 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-12-22First batch of unincludes. Last attempt...Martin Mathieson1-1/+0
Change-Id: I3681462aeb98ca62ed3ec5eb226b2553317391a9 Reviewed-on: https://code.wireshark.org/review/5997 Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com> Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2014-12-21Cleanup use of #includes in non-generated epan/dissector/*.cBill Meier1-2/+0
Specifically: - Set packet.h to be the first wireshark #include after config.h and "system" #includes. packet.h added as an #include in some cases when missing. - Remove some #includes included (directly/indirectly) in packet.h. E.g., glib.h. (Done only for those files including packet.h). - As needed, move "system" #includes to be after config.h and before wireshark #includes. - Rework various #include file specifications for consistency. - Misc. Change-Id: Ifaa1a14b50b69fbad38ea4838a49dfe595c54c95 Reviewed-on: https://code.wireshark.org/review/5923 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-11-27Fix a number of dup hf[] filter-names probably mostly resulting from ↵Bill Meier1-1/+1
cut/paste errs Change-Id: Id658b9e1803b2f5b92e711a3ce981ff602333d98 Reviewed-on: https://code.wireshark.org/review/5513 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-10-02Add editor modelines & adjust indentation/whitespace as needed.Bill Meier1-0/+13
Change-Id: Ice2d93632cd42dfcef3bfbf0e15f2a8a147278fc Reviewed-on: https://code.wireshark.org/review/4433 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-09-20proto_tree_add_text -> proto_tree_add_subtree[_format] for DCE/RPC dissectors.Michael Mann1-105/+39
Change-Id: I84755d059ef70ca98b0e7626b6425360daf0529d Reviewed-on: https://code.wireshark.org/review/4199 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-19Revert "Fixup: tvb_* -> tvb_captured"Michael Mann1-3/+3
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-18Fixup: tvb_* -> tvb_capturedDario Lombardo1-3/+3
Change-Id: I9209c1271967405c34c1b6fa43e1726a4d3a5a3f Reviewed-on: https://code.wireshark.org/review/2377 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-04-21Fix gcc "warning: no previous prototype ... [-Wmissing-prototypes]"; Do some ↵Bill Meier1-0/+3
whitespace changes Change-Id: I8c2e8694223270f1810aa6b13d955f0d08001d30 Reviewed-on: https://code.wireshark.org/review/1239 Reviewed-by: Bill Meier <wmeier@newsguy.com> Tested-by: Bill Meier <wmeier@newsguy.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>
2013-12-16Use proto_tree_add_item() in preference to fetching the string andGuy Harris1-5/+5
adding it with proto_tree_add_string(). Use tvb_get_string_enc() rather than tvb_get_unicode_string() to fetch strings. We assume a UTF-16 encoding for all "Unicode" strings. Use tvb_strsize() and tvb_unicode_strsize() to get the lengths of null-terminated strings. Get rid of unused ett_nt_unicode_string variable. svn path=/trunk/; revision=54158
2013-11-27- Create/use several extended value_stringsBill Meier1-2/+2
(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-06Add _U_ to a function parameter to fix a compiler warningBill Meier1-1/+1
svn path=/trunk/; revision=53105
2013-11-06Remove pinfo->private_data from DCERPC dissectors and instead have ↵Michael Mann1-731/+686
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-10-01Add cast.Evan Huus1-1/+1
svn path=/trunk/; revision=52312
2013-10-01Remove check_col for all non-generated DCE/RPC dissectors.Michael Mann1-85/+50
svn path=/trunk/; revision=52310
2013-09-22More emem -> wmem conversion:Pascal Quantin1-1/+1
- tvb_get_g_stringz()/tvb_get_ephemeral_stringz()/tvb_get_seasonal_stringz() -> tvb_get_stringz() - tvb_get_g_stringz_enc()/tvb_get_ephemeral_stringz_enc() -> tvb_get_stringz_enc() - tvb_get_ephemeral_unicode_stringz() -> tvb_get_unicode_stringz() - tvb_bcd_dig_to_ep_str() -> tvb_bcd_dig_to_wmem_packet_str() - update docs accordingly svn path=/trunk/; revision=52180
2013-09-22emem -> wmem conversion:Pascal Quantin1-3/+3
- 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-21Add _g_ to the names of functions that allocate glib memory. This is a bit moreEvan Huus1-3/+3
explicit, and frees up the "generic" names (like tvb_memdup) for new signatures that take the appropriate wmem pool. Majority of the conversion done with sed. svn path=/trunk/; revision=52164
2013-09-14Convert some dissectors to wmem (leaving uat-like memory with emem for now)Pascal Quantin1-12/+14
svn path=/trunk/; revision=52031
2013-06-06Fix some Dead Store (Dead assignement/Dead increment) Warning found by ClangAlexis La Goutte1-4/+4
svn path=/trunk/; revision=49810
2013-03-02From Ed Beroset via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416 :Pascal Quantin1-14/+14
Remove C++ incompatibilities from most of the dcerpc code svn path=/trunk/; revision=48023
2013-02-28Fix Coverity CID 280366: Dead default in switch.Chris Maynard1-14/+1
svn path=/trunk/; revision=47930
2013-02-26it's ==> its & its ==> it's as needed.Bill Meier1-1/+1
svn path=/trunk/; revision=47891
2012-09-20We always HAVE_CONFIG_H so don't bother checking whether we have it or not.Jeff Morriss1-2/+0
svn path=/trunk/; revision=45017
2012-07-27Fix bugs: #7532, 7534 dissect_ndr_cvstring returns ep-memory, don't free it.Jakub Zawadzki1-15/+0
(Likely to occur cause r44053) svn path=/trunk/; revision=44063
2012-07-15Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7479 :Pascal Quantin1-1/+4
Provide an empty string when data pointer is not NULL (regression introduced in r43703) svn path=/trunk/; revision=43724
2012-07-13tvb_length_remaining() can return -1, so be sure to deal with it if it does.Chris Maynard1-1/+4
svn path=/trunk/; revision=43703
2012-06-28Update Free Software Foundation address.Jakub Zawadzki1-1/+1
(COPYING will be updated in next commit) svn path=/trunk/; revision=43536
2012-04-03From Martin Kaiser (on -dev): initialize an uninitialized variable. From ↵Jeff Morriss1-4/+4
me: also clean up some indentation. svn path=/trunk/; revision=41912
2012-04-03Implement spoolss function GetPrinterDriverDirectory (opnum 12).Graham Bloice1-11/+121
Also renamed "Architecture" field to "Environment" as per MS docs. Fix bug #2279 svn path=/trunk/; revision=41911
2011-10-25Fix encoding arg for call to tvb_get_unicode_string().Bill Meier1-1/+1
svn path=/trunk/; revision=39565
2011-07-19Add a DREP_LITTLE_ENDIAN for the DCE RPC endianness bit in the dataGuy Harris1-2/+2
representation. Use it rather than a raw 0x10. Add a DREP_ENC_INTEGER() macro that takes a pointer to the data representation and returns either ENC_LITTLE_ENDIAN or ENC_BIG_ENDIAN; use it for the encoding argument to proto_tree_add_item(), rather than just the AND of drep[0] and DREP_LITTLE_ENDIAN, as it's not a boolean any more, and for string values we'll be supporting character encodings as well and thus won't be able to trust that the 0x10 bit will mean "little endian". Use ENC_NA for some other encoding values, i.e. for FT_BYTES and the like. Fix a couple of places in the DCOM dissector where we were passing the byte-order bit rather than the field value to proto_tree_add_uint_format(). Clean up white space. svn path=/trunk/; revision=38128
2011-07-13Fix gcc 4.6 "set but not used [-Wunused-but-set-variable]" warningsBill Meier1-4/+4
svn path=/trunk/; revision=37999
2011-05-23Delete unused header field entries found by running checkhf.pl.Chris Maynard1-27/+0
svn path=/trunk/; revision=37353
2011-05-23From Micheal Mann via bug 2794: Fix some display filter field names.Chris Maynard1-8/+8
svn path=/trunk/; revision=37351
2011-01-28Remove the remaining tvb_fake_unicode() calls in the dissector source. Stephen Fisher1-10/+5
svn path=/trunk/; revision=35692
2010-11-17User value_string_ext fcns to access several value_string arrays;Bill Meier1-346/+450
Minor reformatting and whitespace cleanup. svn path=/trunk/; revision=34927