1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00
Commit Graph

335 Commits

Author SHA1 Message Date
Stefan Metzmacher
41b95da435 pidl:Samba4/Python: fix mapType() => mapTypeName()
This tries to fix commit 8eff9f9a31.

The problem was:

Undefined subroutine &Parse::Pidl::Samba4::Python::mapType called at /home/metze/master4/pidl/lib/Parse/Pidl/Samba4/Python.pm line 848.

Jelmer: please check this.

metze
2009-07-31 10:16:40 +02:00
Jelmer Vernooij
8eff9f9a31 python: Cope with the dom_sid2 alias in pidl's python generating code.
This fixes some problems in the samr Python bindings that pidl was
(correctly) warning about.
2009-07-30 20:28:29 +02:00
Jelmer Vernooij
6768cfe624 DCE/RPC(Python): Rename py_talloc_import to py_talloc_steal.
Use py_talloc_reference in DCE/RPC code, fixes
					access to SAMR pipe.
2009-07-30 20:04:42 +02:00
Ronnie Sahlberg
c6d7f3bdb5 pidl: import a patch to pidl made in the wireshark reporitory.
Original commit message in wireshark SVN (rev 28961):
====
From Kovarththanan Rajaratnam:
More "Cleanup header_field_info definitions"
====

Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2009-07-28 12:30:16 +02:00
Stefan Metzmacher
92791ce9a8 pidl: allow foo being on the wire after [length_is(foo)] uint8 *buffer
metze
2009-07-27 17:51:32 +02:00
Stefan Metzmacher
7ccc9a6ef5 pidl: add support for [string] on fixed size arrays.
midl also supports this:

struct {
	long l1;
	[string] wchar_t str[16];
	long l2;
};

Where the wire size of str is encoded like a length_is() header:
4-byte offset == 0;
4-byte array length;

The strings are zero terminated.

metze
2009-07-27 17:51:32 +02:00
Jelmer Vernooij
7889823783 pidl: Print actual type names in errors about unknown origins rather than 'HASH(0x....)'. 2009-07-19 21:12:56 +02:00
Jelmer Vernooij
54a2f51d57 pidl: Print proper errors when arrays don't have a specified size rather than spewing pages of perl warnings. 2009-07-19 20:42:52 +02:00
Jelmer Vernooij
b9cf441f82 pidl: Don't run compile tests inside the tree, won't work yet. 2009-07-03 00:58:48 +02:00
Andrew Bartlett
e53ee27091 pidl Fix samba4.pidl.typelist test after addition of 'double' 2009-06-05 10:29:46 +10:00
Brad Hards
00bfe9c286 Add support for double type in pidl.
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
2009-06-02 18:05:42 +02:00
Andrew Bartlett
8ab74e948a Revert "pidl/python: Add explicit casts, fixing implicit cast warnings."
It was creating new objects with bogus data.

This reverts commit 2108303929.
2009-04-21 15:07:10 +02:00
Stefan Metzmacher
9930e5b3db pidl:Samba4/client: fix dcerpc_ndr_request_send() callers
For samba4 you need one of this:
samba/source4# make full_idl
samba/source4# make clean
samba# git clean -x -f

metze
2009-04-20 18:17:09 +02:00
Stefan Metzmacher
ed98cba5ab pidl:Samba4/client: use dcerpc_ndr_request() for sync requests
metze
2009-04-20 18:15:01 +02:00
Jelmer Vernooij
4638633308 Move tdr to top-level. 2009-03-14 21:57:44 +01:00
Brad Hards
66a26a0ac2 Update instructions for checking out pidl. 2009-03-10 17:11:39 +01:00
Tim Prouty
cfb4757386 pidl: Don't generate variables declarations for pointless array counters.
Code isn't generated to iterate over arrays of length 0, but the
variable declarations still are.  The result is 'unused variable'
warnings. This only seems to be happening in one place right now, so I
targeted the fix to this case, but refactoring could be done to make
all variable declarations do this zero length check.  Making it the
default would be a much more invasive fix.

Jelmer, please check!
2009-03-04 18:32:13 -08:00
Jelmer Vernooij
e2469e3748 Don't generate array iterators when the length of the array is always 0.
(bug #6140)
2009-03-01 17:09:07 +01:00
Jelmer Vernooij
d7c7b31bba Only define _GNU_SOURCE if it's not defined yet. 2009-02-25 16:54:35 +01:00
Jelmer Vernooij
f71db89256 Include header with NTSTATUS, as some IDL files use it. 2009-02-25 15:21:36 +01:00
Jelmer Vernooij
fc3ffedcfe Don't define _GNU_SOURCE if it's already defined on the command-line. 2009-02-25 15:05:43 +01:00
Andrew Bartlett
c2cdb4ad5c Work around ndr_unpack failing on structures with relative pointers.
This disgusting hack works around the fact that
ndr_pull_struct_blob_all will always fail on structures with relative
pointers.  So, map ndr_unpack to ndr_pull_struct_blob_all only if we
don't have any relative pointers in this structure.

Andrew Bartlett
2009-02-25 17:43:07 +11:00
Stefan Metzmacher
6563c2b7e4 pidl:NDR/Parser: don't call [noopnum] function when creating the ndr_interface_table
metze
2009-02-19 11:13:33 +01:00
Jelmer Vernooij
69fff2d750 Revert "Fix errornos assumption that all compilers are gcc"
This breaks (some?) files with gcc.

This reverts commit 98a4327b19.
2009-02-09 23:29:41 +01:00
Torgeir Lerkerod
98a4327b19 Fix errornos assumption that all compilers are gcc
When compiling Samba 4's IDL files buildsystem assumes that compiler
knows about -xc, which is a gcc spesefic switch as this switch isn't
needed on gcc either the flag was uneeded and can be removed. Thus no
warnings on non gcc systems.

Signed-off-by: Torgeir Lerkerod <Torgeir.Lerkerod@gmail.com>
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
2009-02-09 22:12:45 +01:00
Jelmer Vernooij
39172b5ce9 Remove an invalid discard_const_p() - it masks an actual
bug in pidl where pidl uses "const" in a struct where there should not be
const.

There is only a single place in the Samba codebase where this triggers a
warning.
2009-02-09 18:39:27 +01:00
Jelmer Vernooij
fa1ead3aa0 Use discard_const_p rather than CONST_DISCARD. 2009-02-09 17:50:35 +01:00
Tim Prouty
7168cf440e pidl: Fix a const build warning in the samba3 merged build
../librpc/gen_ndr/cli_spoolss.c: In function `rpccli_spoolss_EnumPrinterData':
../librpc/gen_ndr/cli_spoolss.c:3400: warning: passing arg 1 of `memcpy' discards qualifiers from pointer target type

This is a very similar fix to:
2337f402f0
2009-02-07 00:47:32 -08:00
Günther Deschner
2bbe0c2859 pidl: return early when AllocOutVar() in s3 server generator has nothing to do.
Jelmer, Metze, please check.

Guenther
2009-02-06 18:53:40 +01:00
Stefan Metzmacher
4b541c6f03 pidl: fix samba3-cli test after change to cli->dispatch()
metze
2009-01-30 13:24:26 +01:00
Michael Adam
2108303929 pidl/python: Add explicit casts, fixing implicit cast warnings.
Michael
2009-01-22 08:16:55 +01:00
Michael Adam
842d24f23d pidl: reduce implicit cast warnings in gen_ndr server code
Michael
2009-01-22 08:16:54 +01:00
Jelmer Vernooij
293acaf92e pidl/python: Add explicit casts, fixes warnings about casts when enabled. 2009-01-21 18:38:40 +01:00
Jelmer Vernooij
11a25f9050 Allow calling DCE/RPC server implementations directly using
rpc_pipe_client.
2009-01-21 14:05:51 +01:00
Tim Prouty
142b2a61f8 pidl: Remove "max" and make "range" smarter about unsigned types
This eliminates a warning in pidl generated code, while preserving
cross-platform idl compatibility.
2009-01-17 19:37:52 -08:00
Tim Prouty
7c861cac53 pidl: Add max property to be used instead of range for unsigned types.
Compilers complain about ranges starting at 0 for unsigned types,
since an unsigned type is never less than 0.  The max property
implicitly makes 0 the lower bound when used with unsigned types.
2009-01-15 14:52:35 -08:00
Stefan Metzmacher
4f079fe539 pidl: remove references to EJS and SWIG code
This fixes 'make install'.

metze
2009-01-13 13:01:36 +01:00
Volker Lendecke
125696b73d Pass the full ndr_interface_table into the s3 rpcserver when registering 2009-01-09 23:17:57 +01:00
Jelmer Vernooij
ba5d6e6d70 Avoid using a utility header for Python replacements included in Samba,
since this will not be shipped with talloc/tdb/tevent/etc.
2009-01-08 12:20:20 +01:00
Tim Prouty
61a23c5eea s3/s4 build: Fix Py_RETURN_NONE to work with python versions < 2.4 2009-01-07 15:03:16 -08:00
Jelmer Vernooij
d2c70d24e1 py: Properly increase the reference counter of Py_None. 2009-01-06 04:13:57 +01:00
Jelmer Vernooij
af744e0954 Merge branch 'master' of ssh://git.samba.org/data/git/samba 2009-01-04 22:48:23 +01:00
Stefan Metzmacher
96266d2f50 pidl: add dummy element for empty unions
This hopefully fixes the build on Solaris and IRIX.

metze
2009-01-02 16:32:55 +01:00
Jelmer Vernooij
08259c1c52 Add iconv_convenience argument to size functions. 2009-01-01 04:45:33 +01:00
Tim Prouty
2337f402f0 pidl: Fix a const build warning in the samba3 merged build
The warning:
../librpc/gen_ndr/ndr_spoolss.c: In function ‘ndr_pull_spoolss_EnumPrinterData’:
../librpc/gen_ndr/ndr_spoolss.c:14792: warning: passing argument 1 of ‘memset’ discards qualifiers from pointer target type

In some case the pidl generated code needs to memset a const struct
field.  This causes the above warning.  This patch discardeds the const
in this case.  I'm open to a more elegant fix, but this eliminates the
warning and should be relatively safe.
2008-12-30 16:19:43 -08:00
Stefan Metzmacher
791459f61b pidl: don't generate invalid C code
When we don't know how to handle a type for the python bindings,
we should not generate invalid C code.

Jelmer: please fix do the full fix for this.

metze
2008-12-29 23:23:27 +01:00
Jelmer Vernooij
619f320183 pidl: Fix typelist test after addition of type origin tracking. 2008-12-23 03:17:01 +01:00
Jelmer Vernooij
1807b0870b pidl/python: Factor out connect code rather than duplicating it in each
Python module.
2008-12-22 04:56:41 +01:00
Jelmer Vernooij
a6bd295229 pidl/python: Skip unknown types, rather than dieing. 2008-12-22 03:22:28 +01:00
Jelmer Vernooij
7ebc7e677d pidl: Allow location argument to warning() and error() to be undef, in case it is
not known.
2008-12-22 03:21:10 +01:00
Jelmer Vernooij
2c58c9497c Import types from other Python mechanisms using the Python import mechanism, to ensure they are initialized. 2008-12-22 01:51:38 +01:00
Jelmer Vernooij
7e651c7ef3 Simplify customization of pidl-generated Python modules. 2008-12-21 21:10:40 +01:00
Jelmer Vernooij
38a4749d2c Allow providing extra module-level Python functions. 2008-12-21 18:46:59 +01:00
Jelmer Vernooij
c1a9b68623 Create and use convenience function for creating new talloc-wrapping Python Objects, support subtypes of DCE/RPC interfaces properly 2008-12-21 00:37:31 +01:00
Jelmer Vernooij
42b7762f9b Support custom constructors for pidl-created types and support types based on pidl-created types. 2008-12-21 00:09:30 +01:00
Jelmer Vernooij
97f3720038 Don't write out forward declarations for enums, as some compilers don't
seem to like it.
2008-12-16 22:58:10 +01:00
Jelmer Vernooij
9692c71aa1 Make some fatal errors non-fatal. This means we generate invalid code in
some cases, but we do print errors. We don't use all generated code yet at the
moment, so this isn't much of a problem.
2008-12-16 18:02:14 +01:00
Jelmer Vernooij
5bf0c0bf9c Remove pidl SWIG backend; the native Python one works much better, and
that's also the best way to go for any other languages.
2008-12-16 16:48:48 +01:00
Jelmer Vernooij
121970d224 Only create (D)COM output files if there were COM objects in the IDL files. 2008-12-16 16:37:54 +01:00
Andrew Tridgell
f448fde4e3 Merge branch 'master' of ssh://git.samba.org/data/git/samba 2008-12-16 11:41:20 +11:00
Jelmer Vernooij
0727fbe87d Don't allow specifying arguments to pidl object constructors, as they'll
be ignored anyway atm.
2008-12-12 19:01:40 +01:00
Jelmer Vernooij
3e2c070395 Allow overriding repr function for pidl-defined types. 2008-12-12 13:31:42 +01:00
Jelmer Vernooij
850abaffbe Support pyhelper property to allow additional methods to be tucked onto a
pidl-generated type.
2008-12-12 12:40:11 +01:00
Jelmer Vernooij
d1101dba79 Remove noejs property, which is no longer used. 2008-12-12 11:48:42 +01:00
Jelmer Vernooij
0f8d749144 Add convenience function for determining if an array should be allocated with talloc. 2008-12-12 11:16:36 +01:00
Jelmer Vernooij
076479aac3 Remove EJS backend for PIDL, as we don't have EJS anymore. 2008-12-12 10:30:13 +01:00
Andrew Tridgell
a226d86dce Merge branch 'master' of ssh://git.samba.org/data/git/samba 2008-12-03 17:47:39 +11:00
Günther Deschner
2865be8a1c pidl: fix generated s3-server in,out,ref qualifiers that are used for buffer allocation.
Guenther
2008-11-19 21:50:02 +01:00
Günther Deschner
216c788b0c pidl: skip generation of noopnum functions in generated s3 server.
Guenther
2008-11-15 00:32:55 +01:00
Günther Deschner
cf06b75f0a pidl: do not generate cli_ functions for noopnum flaged functions.
Guenther
2008-11-15 00:32:55 +01:00
Jelmer Vernooij
2f438b4cde Remove unused variable, fix return. 2008-11-11 17:10:24 +01:00
Andrew Tridgell
ae795a0979 we need to remove the pidl Makefile on "make clean" to handle upgrades
to perl versions
2008-11-06 11:02:20 +11:00
Jelmer Vernooij
a1cc278142 Remove use of global_loadparm during initialization of gensec. 2008-11-02 17:04:22 +01:00
Jelmer Vernooij
c537f7a914 Fix the build. 2008-11-02 05:49:36 +01:00
Jelmer Vernooij
dccf1b2c9f Remove another use of global_loadparm. 2008-11-02 00:26:04 +01:00
Jelmer Vernooij
23b04a31f1 Fix include path to pytalloc. 2008-10-24 02:58:12 +02:00
Jelmer Vernooij
358e9931bc Also check include dirs for IDL files. 2008-10-15 02:06:41 +02:00
Jelmer Vernooij
9f2ed1e00f Share RPC binding string utility functions. 2008-10-12 19:05:46 +02:00
Jelmer Vernooij
aa22ab1404 Fix executability of samba3-srv. 2008-10-10 15:00:30 +02:00
Jelmer Vernooij
20b73b1309 Print proper error if include file can't be found. 2008-10-08 02:18:59 +02:00
Jelmer Vernooij
454122ab09 make sure dcerpc is always initialized. 2008-09-30 06:05:05 +02:00
Jelmer Vernooij
f379f67dd2 Fix installation of misc files. 2008-09-30 00:29:03 +02:00
Günther Deschner
44f7c1c216 pidl: fix samba3 server wrt to samba4 ndr_pull_init_blob protype.
this is in preparation for the final nbt merge.

Guenther
2008-09-23 23:34:27 +02:00
Jelmer Vernooij
729ffbae08 Merge branch 'master' of ssh://git.samba.org/data/git/samba into noejs
Conflicts:
	source4/main.mk
2008-09-18 20:29:05 +02:00
Jelmer Vernooij
79190992b3 Move pidl to top-level directory. 2008-09-17 17:12:27 +02:00