| Age | Commit message (Collapse) | Author | Files | Lines |
|
From the Wireshark development branch:
commit 4f55543f6b6e5c5d15572889a2cac2b0ec28200e
Author: John Thacker <johnthacker@gmail.com>
Date: Fri Oct 10 11:10:13 2025 -0400
pidl: Check if a hf is used in a CODE block
If a field declared in a conformance file appears within a custom
CODE block in the conformance file, don't warn about the hf being
unused. This theoretically could have false negatives if a field
is mentioned only in a comment in the CODE block; we'd have to
remove the comments with something like Regexp::Common before
searching to avoid that.
The current conformance files in the Wireshark distribution don't
have any such false negative cases, but there are dozens of false
positives prevented by this change.
Signed-off-by: John Thacker <johnthacker@gmail.com>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Wed Nov 5 11:12:35 UTC 2025 on atb-devel-224
|
|
From the Wireshark development branch:
commit d2232d7e51640e0e736d7b8df1b21598a21a1c85
Author: John Thacker <johnthacker@gmail.com>
Date: Fri Oct 10 23:02:58 2025 -0400
pidl: Do not produce a function that is replaced by MANUAL code
If a MANUAL directive in a conformance file causes a function not to be
emitted, do not bother calculating the function that will not be used.
This is similar to the NOEMIT directive, but has different logic because
MANUAL only prevents emitting the function for one level of an element
instead of all the functions and variables. This does not change the
dissectors produced at all, only skips some unnecessary compilation.
In particular, the messages when compiling the pidl-dissectors target:
dnsserver.idl:159: error: Inline arrays not supported
eventlog.idl:54: error: Inline arrays not supported
are no longer inaccurately produced. The inline arrays in those two IDL
files have long been supported through the MANUAL code blocks.
Expand on the error message to suggest the use of MANUAL directives
for implementation.
Signed-off-by: John Thacker <johnthacker@gmail.com>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
|
|
From the Wireshark development branch:
commit e3d8636109182d7e243eea6216af7f14edda3227
Author: John Thacker <johnthacker@gmail.com>
Date: Thu Oct 9 20:06:43 2025 -0400
pidl: Fix filter names for subcontext length fields
The Perl variable $_->{NAME} never exists at the point in the code;
$e->{NAME} is almost surely intended instead, which makes the subcontext
length field have the same filter name as the parent field with
".subcontext" added.
This changes a few fields, including making some fields in the same
struct or union that incorrectly shared a filter name now have unique
filter names. Also prevents Perl warnings:
Use of uninitialized value in concatenation (.) or string at /builds/wireshark/wireshark/tools/pid
l/lib/Parse/Pidl/Wireshark/NDR.pm line 438.
Signed-off-by: John Thacker <johnthacker@gmail.com>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
|
|
From the Wireshark development branch:
commit edc98c1b537cbd7b8fb35cdb8b61b7dd000a1544
Author: John Thacker <johnthacker@gmail.com>
Date: Thu Oct 9 18:31:35 2025 -0400
pidl: Check for undefined SwitchType first
If the switch type is not defined (e.g. in a union with no
discriminant) check for that first instead of doing a bunch of
comparisons with an uninitialized scalar variable. Doesn't change
the dissector results, but prevents a bunch of Perl warnings:
Use of uninitialized value $t in hash element at /wireshark/tools/pidl/lib/Parse/Pidl/Typelist.pm
line 194.
Use of uninitialized value in string eq at /wireshark/tools/pidl/lib/Parse/Pidl/Wireshark/NDR.pm l
ine 480.
Use of uninitialized value in string eq at /wireshark/tools/pidl/lib/Parse/Pidl/Wireshark/NDR.pm l
ine 482.
Use of uninitialized value in string eq at /wireshark/tools/pidl/lib/Parse/Pidl/Wireshark/NDR.pm l
ine 484.
Signed-off-by: John Thacker <johnthacker@gmail.com>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
|
|
From the Wireshark development branch:
commit 448a0d6a239f3f274d3a3a3a39ea9c6ce7fd2611
Author: John Thacker <johnthacker@gmail.com>
Date: Thu Oct 9 10:18:07 2025 -0400
pidl: Warn appropriately on unsupported switch_is discriminants
Microsoft's MIDL supports switch_is discriminants which have limited
C-language expressions including conditionals, logical, relational,
and arithmetic expressions. [1] Some of the distributed IDL files include
such expressions. The current handling in PIDL's Wireshark NDR.pm only
supports a single identifier (possibly a pointer), which appears to be
the way it is defined in the original DCE IDL. [2,3]
In addition, the switch_is discriminant may simply be misspelled or
otherwise not found when parsing, leading to an empty array reference.
Test for the empty array in order to produce a helpful warning message
with the filename and line number, instead of unhelpful Perl warnings.
This does not provide support for the construct not affect the generated
dissectors at all, only reduces 4 unclear warnings into a single useful
warning.
Before:
Use of uninitialized value $name in string ne at /home/johnthacker/wireshark/tools/pidl/lib/Parse/
Pidl/Wireshark/NDR.pm line 516.
Use of uninitialized value in string eq at /home/johnthacker/wireshark/tools/pidl/lib/Parse/Pidl/W
ireshark/NDR.pm line 525.
Use of uninitialized value $name in string ne at /home/johnthacker/wireshark/tools/pidl/lib/Parse/
Pidl/Wireshark/NDR.pm line 527.
Use of uninitialized value $name in string ne at /home/johnthacker/wireshark/tools/pidl/lib/Parse/
Pidl/Wireshark/NDR.pm line 531.
After:
drsuapi.idl:828: warning: ctr switch_is discriminant `level|(type<<16)' not found. (Only single id
entifiers are supported, not expressions as in MIDL.)
[1] - https://learn.microsoft.com/en-us/windows/win32/midl/switch-is
[2] - https://pubs.opengroup.org/onlinepubs/9629399/chap4.htm#tagcjh_08_02_12
[3] - https://pubs.opengroup.org/onlinepubs/9629399/chap4.htm#tagcjh_08_04
Signed-off-by: John Thacker <johnthacker@gmail.com>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
|
|
From the Wireshark git development branch:
commit 8dee8601776175a6132bef7ab19f36ee3d589d06
Author: John Thacker <johnthacker@gmail.com>
Date: Wed Oct 8 17:15:56 2025 -0400
pidl: Use has_property to avoid comparing undef with the empty string
Prevents a bunch of (harmless) warnings when compiling:
Use of uninitialized value in string eq at /builds/wireshark/wireshark/tools/pidl/lib/Parse/Pidl/Wireshark/NDR.pm line 521.
Signed-off-by: John Thacker <johnthacker@gmail.com>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
|
|
From the Wireshark git repository, to reduce false positive warnings when
compiling dissectors with pidl:
commit 919f15ab2ea313d69cc2578426430f22f65a51b5
Author: John Thacker <johnthacker@gmail.com>
Date: Wed Oct 8 16:52:09 2025 -0400
pidl: Don't warn about params that are used
The "USED" indicator is never set for params, which results in many
bogus "warning: dissector param never used" messages when compiling
the pidl dissectors. Set it when used, to reduce the number of messages.
Signed-off-by: John Thacker <johnthacker@gmail.com>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
|
|
Signed-off-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
|
|
https://realpython.com/documenting-python-code/
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15680
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
|
|
This is needed in order to do useful tests with
specific error codes and still checking all other
out parameters.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14213
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
|
|
They are returned as additional result.
It means callers can look at all out params,
even if the status is an error.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14213
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
|
|
If we raise an exception we should not leak temporary
python objects.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14213
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
|
|
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14213
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
|
|
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14213
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
|
|
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14213
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
|
|
No change in the generated code.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14213
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
|
|
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14213
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
|
|
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
|
|
Add includes to for example misc.h if needed, so that misc.h can be
directly included without prerequisites
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jennifer Sutton <jsutton@samba.org>
|
|
Pair-Programmed-With: Volker Lendecke <vl@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jennifer Sutton <jsutton@samba.org>
|
|
Pair-Programmed-With: Volker Lendecke <vl@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jennifer Sutton <jsutton@samba.org>
|
|
Avoid a few uses of includes.h
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jennifer Sutton <jsutton@samba.org>
|
|
Pick up change from Wireshark:
commit bdb719f846f9d8f7800b9f50dadfde5e7f7a89e1
Author: John Thacker <johnthacker@gmail.com>
Date: Sun Jun 23 08:15:45 2024 -0400
pidl: Another C99 type conversion
Change an automated sizeof() call in the pidl dissector generation from
prefixing a "g" to getting the actual C type.
Ping #19116
Signed-off-by: John Thacker <johnthacker@gmail.com>
Reviewed-by: Jo Sutton <josutton@catalyst.net.nz>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Fri Jul 12 11:08:03 UTC 2024 on atb-devel-224
|
|
Pick up change from Wireshark:
commit ade6577f109e2bf741909226254b758e79a816f1
Author: John Thacker <johnthacker@gmail.com>
Date: Fri Jun 21 20:27:51 2024 -0400
pidl: Don't assign hash undef, assign it an empty array
Perl works, but complains if warnings are on, if a hash is
initialized to undef instead of to empty. Upstream Samba turned on
warnings in the next commit to catch things like this.
Signed-off-by: John Thacker <johnthacker@gmail.com>
Reviewed-by: Jo Sutton <josutton@catalyst.net.nz>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
|
|
Pick up change from Wireshark:
commit 10b046cbdd110dbae8f4cab048e5954bf6955402
Author: John Thacker <johnthacker@gmail.com>
Date: Sat Jun 22 20:31:40 2024 -0400
pidl: Remove init of proto variables
Remove initialization of proto variables from pidl generated dissectors
and regenerate.
Follow up to 2a9bc63325c99653c5da873c273430add3b5e9dd
Signed-off-by: John Thacker <johnthacker@gmail.com>
Reviewed-by: Jo Sutton <josutton@catalyst.net.nz>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
|
|
Pick up change from Wireshark:
commit 4df8d2884ddfe72a03d0b322c10ae515a8366ea4
Author: John Thacker <johnthacker@gmail.com>
Date: Sat Jun 22 11:21:47 2024 -0400
pidl: Convert the pidl dissector generation code to C99 types
Switch the Wireshark.pm pidl dissector generation code to using C99
types, and regenerated the dcerpc pidl dissectors.
Ping #19116
Signed-off-by: John Thacker <johnthacker@gmail.com>
Reviewed-by: Jo Sutton <josutton@catalyst.net.nz>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
|
|
Pick up change from Wireshark:
commit 6e4c81b324e9b1752ce6bc253a09355512b5b387
Author: John Thacker <johnthacker@gmail.com>
Date: Sat Jun 22 11:10:48 2024 -0400
pidl: Update test for removal of ett initialization
Also remove trailing whitespace
Signed-off-by: John Thacker <johnthacker@gmail.com>
Reviewed-by: Jo Sutton <josutton@catalyst.net.nz>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
|
|
Pick up change from Wireshark:
commit 8a2a42241fd148ce735e776a6a1e6b49b64d215e
Author: Darius Davis <darius-wireshark@free-range.com.au>
Date: Sun May 19 17:39:38 2024 +1000
Const-ify dcerpc_sub_dissector structures.
This moves about 56 kBytes of data from a read-write data section to read-only.
The various dissectors were _not_ regenerated for this commit. Instead, this
commit was produced using the following command:
find * -type f -exec sed -i -e 's/\(["'\'']\|^\)static dcerpc_sub_dissector/\1static const dcerpc_sub_dissector/' \{\} \;
This updates the generator script and its test, as well as making an identical
change to all of the dissectors, regardless of whether or not those dissectors
were produced by the generator script.
Signed-off-by: John Thacker <johnthacker@gmail.com>
Reviewed-by: Jo Sutton <josutton@catalyst.net.nz>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
|
|
Pick up change from Wireshark:
commit 9ca6eff53db29cad7dfc7e57fba4d68e9c838ab5
Author: Anders Broman <a.broman58@gmail.com>
Date: Thu May 2 14:14:29 2024 +0200
PIDL: Don't initialise static hf and ett variables.
Signed-off-by: John Thacker <johnthacker@gmail.com>
Reviewed-by: Jo Sutton <josutton@catalyst.net.nz>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
|
|
Pick up change from Wireshark as it applies to PIDL:
commit 2a9bc63325c99653c5da873c273430add3b5e9dd
Author: Stig Bjørlykke <stig@bjorlykke.org>
Date: Mon Nov 20 08:16:40 2023 +0100
Remove init of proto variables
Remove init of proto, header field, expert info and subtree variables.
This will reduces the binary size by approximate 1266320 bytes due to
using .bss to zero-initialize the fields.
The conversion is done using the tools/convert-proto-init.py script
Signed-off-by: John Thacker <johnthacker@gmail.com>
Reviewed-by: Jo Sutton <josutton@catalyst.net.nz>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
|
|
Picked from Wireshark:
commit b1249b0be4badc44cbbb30ff414d32d1b884a668
Author: hidd3ncod3s Sec <hidd3ncod3s@gmail.com>
Date: Tue Aug 15 04:29:08 2023 +0000
DCERPC: Update DRSUAPI support
Signed-off-by: John Thacker <johnthacker@gmail.com>
Reviewed-by: Jo Sutton <josutton@catalyst.net.nz>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
|
|
This reverts commit a836b433ed7f0acca546558d2aec359155999f30.
Wireshark's NDR dissector dissects both signed and unsigned types
of the same size and alignment with the same functions, e.g. see
the handling of "udlong" and "dlong." It is passing the FT_UINT64
vs FT_INT64 field type enum value that determines at the last
moment whether a value is cast to signed. dissect_ndr_uint64()
already has the proper behavior for 8-byte aligned signed 64 bit
integers, and a dissect_ndr_int64() function will not need to be
introduced.
Signed-off-by: John Thacker <johnthacker@gmail.com>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Jo Sutton <josutton@catalyst.net.nz>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Wed Jul 3 14:19:04 UTC 2024 on atb-devel-224
|
|
Picked from Wireshark's fork:
commit e1d9a226a2b8f2824a0eb162a8dc972e6e6c2dd4
Author: Guy Harris <gharris@sonic.net>
Date: Thu Jun 18 18:14:46 2020 -0700
Fix the type of arrays of pointers to hf_ values for bitfield routines.
The static arrays are supposed to be arrays of const pointers to int,
not arrays of non-const pointers to const int.
Fixing that means some bugs (scribbling on what's *supposed* to be a
const array) will be caught (see packet-ieee80211-radiotap.c for
examples, the first of which inspired this change and the second of
which was discovered while testing compiles with this change), and
removes the need for some annoying casts.
Also make some of those arrays static while we're at it.
Update documentation and dissector-generator tools.
Change-Id: I789da5fc60aadc15797cefecfd9a9fbe9a130ccc
Reviewed-on: https://code.wireshark.org/review/37517
Petri-Dish: Guy Harris <gharris@sonic.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Signed-off-by: John Thacker <johnthacker@gmail.com>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Douglas Bagnall <dbagnall@samba.org>
Autobuild-Date(master): Wed Jul 3 02:35:43 UTC 2024 on atb-devel-224
|
|
Picked from Wireshark's fork:
commit 7cd6906056922e4b8f68f1216d94eaa0809896fe
Author: Guy Harris <guy@alum.mit.edu>
Date: Mon Jan 9 22:18:49 2017 -0800
Rename tvb_new_subset() to tvb_new_subset_length_caplen().
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>
Signed-off-by: John Thacker <johnthacker@gmail.com>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
|
|
Picked from Wireshark's fork:
commit 5ae9af9e50c89d8700e5a166a9c345fc46b3a4ca
Author: Guy Harris <guy@alum.mit.edu>
Date: Sun Nov 6 11:02:51 2016 -0800
Get rid of Boolean "flags" that don't have any bit set.
And tweak the Pidl generator for Wireshark not to generate "flags" like
that.
(The generator also does field name and true/false strings' case
differently, so I didn't use it to regenerate the dissectors; that needs
to be looked at.)
Change-Id: Ie1657a782ebdb107e58792cedd29bbaa79b17bd4
Reviewed-on: https://code.wireshark.org/review/18695
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Signed-off-by: John Thacker <johnthacker@gmail.com>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
|
|
Picked from Wireshark's PIDL fork:
commit c07fd447c362099b04eedb445e8fa469643403f7
Author: Binh Trinh <beango@gmail.com>
Date: Fri Jun 17 21:46:11 2016 -0400
DCE/RPC: fix array of pointers with NULL
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>
Signed-off-by: John Thacker <johnthacker@gmail.com>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
|
|
Picked from the Wireshark fork:
commit 9a5e6a6884b2369527638fecd49c4c58d8c10378
Author: Michael Mann <mmann78@netscape.net>
Date: Wed Jun 15 15:35:51 2016 -0400
DCE/RPC proto_tree_add_boolean -> proto_tree_add_bitmask_with_flags
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>
Signed-off-by: John Thacker <johnthacker@gmail.com>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
|
|
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
|
|
Without the `$self->pidl("$fail");`, the exception is not raised.
We also try to improve the Python message.
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
|
|
This function is only used by Python.pm, and was assuming any argument
unrecognised by hasType is a name. It sometimes isn't, resulting in
structures like this:
{
'DATA' => {
'TYPE' => 'STRUCT'
},
'NAME' => {
'TYPE' => 'STRUCT',
'ALIGN' => undef,
'SURROUNDING_ELEMENT' => undef,
'ORIGINAL' => {
'TYPE' => 'STRUCT',
'FILE' => 'source3/librpc/idl/smbXsrv.idl',
'LINE' => 101,
'NAME' => 'tevent_context'
},
'ELEMENTS' => undef,
'NAME' => 'tevent_context',
'PROPERTIES' => undef
},
'TYPE' => 'TYPEDEF'
};
The problem with that is we end up with the HASH reference as a name
in Python bindings, like this
PyErr_SetString(PyExc_TypeError, "Can not convert C Type struct HASH(0x5e2dfe5ee278) from Python");
which makes the build nondeterministic (as well as making the message
a little mysterious).
I think all the structures for which this happens are marked
'[ignore]' in IDL, meaning they are not transmitted on the wire. They
should perhaps also not have useless Python getsetters, but let's call
that a different problem.
Thanks to Freexian and the Debian LTS project for sponsoring this work.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13213
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
|
|
Guenther
Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Thu Mar 21 00:45:29 UTC 2024 on atb-devel-224
|
|
Guenther
Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
|
|
$var_name is not a type name, but an expression, such as ‘r->in.server’.
mapTypeName() will turn this into ‘struct r->in.server’, which makes no
sense.
Signed-off-by: Jo Sutton <josutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
|
|
For security_ace_coda in security.idl, the sub-context size is
involves a slightly non-trivial function call which returns a constant
value.
In all other cases, a constant expression is used, and this makes
no difference.
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15574
|
|
‘const unsigned char *’
A u16string is supposed to contain UTF‐16 code units, but
ndr_pull_u16string() and ndr_push_u16string() fail to correctly ensure
this on big‐endian systems. Code that relies on the u16string array
containing correct values will then fail.
Fix ndr_pull_u16string() and ndr_push_u16string() to work on big‐endian
systems, ensuring that other code can use these strings without having
to worry about first encoding them to little‐endian.
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
|
|
$cvar could be an expression such as ‘1 << 10’. In such cases this cast
presumably was intended to apply to the entire expression, not just to
the ‘1’.
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
|
|
Pidl will generate code like the following:
py_out_2 = PyLong_FromLong((uint16_t)*r->out.out[out_cntr_2]);
As the array subscripting operator has a higher precedence than the
indirection (derference) operator, the argument will be evaluated as
(uint16_t)*(r->out.out[out_cntr_2]), which is wrong.
Fix Pidl to generate the following code instead:
py_out_2 = PyLong_FromLong((uint16_t)(*r->out.out)[out_cntr_2]);
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
|
|
_pytalloc_get_ptr() returns ‘void *’.
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
|
|
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
|
|
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
|