aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-dcerpc-lsa.c
AgeCommit message (Collapse)AuthorFilesLines
2017-01-10Rename tvb_new_subset() to tvb_new_subset_length_caplen().Guy Harris1-1/+1
This emphasizes that there is no such thing as *the* routine to construct a subset tvbuff; you need to choose one of tvb_new_subset_remaining() (if you want a new tvbuff that contains everything past a certain point in an existing tvbuff), tvb_new_subset_length() (if you want a subset that contains everything past a certain point, for some number of bytes, in an existing tvbuff), and tvb_new_subset_length_caplen() (for all other cases). Many of the calls to tvb_new_subset_length_caplen() should really be calling one of the other routines; that's the next step. (This also makes it easier to find the calls that need fixing.) Change-Id: Ieb3d676d8cda535451c119487d7cd3b559221f2b Reviewed-on: https://code.wireshark.org/review/19597 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-08-06tools/pidl: Keep case from fieldnames.Günther Deschner1-421/+421
Change-Id: I5626cfa0487cc88eb65cc349c05ae1762bc953f4 Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-on: https://code.wireshark.org/review/16720 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-06-18DCE/RPC: fix array of pointers with NULLBinh Trinh1-4/+8
Change-Id: Ie89f8fd4ec744d427d41866206d5a6784c5b224f Reviewed-on: https://code.wireshark.org/review/16004 Petri-Dish: Jaap Keuter <jaap.keuter@xs4all.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-06-16DCE/RPC proto_tree_add_boolean -> proto_tree_add_bitmask_valueMichael Mann1-32/+44
Change-Id: I88398aa1923e86bb83b97cc3904529a5810f6c40 Reviewed-on: https://code.wireshark.org/review/15978 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-06-16DCE/RPC proto_tree_add_boolean -> proto_tree_add_bitmask_with_flagsMichael Mann1-16/+2
Change-Id: I8891ec90244ffd9609d8443df631a7c8e6453b7e Reviewed-on: https://code.wireshark.org/review/15942 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-05-02Revert "PIDL: Remove _U_ and remove unused-parameter via pragma"Guy Harris1-1423/+1421
This reverts commit db4f7fcdeac833f24807994b372d1e42479754bf. That doesn't work with the compiler being used on the OS X buildbot; that compiler is probably some version of llvm-gcc, which might be based on an older version of GCC without support for that pragma, or might not support it properly courtesy of the GCC front end and the LLVM back end not quite fitting together Change-Id: I6cd5f1322b4872ef0c4eb5695f021cec00ba85b7 Reviewed-on: https://code.wireshark.org/review/15246 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-05-02PIDL: Remove _U_ and remove unused-parameter via pragmaAlexis La Goutte1-1421/+1423
Change-Id: Ic40f86850dc94338a8c2205e04679793f368672f Reviewed-on: https://code.wireshark.org/review/14967 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2016-02-29PIDL: regen pidl-generated dissectorsAurelien Aptel1-179/+60
mapi&nspi dissectors skipped on purpose since they the output is malformed. This was already the case before the samba sync. Change-Id: Ib3b78459e3506c755aaa219433ac6b5865482f01 Signed-off-by: Aurelien Aptel <aaptel@suse.com> Reviewed-on: https://code.wireshark.org/review/13968 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2016-01-24Add the packet number to the packet_info structure, and use it.Guy Harris1-1/+1
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-06-23Remove deprecated tvb_length from PIDL dissectorsEvan Huus1-3/+3
Also regenerate all to pick up the usage of https in some comment links. Change-Id: Ic17b6368d2118627178b0b560031450d98e5b5e5 Reviewed-on: https://code.wireshark.org/review/9060 Reviewed-by: Evan Huus <eapache@gmail.com>
2015-03-03Eliminate e_uuid_t in favor of e_guid_t.Guy Harris1-1/+1
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-11-03Regenerate DCE RPC dissectors with the current pidl.Guy Harris1-1319/+1437
Change-Id: I3cfb9399a9e5ed783083fa5b26a39646fb53875f Reviewed-on: https://code.wireshark.org/review/5101 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-10-08Remove #pragma warning (MSVC) for PIDL generate dissectorAlexis La Goutte1-7/+0
Change-Id: I1e4c7944a2cd877f5c707703dcff44fe9f955a2c Reviewed-on: https://code.wireshark.org/review/4479 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-10-07PIDL (DCERPC): fix Assigned value is garbage or undefined found by Clang ↵Alexis La Goutte1-1/+1
Analyzer packet-dcerpc-dnsserver.c:1002:12: warning: Assigned value is garbage or undefined packet-dcerpc-frstrans.c:1137:12: warning: Assigned value is garbage or undefined packet-dcerpc-lsa.c:6345:12: warning: Assigned value is garbage or undefined packet-dcerpc-nspi.c:7805:12: warning: Assigned value is garbage or undefined packet-dcerpc-dfs.c:3245:11: warning: Function call argument is an uninitialized value packet-dcerpc-dfs.c:3245:9: warning: 'level' may be used uninitialized in this function [-Wmaybe-uninitialized] Change-Id: Ife6a2f565ae215535d0e3d72ef50800114240e3f Reviewed-on: https://code.wireshark.org/review/4478 Reviewed-by: Evan Huus <eapache@gmail.com>
2014-09-28PIDL (DCERPC lsa): enhance dissectorAlexis La Goutte1-51/+3
* Fix -Wunused-function (Add functions to lsa.cnf with NOEMIT) * Remove also some MANUAL function (no unused too..) * Remove dissector DCERPC lsa from DIRTY list Change-Id: I7b7f924f244757207f378b8650b8dd30e739da08 Reviewed-on: https://code.wireshark.org/review/4325 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-09-28PIDL: fix -Wmissing-prototypeAlexis La Goutte1-0/+2
Change-Id: I4cae47450e8026b10bd373828f235184560e0a99 Reviewed-on: https://code.wireshark.org/review/4308 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-09-27PIDL: Fix Dead Store (Dead assignement/Dead increment) warning found by ClangAlexis La Goutte1-1/+1
Change-Id: I7f6f974732b7905f4ea4686e1a79ca6fbef78fa8 Reviewed-on: https://code.wireshark.org/review/4319 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-09-27Regenerate PIDL dissectors with our current PIDL.Guy Harris1-1246/+1246
Change-Id: I63a1874d157c55df6c3c3f69c68098528adbb384 Reviewed-on: https://code.wireshark.org/review/4330 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-09-20proto_tree_add_text -> proto_tree_add_subtree[_format] for DCE/RPC dissectors.Michael Mann1-1298/+1294
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-09-19Update generated DCE/RPC dissectors.Michael Mann1-1376/+1321
Now all generated dissectors can successfully compile. Change-Id: I74728926915d5a9f1694cc49c753b80f213df767 Reviewed-on: https://code.wireshark.org/review/2598 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-19Revert "Fixup: tvb_* -> tvb_captured"Michael Mann1-2/+2
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-2/+2
Change-Id: I9209c1271967405c34c1b6fa43e1726a4d3a5a3f Reviewed-on: https://code.wireshark.org/review/2377 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-04-06Apply found fix-encoding-args.pl errors in the dissector directory.Michael Mann1-1/+1
I coincidentally found a few files with errors, so I thought it might be time to run it on the whole directory again. Change-Id: Ia32e54b3b1b94e5a418ed758ea79807c8bc7e798 Reviewed-on: https://code.wireshark.org/review/978 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-03-31Continue to remove $Id$ from top of fileAlexis La Goutte1-3/+1
(Using sed : sed -i '/^ \t$Id\$/,+0 d') (tab before $Id$) Also modify generator (NDR.pm) Change-Id: I348a1d129d1d1320bd80b428038ea5ed291d6ca8 Reviewed-on: https://code.wireshark.org/review/878 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-01-13lsarpc_dissect_sec_desc_buf() and lsarpc_dissect_struct_dom_sid2() areGuy Harris1-3/+3
used in the Netlogon dissector, so don't make them static. Now that we've added HEADER START/HEADER END to Pidl, use it to declare those routines in packet-dcerpc-lsa.h. Don't declare them in packet-dcerpc-netlogon.c, as they're now declared in the header. svn path=/trunk/; revision=54723
2014-01-13Make routines not used outside packet-dcerpc-lsa.c static.Guy Harris1-3/+3
svn path=/trunk/; revision=54712
2013-11-24Move dceprc_procedure_name from packet_info to dcerpc_info. Doesn't appear ↵Michael Mann1-164/+164
to be "used" by dissectors, just stored (for help in debugging?). svn path=/trunk/; revision=53552
2013-11-06Remove pinfo->private_data from DCERPC dissectors and instead have ↵Michael Mann1-2830/+2818
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-21Sync with latest SAMBA PIDL source per ↵Michael Mann1-133/+133
http://www.wireshark.org/lists/wireshark-dev/201310/msg00217.html Didn't integrate 0010-frsrpc-Regenerate-frsrpc-due-to-changes-in-the-pidl-.patch 0016-Regenerate-the-dnserver.patch due to compilation errors on Windows. svn path=/trunk/; revision=52744
2013-10-01Remove check_col from generated DCE/RPC dissectors. Bug 8804 ↵Michael Mann1-82/+82
(https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8804). I still couldn't figure out how to generate the source, so I made the modifications to the generated dissectors "manually" (search/replace tool in VS) that would match the "PIDL source" included here. I will be sending the "PIDL source" (non dissector files) to the samba team. svn path=/trunk/; revision=52313
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
2010-10-30Add an SVN Id to these PIDL-generated dissectors. A patch to PIDL will be ↵Jeff Morriss1-0/+2
sent upstream to the Samba developers. svn path=/trunk/; revision=34713
2010-04-24Make the absolute_time_display_e enum start at 1000 to avoid overlapping withJeff Morriss1-6/+6
the base_display_e enum. Fix a couple of dissectors that were still using FT_ABSOLUTE_TIME with BASE_NONE. (The time format chosen is based only on an attempt to not change the behavior. I don't know that it's right.) One of these is built by Pidl. I'll send a patch upstream too. When checking hfinfos, display the absolute_time_display_e values too. Display "bit count: X" instead of "unknown" when the display value doesn't match one of the enumerated values. svn path=/trunk/; revision=32552
2010-02-08try autogenerate lsa in preparation for updates to the lsa idl fileRonnie Sahlberg1-100/+468
svn path=/trunk/; revision=31827
2009-12-19For fields of type FT_ABSOLUTE_TIME, have the "display" value be one ofGuy Harris1-6/+6
ABSOLUTE_TIME_LOCAL or ABSOLUTE_TIME_UTC, indicating whether to display the date/time in local time or UTC. (int)ABSOLUTE_TIME_LOCAL == (int)BASE_NONE, so there's no source or binary compatiblity issue, although we might want to eliminate BASE_NONE at some point and have the BASE_ values used with integral types start at 0, so that you can't specify BASE_NONE for an integral field. svn path=/trunk/; revision=31319
2009-10-20Removed some unused prototypes.Stig Bjørlykke1-1/+0
svn path=/trunk/; revision=30630
2009-10-05Fixed a signed/unsigned warning.Stig Bjørlykke1-1/+1
svn path=/trunk/; revision=30327
2009-06-18From Kovarththanan Rajaratnam via bug 3548:Stig Bjørlykke1-421/+421
(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
2008-10-01Call out to GPEF EFSBLOB from the LSA dissectorRonnie Sahlberg1-16/+29
svn path=/trunk/; revision=26324
2008-10-01add description of PolicyServerRoleRonnie Sahlberg1-15/+25
svn path=/trunk/; revision=26322
2008-10-01add two more constants to the lsa_PolicyInfo enumRonnie Sahlberg1-6/+12
add a new constant to the lsa_DomainInfoEnum enum svn path=/trunk/; revision=26321
2008-10-01add the new autogenerated lsa dissectorRonnie Sahlberg1-3007/+10891
this changes some call signatures requiring changes to the netlogon dissector as well svn path=/trunk/; revision=26320
2008-09-29dissect lookupnames3Ronnie Sahlberg1-7/+128
svn path=/trunk/; revision=26299
2007-08-28rename dcerpc_smb_store_pol_name to dcerpc_store_polhnd_nameRonnie Sahlberg1-2/+2
rename dcerpc_smb_fetch_pol to dcerpc_fetch_polhnd_data and also make it take an additional parameter to return the "type" of the policy handle, if such a type was stored. extend the pol_value structure used to track policy handles to also store a type to represent what created the policy handle types could be USER/ALIAS/CONNECT/... etc handles returned from the SAMR interface add a new helper function dcerpc_store_polhnd_type() track policy handles between request/responses for dcerpc update the samr.cnf file to make the samr dissectors for SetSecurity/QuerySecurity dissect the specific bits for the security descriptor correctly based on whether the policy handle refers to a CONNECT/DOMAIN/USER/ALIAS or GROUP svn path=/trunk/; revision=22703
2006-09-13the way we pass dcerpc strings from deep down in helpers to high level ↵Ronnie Sahlberg1-9/+23
dissector functions (dcv->private_data) for things such as strings and sids is a mess and very difficult to handle without a lot of memory leakage. the biggest problem in changing this is the dcv->private_data usage. add a dcv->se_data which can keep data around from a request to a response and use this to change the LSA/OpenPolicy2 servername passing from request to response as a test pattern of moving all users of dcv->private data over to use dcv->se_data. once all users are migrated over we can then change the dcv->private data pointer to be of ep scope and thus not need an explicit free (which is quite difficult and it is quite difficult in the old semantics to know WHEN we need to free this pointer) this will eventually make the usage more clean and at the same time close down quite a few memory leaks. eventually this will make dissect_ndr_nt_SID return a pointer to ep allocated memory that need not be explicitely freed. svn path=/trunk/; revision=19226
2006-05-21change a whole bunch of ethereal into wiresharkRonnie Sahlberg1-7/+7
svn path=/trunk/; revision=18196
2006-03-16the new type of sid/rid structure is for lookupnames2 not lookupnamesRonnie Sahlberg1-4/+4
svn path=/trunk/; revision=17642
2006-03-15lookupnames2 takes a different sid structure compared to lookupnamesRonnie Sahlberg1-2/+61
update it to dissect it as such and create new helpers for the new structure that takes one extra guint32 at the end of the previous structure. svn path=/trunk/; revision=17632
2005-10-04Don't ensure all the bytes of a security descriptor exist before callingGuy Harris1-2/+2
"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-09-22bugfix: don't simply use length field value from packet data, ensure the ↵Ulf Lamping1-0/+1
bytes really exist svn path=/trunk/; revision=15963