Commit Graph

2001 Commits

Author SHA1 Message Date
João Valverde 262a84c384 Fix (and chop) static build option
This sets the scope of the static build option to Wireshark support
libraries only.

Before the patch:

Static plugins don't work with CMake and autotools.

autotools static build is broken, and most likely will always be, as
building Wireshark all-static is difficult and time-consuming.

After the patch:

For CMake Wireshark will be built with static or shared libraries and
dynamic plugins. Everything just works. CMake apparently doesn't want
you building static and shared libraries at the same time.

For autotools Wireshark will be built with shared libraries by default.
--disable-shared and --enable-static options work as usual. Dlopened
plugins are not built if --disable-shared is given to configure (to
disable shared libraries). This is a limitations imposed by libtool.

Tested on Linux. This removes broken support for building plugins
statically.

Change-Id: Ib8e8176976f136eea93a2ce8f9857b6cf9bec64c
Reviewed-on: https://code.wireshark.org/review/24241
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot
Reviewed-by: João Valverde <j@v6e.pt>
2017-11-19 20:16:50 +00:00
João Valverde 1097e8020a autotools: Library build products don't need explicit cleaning
Change-Id: I5d68c05f2844d6c9ae486531b189dbf10bc09cff
Reviewed-on: https://code.wireshark.org/review/24484
Reviewed-by: João Valverde <j@v6e.pt>
2017-11-18 22:29:41 +00:00
João Valverde b695b3e2f7 Begin cleanup of make-dissector-reg.py
Move registration code to a new register.c file so it is readable.
Dissector load points are stored in a generated function pointer
array instead.

Simplify python script somewhat by not interleaving the plugin and
dissector logic.

Change-Id: I5ec21270f4e1550a5c911efa7f0dc4fc7fcb13a5
Reviewed-on: https://code.wireshark.org/review/24474
Reviewed-by: João Valverde <j@v6e.pt>
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-11-18 14:43:10 +00:00
Graham Bloice 252ea22b97 WSDG: Improve VS2015 chocolatey install
Created an AdminDeployment.xml file for use with the chocolatey
package for VS2015 Community Edition and updated the WSDG to
include it.

Bug: 14147
Change-Id: Id2a701067bf38874cf0bf534cca55dba9cfd30d4
Reviewed-on: https://code.wireshark.org/review/24464
Petri-Dish: Graham Bloice <graham.bloice@trihedral.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
2017-11-17 12:56:52 +00:00
Gerald Combs ac1d52aff5 Register protocols and handoffs in separate threads.
Instead of interleaving protocol registrations and status callbacks in
the main thread, move protocol registrations to a worker thread. Do the
same with protocol handoffs. This *should* be safe since the status
callbacks only update the UI.

This reduces startup time by about 200ms on my laptop:

Run     OS    Thread?    Time
  1   macOS      N      340 ms
  2   macOS      N      260 ms
  3   macOS      N      252 ms
  4   macOS      Y      147 ms
  5   macOS      Y      146 ms
  6   macOS      Y      142 ms
  7   Win 7      N       80 samples
  8   Win 7      N       56 samples
  9   Win 7      N       75 samples
 10   Win 7      Y       31 samples
 11   Win 7      Y        2 samples
 12   Win 7      Y        0 samples

macOS was sampled using Instruments. Windows 7 was sampled using the
Visual Studio 2015 profiler.

We should do the same thing with our capture and tap event loops, but
that will likely require quite a bit more work.

Change-Id: Iac9a81d8f71668f5979b524744a03f6d80aee893
Reviewed-on: https://code.wireshark.org/review/24447
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-11-16 06:11:55 +00:00
Gerald Combs 775bbbcded Start using SPDX license identifiers.
A while back Graham pointed out the SPDX project (spdx.org), which is
working on standardizing license specifications:

https://www.wireshark.org/lists/wireshark-dev/201509/msg00119.html

Appendix V of the specification describes a short identifier
(SPDX-License-Identifier) that you can use in place of boilerplate in
your source files:

https://spdx.org/spdx-specification-21-web-version#h.twlc0ztnng3b

Start the conversion process with our top-level C and C++ files.

Change-Id: Iba1d835776714deb6285e2181e8ca17f95221878
Reviewed-on: https://code.wireshark.org/review/24302
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Balint Reczey <balint@balintreczey.hu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-11-09 20:03:51 +00:00
Martin Kacer 156a0b62eb Tools: json2pcap script update
Updated script to support duplicated json fields
and --no-duplicate-keys tshark flag.

Bug: 12958
Change-Id: Id20885baacbfd26124cb82716df6829225be6de8
Reviewed-on: https://code.wireshark.org/review/24236
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-11-06 06:17:49 +00:00
João Valverde ba6dd97081 Remove epan win32 x86 assembly
Not used. Remove also weird pre-hash hash optimization in proto.c.

Change-Id: Ibebc12dbe90ac1d05fb1ba601d32fe98797fbd56
Reviewed-on: https://code.wireshark.org/review/24254
Reviewed-by: Michael Mann <mmann78@netscape.net>
Reviewed-by: João Valverde <j@v6e.pt>
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-11-05 23:20:20 +00:00
Michael Mann 1741b6b23c oss-fuzzshark: force direct malloc
Set two environment variables (needs to be done before epan_init and
before the first g_slice_alloc call) to force direct memory allocation
without another layer that could hide bugs.

Change-Id: I0d72092c239e2e7f42b0b7849c01471407e785e2
Reviewed-on: https://code.wireshark.org/review/21195
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-11-04 13:14:23 +00:00
Gerald Combs 1e8e9a807f make-manuf: Fix a comment.
make-manuf lives in the "tools" directory.

Change-Id: I9be2d44178f27d46629c439ff61f624d8d99e681
Reviewed-on: https://code.wireshark.org/review/24168
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-10-29 18:25:31 +00:00
Jakub Zawadzki b4a6f4e244 oss-fuzzshark: add missing include to fix implicit declaration of color_filters_init()
/src/wireshark/tools/oss-fuzzshark/fuzzshark.c:218:7: warning: implicit declaration of function 'color_filters_init' is invalid in C99 [-Wimplicit-function-declaration]
        if (!color_filters_init(&err_msg, NULL))
             ^
1 warning generated.

Change-Id: I37dbc4521b6a3cda271e6e33a290ed35911e7dda
Reviewed-on: https://code.wireshark.org/review/24086
Petri-Dish: Jakub Zawadzki <darkjames-ws@darkjames.pl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-10-26 19:52:56 +00:00
Pavel Strnad 93fba33e95 asn2wrs.py: use 64 bits variant for constrained integers using MIN or MAX keywords
Change-Id: Iffc7c81e9653e8c1cd938de8f4fc26c5912eceec
Reviewed-on: https://code.wireshark.org/review/24049
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-10-25 21:10:11 +00:00
João Valverde eae216ef1d Remove replacement inet_pton/inet_ntop
Should be available on every platform we support.

Change-Id: Ib65d78e351d22d581b427e5e93fc8d5e5348b260
Reviewed-on: https://code.wireshark.org/review/24047
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-10-25 21:03:56 +00:00
João Valverde 90644c8372 Remove inet_aton() usage everywhere
Including where it says not to in comments. Use IPv4 dotted-decimal
notation.

Change-Id: Iafe1f6fbd2bd5867c41642dc27411f47dff8ce6a
Reviewed-on: https://code.wireshark.org/review/24044
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot
Reviewed-by: João Valverde <j@v6e.pt>
2017-10-25 19:10:57 +00:00
Eliot Lear 6014bfe6fc Get program to the right working directory.
Otherwise patches breaks.

Change-Id: Ief735dc949eaefa3515cc0a5936e0a2735cb0241
Reviewed-on: https://code.wireshark.org/review/24035
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-10-23 18:31:22 +00:00
João Valverde 1d238ec636 autotools: Remove setuid-root.pl
It seems to be some sort of development helper, and since CMake doesn't
use it presumably it is not useful anymore.

Change-Id: I23e4ab24199f21310ebd09064c3ae53e48673e4d
Reviewed-on: https://code.wireshark.org/review/23945
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Petri-Dish: João Valverde <j@v6e.pt>
Reviewed-by: João Valverde <j@v6e.pt>
2017-10-17 18:48:46 +00:00
João Valverde 46f4664b29 checkAPI: error out on empty filelist
This will help detect some bogus checkapi runs in the future.

Change-Id: I43345e3a0a5471e9655f34e36ccf1562d6526758
Reviewed-on: https://code.wireshark.org/review/23946
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-10-16 23:07:09 +00:00
João Valverde 9764cd0a83 autotools: make maintainer-clean should allow rerunning 'configure'
Change-Id: Iedae94ffefe27b13b1967d69cacb757b5aa4576d
Reviewed-on: https://code.wireshark.org/review/23928
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: João Valverde <j@v6e.pt>
2017-10-15 14:17:20 +00:00
João Valverde 2563f9dd79 plugins: Fix -Wmissing-prototype for plugin_register()
Change-Id: I03d5ca01fb3bc8fdae86b44e857a4b9a3c7f48d2
Reviewed-on: https://code.wireshark.org/review/23927
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: João Valverde <j@v6e.pt>
2017-10-15 12:47:34 +00:00
Ahmad Fatoum 9d49e13166 Remove superfluous null-checks before strdup/free
NULL checks were removed for following free functions:

- g_free "If mem is NULL it simply returns"
  https://developer.gnome.org/glib/stable/glib-Memory-Allocation.html#g-free

- g_slist_free(_full)? "NULL is considered to be the empty list"
  https://developer.gnome.org/glib/stable/glib-Singly-Linked-Lists.html

- g_strfreev "If str_array is NULL, this function simply returns."
  https://developer.gnome.org/glib/stable/glib-String-Utility-Functions.html#g-strfreev

- g_slice_free "If mem is NULL, this macro does nothing."
  https://developer.gnome.org/glib/stable/glib-Memory-Slices.html#g-slice-free

- g_match_info_free "not NULL... otherwise does nothing"
  https://developer.gnome.org/glib/stable/glib-Perl-compatible-regular-expressions.html#g-match-info-free

- dfilter_free defined in Wireshark code. Returns early when passed NULL
  epan/dfilter/dfilter.c

They were also removed around calls to g_strdup where applicable:

- g_strdup "If str is NULL it returns NULL."
  https://developer.gnome.org/glib/stable/glib-String-Utility-Functions.html#g-strdup

Change-Id: Ie80c2db89bef531edc3aed7b7c9f654e1d654d04
Reviewed-on: https://code.wireshark.org/review/23406
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: João Valverde <j@v6e.pt>
2017-10-15 12:38:51 +00:00
João Valverde 9bba3866ff CMake: Allow user build flags to override default build flags
Autotools has the very useful feature by design of allowing the user
to override the default build flags (you break it you keep it).

Apparently CMake applies COMPILE_OPTIONS target property after
CMAKE_{C,CXX}_FLAGS so that doesn't work here. Prepend our flags to those
variables instead to make it work then.

Specific target flag overrides can still be added with COMPILER_OPTIONS
(e.g: generated files with -Wno-warning) but this is less effective and
then we're back at the point where this overrides user flags. It's less
of a concern though.

Change-Id: I44761a79be4289238e02d4e781fef0099628817b
Reviewed-on: https://code.wireshark.org/review/23675
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: João Valverde <j@v6e.pt>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2017-10-13 21:32:18 +00:00
Gerald Combs f3ba040479 win-setup: Don't bother downloading UPX.
We haven't used UPX since g85eec7f603 (2014). Don't bother downloading it.

Change-Id: Id86ca6ae8f29adab3eb40a2ea3bd1de5ff45d868
Reviewed-on: https://code.wireshark.org/review/23894
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2017-10-12 20:45:04 +00:00
Gerald Combs d72a18faad Fuzz: Limit the number of packets we process with Valgrind.
Estimating the effort required to process a capture based on its size
isn't very reliable. Instead of rejecting files that are too large, just
limit Valgrind fuzzing to the first 100,000 packets in each file. This
should fix a timeout issue we're seeing on the master fuzzer.

Change-Id: I0117735341d3a183c6131f5f05dbd1d559fc4b3f
Reviewed-on: https://code.wireshark.org/review/23872
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2017-10-09 22:19:39 +00:00
Gerald Combs e8dbf386d8 Fuzz: Write memory leak info to the error log.
When we exit due to excessive memory leaks make sure we say so in the
error log.

Change-Id: I03f60271f3e4bb467fbaa5b9ac17431eed96f300
Reviewed-on: https://code.wireshark.org/review/23870
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2017-10-09 19:23:06 +00:00
João Valverde 2777003e12 Add version check for plugin compatibility
Only plugins built for the same feature release (X.Y) are assured binary
compatibility. Make sure we don't try to run unsuitable code and, if so,
warn the user. This might happen for example if the user manually copies
a binary plugin to the wrong folder, intentionally or by accident.

I'm using "release version" to loosely mean not a patch release
(i.e: a feature release).

Change-Id: I896e9cbbd2d3843623fff6af8ef51002ec06f1f8
Reviewed-on: https://code.wireshark.org/review/23807
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: João Valverde <j@v6e.pt>
2017-10-03 10:09:24 +00:00
João Valverde bf580c066a Make make-dissector-reg.py pay attention to word boundaries
Change-Id: Ia96c7b86994b9b5ab58735722f97e2c46cdfb54e
Reviewed-on: https://code.wireshark.org/review/23787
Reviewed-by: João Valverde <j@v6e.pt>
2017-09-30 11:29:54 +00:00
João Valverde 73504255fb Fix typo in make-dissector-reg.py
Change-Id: Ia4c0cd07e1a0e570db440bd05877fc760aae5f54
Reviewed-on: https://code.wireshark.org/review/23786
Reviewed-by: João Valverde <j@v6e.pt>
2017-09-30 11:29:24 +00:00
João Valverde f0e12f0fd3 Remove TPG plugin and dependencies
It doesn't build with autotools and CMake.

Under-documented and unmaintained. Seems to be a work-in-progress
that stalled.

Introduces spurious CMake dependency on yapp.

Change-Id: I0dca1ccbdfd683586c05765437d4b7804ab5cc70
Reviewed-on: https://code.wireshark.org/review/23758
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-09-28 12:26:01 +00:00
João Valverde a269ae1b6a Rename "ws_version_info.h", also .c
It's not installed so like most other files it doesn't need or benefit
from the prefix.

Change-Id: I01517e06f12b3101fee21b68cba3bc6842bbef5c
Reviewed-on: https://code.wireshark.org/review/23751
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: João Valverde <j@v6e.pt>
2017-09-26 17:32:08 +00:00
Guy Harris dc011cc53e pidl: fix field2name wireshark dissector test.
Pick up change from Samba:

    commit 82778a6d04580fc05f3f83d44f57f221ad4e8ac4
    Author: Günther Deschner <gd@samba.org>
    Date:   Tue Sep 6 22:37:12 2016 +0200

        pidl: fix field2name wireshark dissector test.

        Guenther

        Signed-off-by: Guenther Deschner <gd@samba.org>
        Reviewed-by: Stefan Metzmacher <metze@samba.org>

        Autobuild-User(master): Günther Deschner <gd@samba.org>
        Autobuild-Date(master): Wed Sep  7 16:05:26 CEST 2016 on sn-devel-144

Change-Id: Ia02de7d36b2fcb0e7a5145361548acae844f73ed
Reviewed-on: https://code.wireshark.org/review/23724
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-09-25 07:21:00 +00:00
Guy Harris c1a5531b71 pidl: Fix array range checks in python output
Pick up change from Samba:

    commit 67040cf61232dd1cdcc820237919ac1e073c31c2
    Author: Volker Lendecke <vl@samba.org>
    Date:   Tue Jun 20 15:31:18 2017 +0200

        pidl: Fix array range checks in python output

        Without this, we generated code like

        if (ndr_table_dnsserver.num_calls < 0) {
                PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_DnssrvOperation_ndr_pack");
                return NULL;
        }
        call = &ndr_table_dnsserver.calls[0];

        This does not really make sense, and Coverity found comparing the unsigned
        num_calls against <0 a bit pointless.

        Should fix 138 Coverity findings and make the code a bit more correct.

        Signed-off-by: Volker Lendecke <vl@samba.org>
        Reviewed-by: Jeremy Allison <jra@samba.org>

Change-Id: I401e3771e6f3c1125ff847749073693af23884fc
Reviewed-on: https://code.wireshark.org/review/23723
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-09-25 07:18:22 +00:00
Guy Harris a98d108916 python3: Use "y#" instead of "s#" for binary data in PyArg_ParseTuple
Pick up change from Samba:

    commit 40e409bf9e89a163c771b2a58493d2c1b496fae7
    Author: Petr Viktorin <pviktori@redhat.com>
    Date:   Wed May 3 16:57:07 2017 +0200

        python3: Use "y#" instead of "s#" for binary data in PyArg_ParseTuple

        The "s#" format code for PyArg_ParseTupleAndKeywords and Py_BuildValue
        converts a char* and size to/from Python str (with utf-8 encoding under
        Python 3).
        In some cases, we want bytes (str on Python 2, bytes on 3) instead. The
        code for this is "y#" in Python 3, but that is not available in 2.

        Introduce a PYARG_BYTES_LEN macro that expands to "s#" or "y#", and use
        that in:
        - credentials.get_ntlm_response (for input and output)
        - ndr_unpack argument in PIDL generated code

        Signed-off-by: Petr Viktorin <pviktori@redhat.com>
        Reviewed-by: Andreas Schneider <asn@samba.org>
        Reviewed-by: Andrew Bartlett <abartlet@samba.org>

Change-Id: If4d9cdabc5016127f60682caf300f6801a360083
Reviewed-on: https://code.wireshark.org/review/23722
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-09-25 07:15:09 +00:00
Guy Harris 141637d327 pidl: Fix Coverity warnings from duplicate NULL checks.
Pick up change from Samba:

    commit 9703464b942fdddbf7bc4380cbd26d1803f9bc00
    Author: Jeremy Allison <jra@samba.org>
    Date:   Tue May 2 08:10:40 2017 -0700

        pidl: Fix Coverity warnings from duplicate NULL checks.

        Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>

        Signed-off-by: Jeremy Allison <jra@samba.org>
        Signed-off-by: Stefan Metzmacher <metze@samba.org>
        Reviewed-by: Andrew Bartlett <abartlet@samba.org>

        Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
        Autobuild-Date(master): Sat May  6 16:03:17 CEST 2017 on sn-devel-144

Change-Id: I25c6ae984c6a963c05f33d9a649b64f9795c7292
Reviewed-on: https://code.wireshark.org/review/23721
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-09-25 07:13:00 +00:00
Guy Harris 5ea8c70c05 python: pidl: Port Python interface generator
Pick up change from Samba:

    commit 2de5fa45e0abfdb50f604f87e494bf334c39003a
    Author: Lumir Balhar <lbalhar@redhat.com>
    Date:   Mon Jan 23 21:03:17 2017 +0100

        python: pidl: Port Python interface generator

        Port PIDL generator of Python interfaces to generate interfaces in
        Python 3 compatible form.

        Python 2.7 is now required, so we can use PyCapsule in both versions.

        Signed-off-by: Lumir Balhar <lbalhar@redhat.com>
        Reviewed-by: Andrew Bartlett <abartlet@samba.org>
        Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
        Pair-programmed-by: Andrew Bartlett <abartlet@samba.org>

Change-Id: I981993e326132a1911bfbb686ca5ae033dd1df49
Reviewed-on: https://code.wireshark.org/review/23720
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-09-25 05:11:02 +00:00
Guy Harris 097de92cfb pidl:Python: use of pytalloc_GenericObject_reference*() for pyrpc_{ex,im}port_union() wrapping
Pick up change from Samba:

    commit 2170f556299c6ab4ce33f22169ca26ecad3440e3
    Author: Stefan Metzmacher <metze@samba.org>
    Date:   Mon Feb 20 18:02:09 2017 +0100

        pidl:Python: use of pytalloc_GenericObject_reference*() for pyrpc_{ex,im}port_union() wrapping

        BUG: https://bugzilla.samba.org/show_bug.cgi?id=12601

        Signed-off-by: Stefan Metzmacher <metze@samba.org>
        Reviewed-by: Andrew Bartlett <abartlet@samba.org>

        Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
        Autobuild-Date(master): Sat Feb 25 06:33:33 CET 2017 on sn-devel-144

Change-Id: I4d3cb70c79531e5faf5249b67948cc6d354c1bd0
Reviewed-on: https://code.wireshark.org/review/23719
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-09-25 05:09:23 +00:00
Guy Harris 4861fbe121 pidl:Python: replace pytalloc_CObject_FromTallocPtr() with pytalloc_GenericObject_reference_ex()
Pick up change from Samba:

    commit 1ee0c0f8280393c708f23361ebcba0776e8b4d33
    Author: Stefan Metzmacher <metze@samba.org>
    Date:   Wed Feb 22 09:07:54 2017 +0100

        pidl:Python: replace pytalloc_CObject_FromTallocPtr() with pytalloc_GenericObject_reference_ex()

        BUG: https://bugzilla.samba.org/show_bug.cgi?id=12601

        Signed-off-by: Stefan Metzmacher <metze@samba.org>
        Reviewed-by: Andrew Bartlett <abartlet@samba.org>

Change-Id: I19d04a1a248d35799ec41a79113fe588cd05e3de
Reviewed-on: https://code.wireshark.org/review/23718
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-09-25 05:03:30 +00:00
Guy Harris 75f78cd49a BUG: https://bugzilla.samba.org/show_bug.cgi?id=12601
Pick up change from Samba:

    commit d62eb3cc9f97b203d21ec6e75c48c739a43bc163
    Author: Stefan Metzmacher <metze@samba.org>
    Date:   Wed Feb 22 10:08:46 2017 +0100

        pidl:Python: make sure print HASH references for STRUCT types

        BUG: https://bugzilla.samba.org/show_bug.cgi?id=12601

        Signed-off-by: Stefan Metzmacher <metze@samba.org>
        Reviewed-by: Andrew Bartlett <abartlet@samba.org>

Change-Id: Ieef766844ce66160eaaacecc73a51f94f69319fb
Reviewed-on: https://code.wireshark.org/review/23717
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-09-25 05:02:04 +00:00
Guy Harris 5bda9bd4cb pidl:Python: add PyTypeObject objects for function structs
Pick up change from Samba:

    commit 57539c84416aeb8fc8e3a8653f790b329e6fa9a1
    Author: Stefan Metzmacher <metze@samba.org>
    Date:   Mon Sep 12 09:20:44 2016 +0200

        pidl:Python: add PyTypeObject objects for function structs

        They provide get/set methods for the in_* and out_* elements
        and the magic __ndr_{push,pull,print}_{in,out}__ hooks to enable
        the marshalling via ndr_{push,pull,print}_{in,out}().

        This provides an easy way to generate and parse the payload of
        DCERPC requests and responses, which is very useful for writing
        tests.

        Signed-off-by: Stefan Metzmacher <metze@samba.org>
        Reviewed-by: Andreas Schneider <asn@samba.org>

Change-Id: I8f0e70fb771a91ba9590e2e92b5713b48313d2de
Reviewed-on: https://code.wireshark.org/review/23716
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-09-25 04:58:01 +00:00
Guy Harris fd81dea208 pidl:Python: split out a PythonElementGetSet() helper function
Pick up a change from Samba:

    commit a546124f10d1e2bee29bc06c0b8754257d2bdc23
    Author: Stefan Metzmacher <metze@samba.org>
    Date:   Mon Sep 12 09:20:04 2016 +0200

        pidl:Python: split out a PythonElementGetSet() helper function

        Signed-off-by: Stefan Metzmacher <metze@samba.org>
        Reviewed-by: Andreas Schneider <asn@samba.org>

Change-Id: Ica8b699189b69833abfa6049dd3c4e489788ce54
Reviewed-on: https://code.wireshark.org/review/23715
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-09-25 04:52:41 +00:00
Guy Harris 1dd1a13e9f pidl:Python: the py_{import,export}_*() functions can be static now.
Pick up change from Samba:

    commit 40175613519e7405a16e8f896dfdc2949430bc4b
    Author: Stefan Metzmacher <metze@samba.org>
    Date:   Tue Sep 13 01:06:18 2016 +0200

        pidl:Python: the py_{import,export}_*() functions can be static now.

        Signed-off-by: Stefan Metzmacher <metze@samba.org>
        Reviewed-by: Andreas Schneider <asn@samba.org>

Change-Id: I6e06c97b44a04cab36d134916eddf4c501ccc35d
Reviewed-on: https://code.wireshark.org/review/23714
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-09-25 04:51:19 +00:00
Guy Harris 484d114b36 pidl:Python: make use of the pyrpc_{import,export}_union() functions
Pick up a change from Samba:

    commit f7707c04a5e039e757b288ad67a0c3cac9c6466a
    Author: Stefan Metzmacher <metze@samba.org>
    Date:   Mon Sep 12 16:33:38 2016 +0200

        pidl:Python: make use of the pyrpc_{import,export}_union() functions

        This avoids the linking problems at C shared object level.

        Signed-off-by: Stefan Metzmacher <metze@samba.org>
        Reviewed-by: Andreas Schneider <asn@samba.org>

Change-Id: I62c1d03b10e965552a4d598fa2370692ee0cd12a
Reviewed-on: https://code.wireshark.org/review/23713
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-09-25 04:49:57 +00:00
Guy Harris 0517a05b54 pidl:Python: provide a PyTypeObject with METH_CLASS __import__() and __export__() hooks
Pick up a change from Samba:

    commit e0324c0cf7e7c363a5791c2e35c8820b79640a47
    Author: Stefan Metzmacher <metze@samba.org>
    Date:   Mon Sep 12 16:33:38 2016 +0200

        pidl:Python: provide a PyTypeObject with METH_CLASS __import__() and __export__() hooks

        These are wrappers around the currently public C functions
        'py_import_*() and 'py_export_*().

        In order to let other python module use these function, we should
        resolve the needed type object and call the __import__() or __export__()
        hooks instead of linking to the other shared module at C level.

        We already do the same for structs.

        Signed-off-by: Stefan Metzmacher <metze@samba.org>
        Reviewed-by: Andreas Schneider <asn@samba.org>

Change-Id: I47813a544365085407a31d174ee180778674e42b
Reviewed-on: https://code.wireshark.org/review/23712
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-09-25 04:48:37 +00:00
Guy Harris 1373f619f9 pidl:Python: provide the abstract syntax as <module>.<interface>_abstract_syntax
Pick up change from Samba:

    commit 3a0ce3e41d9fdab58273c239955862b03396ea19
    Author: Stefan Metzmacher <metze@samba.org>
    Date:   Sun Sep 25 00:48:29 2016 +0200

        pidl:Python: provide the abstract syntax as <module>.<interface>_abstract_syntax

        The <module>.abstract_syntax alias is only kept as legacy for
        the first interface in a module.

        Signed-off-by: Stefan Metzmacher <metze@samba.org>
        Reviewed-by: Andreas Schneider <asn@samba.org>

Change-Id: Ie6d3d48ea3012bd328eb20e2e6693928fe24ead8
Reviewed-on: https://code.wireshark.org/review/23711
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-09-25 04:46:58 +00:00
Guy Harris aff94cf8f5 pidl:Python: prettify names of constants
Pick up change from Samba:

    commit 1bebccaeb93f7fb7b6e2538d63223f01587ed14d
    Author: Stefan Metzmacher <metze@samba.org>
    Date:   Fri Sep 23 06:49:13 2016 +0200

        pidl:Python: prettify names of constants

        Signed-off-by: Stefan Metzmacher <metze@samba.org>
        Reviewed-by: Andreas Schneider <asn@samba.org>

Change-Id: If9905b914c0d559bd6e7808fadbd154ae56ae2b1
Reviewed-on: https://code.wireshark.org/review/23710
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-09-25 04:45:35 +00:00
Guy Harris d7311431b2 pidl:Python: improve the .doc string for the get/set elements
Pick up change from Samba:

    commit a560116aa5228885e5f52fc46fa92151357de69c
    Author: Stefan Metzmacher <metze@samba.org>
    Date:   Tue Sep 13 09:07:32 2016 +0200

        pidl:Python: improve the .doc string for the get/set elements

        Signed-off-by: Stefan Metzmacher <metze@samba.org>
        Reviewed-by: Andreas Schneider <asn@samba.org>

Change-Id: I8ecb22fd88298ecd4e350b1815d8720b493aac27
Reviewed-on: https://code.wireshark.org/review/23709
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-09-25 04:43:53 +00:00
Guy Harris 1cbb04eaf1 pidl:Python: make use of NDR_ERR_CODE_IS_SUCCESS()
Pick up change from Samba:

    commit 47b40ac96afbd4fb28e519b9658256ecaa304e71
    Author: Stefan Metzmacher <metze@samba.org>
    Date:   Mon Sep 12 15:12:24 2016 +0200

        pidl:Python: make use of NDR_ERR_CODE_IS_SUCCESS()

        Signed-off-by: Stefan Metzmacher <metze@samba.org>
        Reviewed-by: Andreas Schneider <asn@samba.org>

Change-Id: I550b83596fe27bad5ba4f7d91eb0ac62380f4eac
Reviewed-on: https://code.wireshark.org/review/23708
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-09-25 04:42:30 +00:00
Guy Harris e3acb2e3eb pidl:Python: __ndr_print__ functions don't get arguments and need METH_NOARGS
Pick up change from Samba:

    commit d4660e869790c7da1cb97e9d95a995e5a32b34ef
    Author: Stefan Metzmacher <metze@samba.org>
    Date:   Sun Sep 25 01:07:14 2016 +0200

        pidl:Python: __ndr_print__ functions don't get arguments and need METH_NOARGS

        Signed-off-by: Stefan Metzmacher <metze@samba.org>
        Reviewed-by: Andreas Schneider <asn@samba.org>

Change-Id: Ic0648f65b8c3f60e614361778d2c0bf72d61be35
Reviewed-on: https://code.wireshark.org/review/23707
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-09-25 04:41:05 +00:00
Guy Harris 856ce75060 pidl:Python: check the return values of talloc_ptrtype()
Pick up change from Samba:

    commit b728c63bcb5860aed2db43139d191bc149ceba83
    Author: Stefan Metzmacher <metze@samba.org>
    Date:   Mon Sep 12 15:12:50 2016 +0200

        pidl:Python: check the return values of talloc_ptrtype()

        Signed-off-by: Stefan Metzmacher <metze@samba.org>
        Reviewed-by: Andreas Schneider <asn@samba.org>

Change-Id: Icfe8837b5b998e3c5c4ea98df21cf620f53cdcd7
Reviewed-on: https://code.wireshark.org/review/23706
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-09-25 04:17:59 +00:00
Guy Harris da01add662 lib: modules: Change XXX_init interface from XXX_init(void) to XXX_init(TALLOC_CTX *)
Pick up change from Samba:

    commit 306783d6f5d577a0b8bd31d659d8c802f22f0333
    Author: Jeremy Allison <jra@samba.org>
    Date:   Thu Apr 20 12:24:43 2017 -0700

        lib: modules: Change XXX_init interface from XXX_init(void) to XXX_init(TALLOC_CTX *)

        Not currently used - no logic changes inside.

        This will make it possible to pass down a long-lived talloc
        context from the loading function for modules to use instead
        of having them internally all use talloc_autofree_context()
        which is a hidden global.

        Updated all known module interface numbers, and added a
        WHATSNEW.

        Signed-off-by: Jeremy Allison <jra@samba.org>
        Signed-off-by: Ralph Böhme <slow@samba.org>

        Autobuild-User(master): Jeremy Allison <jra@samba.org>
        Autobuild-Date(master): Sat Apr 22 01:17:00 CEST 2017 on sn-devel-144

Change-Id: I549e24e2e1fec12d8e7d3f3304cdac29882892a5
Reviewed-on: https://code.wireshark.org/review/23705
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-09-25 04:13:30 +00:00
Guy Harris 3183465351 s4-rpc_server: Allow each interface to declare if it uses handles
Pick up change from Samba:

    commit ffb8b50e3c07c833fb7b1a583d21f9dc1166a0a6
    Author: Andrew Bartlett <abartlet@samba.org>
    Date:   Mon Nov 14 11:24:03 2016 +1300

        s4-rpc_server: Allow each interface to declare if it uses handles

        This will allow the NETLOGON server in the AD DC to declare that it does not use
        handles, and so allow some more flexibility with association groups

        Signed-off-by: Andrew Bartlett <abartlet@samba.org>
        Reviewed-by: Stefan Metzmacher <metze@samba.org>

Change-Id: Ic09452d27493ff913f5a5c064a038e3783e91df2
Reviewed-on: https://code.wireshark.org/review/23704
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-09-25 04:10:12 +00:00