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

342 Commits

Author SHA1 Message Date
Stefan Metzmacher
d79fb9098b pidl: add support for 'pipe' at the NDR layer
metze
2011-03-10 14:31:19 +01:00
Stefan Metzmacher
f43e757096 pidl/idl.yp: fill 'pipe' elements with array and count
metze
2011-03-10 14:31:19 +01:00
Stefan Metzmacher
91ef694351 pidl:NDR/Client: skip all functions if pipe elements are used
We don't support pipe at the dcerpc level yet.

metze
2011-03-10 14:31:18 +01:00
Stefan Metzmacher
f383497436 pidl:NDR/Client: skip sync functions if pipe elements are used
metze
2011-03-10 14:31:18 +01:00
Stefan Metzmacher
7537f9c9bb pidl:Python: don't generate functions with pipe elements
metze
2011-03-10 14:31:17 +01:00
Stefan Metzmacher
29bd658634 pidl:Samba3/ClientNDR: don't generate stubs for functions with pipe elements
metze
2011-03-10 14:31:17 +01:00
Stefan Metzmacher
eaa7ecdda7 pidl/NDR: add ContainsPipe() function
metze
2011-03-10 14:31:16 +01:00
Stefan Metzmacher
6e4e3f57e4 pidl/Typelist: add is_fixed_size_scalar()
metze
2011-03-10 14:31:14 +01:00
Stefan Metzmacher
6ef40f3199 pidl/Typelist: dnsp_name and dnsp_string are scalar references
metze
2011-03-10 14:31:13 +01:00
Andrew Bartlett
646aefd998 pidl Add support for uid_t and gid_t types
These are mapped to uint64_t, which should be big enough.  This is
proposed to be used for internal Samba representations, where it would
be more painful to convert all the callers to an uint64_t calling
convention.

Andrew Bartlett
2011-03-01 06:29:03 +01:00
Stefan Metzmacher
bd2b0076b4 Revert "Fix alignment issues in SPOOLSS "BUFFER" marshalling."
This reverts commit 187f695469.

This is the wrong fix.

metze
2011-02-28 15:54:13 -08:00
Jeremy Allison
187f695469 Fix alignment issues in SPOOLSS "BUFFER" marshalling.
Guenther and Metze please check !

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Fri Feb 18 18:49:55 CET 2011 on sn-devel-104
2011-02-18 18:49:55 +01:00
Andrew Tridgell
431b25e895 pidl: support using pidl from top level directory
pidl needs to know if it is being used within the samba tree or not,
to get the names of some include files right. This adds support for
using pidl in the top level directory of a Samba build

This change also makes it clear that is_intree() is a boolean
function. Previously it returned different values for Samba3 and
Samba4, but there is nothing that depends on that

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-02-07 13:22:00 +11:00
Stefan Metzmacher
34b7b552e8 pidl:Samba4/NDR/Parser: fix ndr_pull/ndr_push mismatch
metze
2011-02-01 18:35:22 +01:00
Stefan Metzmacher
9fe4b695fe pidl:Samba4/NDR/Parser: add support for 'ms_union' style aligment
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Tue Feb  1 12:13:45 CET 2011 on sn-devel-104
2011-02-01 12:13:45 +01:00
Stefan Metzmacher
6124148d66 pidl:Samba4/NDR/Parser: only do the switch type alignment when we have a switch type
This doesn't change the logic, it just doesn't call the same aligment function
twice.

metze
2011-02-01 11:21:43 +01:00
Stefan Metzmacher
76f2ddf5a9 pidl:NDR: add support for 'ms_union' property.
metze
2011-02-01 11:21:42 +01:00
Stefan Metzmacher
34664338f3 pidl:Typelist: fix perl warnings about recursiv function calls
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Wed Jan 26 10:59:04 CET 2011 on sn-devel-104
2011-01-26 10:59:04 +01:00
Stefan Metzmacher
4b068bb919 pidl:Samba3/ServerNDR: correctly initialise ndr_push struct
We need to copy the ptr_count from the ndr_pull struct to the ndr_push struct,
otherwise we'll reuse full pointer ids, which will cause the client to
fail in the ndr unmarshalling.

metze
2011-01-26 08:51:46 +01:00
Stefan Metzmacher
1a96ec2109 pidl:Samba4/NDR/Client: remove compat mode for dcerpc_pipe based bindings
The only consumer "openchange" uses the dcerpc_binding_handle based
functions now.

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Fri Jan 21 08:16:25 CET 2011 on sn-devel-104
2011-01-21 08:16:25 +01:00
Stefan Metzmacher
d5173ca189 pidl:wscript: don't warn about pidl gammar file changes for now
We may add some logic that uses git diff HEAD to detect this changes
in developer mode later again.

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Tue Jan 18 08:10:06 CET 2011 on sn-devel-104
2011-01-18 08:10:06 +01:00
Stefan Metzmacher
2778130d45 pidl:Samba4/Python: fix memory leak in _ndr_print functions
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Thu Jan  6 14:34:31 CET 2011 on sn-devel-104
2011-01-06 14:34:31 +01:00
Stefan Metzmacher
ce7cb972b0 pidl/wscript: only warn about grammar file changes
autobuild should protect us from having grammar files
and generated files out of sync.

metze
2011-01-06 13:43:23 +01:00
Stefan Metzmacher
5d8f916619 pidl/wscript: let the developer use the standalone build with yapp
Waf isn't happy when files in the source directory are changed.

metze
2011-01-05 12:30:24 +01:00
Stefan Metzmacher
d89e762240 pidl:Samba4/Python: avoid ';;' in generated C code.
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Wed Jan  5 11:10:34 CET 2011 on sn-devel-104
2011-01-05 11:10:34 +01:00
Stefan Metzmacher
2e45cd15ec pidl:Samba4/Python: fix segfault when setting pointers to scalars.
metze
2011-01-05 10:24:49 +01:00
Stefan Metzmacher
2868fc8a91 pidl: regenerate lib/Parse/Pidl/Expr.pm from expr.yp
metze
2011-01-05 10:24:49 +01:00
Stefan Metzmacher
c1c9e4a1c8 pidl: sync idl.yp with the CPP changes
This is taken from commit 21b0d5e3b1.

metze
2011-01-05 10:24:48 +01:00
Jelmer Vernooij
b320cc7990 Fix some formatting. 2011-01-03 01:48:04 +01:00
Jelmer Vernooij
320fd69923 Use fail_on_null. 2011-01-03 01:48:04 +01:00
Jelmer Vernooij
9529fdab26 wmi: Remove unnecessary noprint statements. 2011-01-01 02:54:05 +01:00
Jelmer Vernooij
bbab7ed8d9 pidl: Add prototype for init function in pidl-generated Python bindings. 2010-12-18 02:20:21 +01:00
Jelmer Vernooij
f9fbe0874f pidl: Use system pytalloc if possible. 2010-12-18 00:47:06 +01:00
Stefan Metzmacher
bde8046ca5 pidl:Samba4/Python.pm: ignore "SUBCONTEXT" levels
These are only important for the NDR marshalling
and not for the python bindings.

metze
2010-12-10 18:24:06 +01:00
Stefan Metzmacher
8babee2c00 pidl:Samba4/Python.pm: don't handle scalar reference types special
The only special thing is that don't need get_value_of(),
all other checks are needed.

metze
2010-12-10 18:24:06 +01:00
Matthieu Patou
21b0d5e3b1 pidl: use $CC -E if $CPP is not defined, if both undefined use cpp
Autobuild-User: Matthieu Patou <mat@samba.org>
Autobuild-Date: Fri Dec 10 01:26:44 CET 2010 on sn-devel-104
2010-12-10 01:26:44 +01:00
Stefan Metzmacher
12c5e3fe26 pidl:Samba4/Python.pm: use PyString_FromStringOrNULL() from pyrpc_util
metze
2010-12-08 19:07:09 +01:00
Jelmer Vernooij
3bff03723d pidl/python: Allow import of talloc, even though it doesn't live in the
samba.dcerpc. namespace.
2010-12-01 01:48:25 +01:00
Jelmer Vernooij
ba2110d190 pidl: Allow more flexibility importing modules using convenience function. 2010-12-01 01:48:24 +01:00
Jelmer Vernooij
dd0fbc47c7 pidl: Base new objects off of talloc object. 2010-12-01 01:48:24 +01:00
Andrew Tridgell
a3ed70ff96 pidl: fixed call to cpp with a space in the directory name 2010-11-21 23:10:14 +11:00
Andrew Tridgell
135756c8ac pidl: use a union assignment instead of memmove
this means we don't lose type checking

Pair-Programmed-With: Jelmer Vernooij <jelmer@samba.org>
2010-11-05 23:42:08 +11:00
Jelmer Vernooij
3deece5591 s4: Remove the old perl/m4/make/mk-based build system.
The new waf-based build system now has all the same functionality, and
the old build system has been broken for quite some time.

Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Sun Oct 31 02:01:44 UTC 2010 on sn-devel-104
2010-10-31 02:01:44 +00:00
Stefan Metzmacher
482c022840 pidl:Samba4/NDR/Parser: fix NDR64 union alignment
We need to align before the switch_type and before the
union arms. Both alignments are to the boundary of the largest
possible union arm.

This means that adding a new union arm with a larger alignment
would break compat!!!

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Sun Oct 24 17:49:23 UTC 2010 on sn-devel-104
2010-10-24 17:49:23 +00:00
Kai Blin
719a6bbfed ndr dns: Add simple parser 2010-10-23 10:17:05 +00:00
Günther Deschner
df7523c792 pidl: fix minor typo in s3 server generation.
Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Mon Oct 11 15:12:57 UTC 2010 on sn-devel-104
2010-10-11 15:12:57 +00:00
Tim Potter
391b24e3ed Fix some warnings at higher -W levels in pidl generated code.
Match data type for info levels to data type returned by utility
functions.

Autobuild-User: Tim Potter <tpot@samba.org>
Autobuild-Date: Mon Oct 11 12:18:22 UTC 2010 on sn-devel-104
2010-10-11 12:18:21 +00:00
Andrew Tridgell
c24240bcd2 waf: fixed some python3.x portability issues
these have crept into the tree over time. Maybe we should add testing
of a range of python versions to autobuild?
2010-10-06 11:13:05 +00:00
Kai Blin
65d2cfdcf1 dnsp: Parse TXT records 2010-10-04 20:59:59 +02:00
Kai Blin
ee7ee2c4c2 ndr: Implement push function for IPv6 addresses
Thanks to Julien Kerihuel for providing the patch that pushed me to
finish my own IPv6 patches.
2010-10-04 20:59:59 +02:00
Kai Blin
013780b1e1 ndr: Add support for pulling/printing an ipv6address type 2010-10-04 20:59:59 +02:00
Jelmer Vernooij
88d08c172c pidl: Allow longs for bitmasks. 2010-10-03 16:25:37 +02:00
Jelmer Vernooij
b7acb8ebb6 pidl: simplify some generated code. 2010-10-03 16:25:37 +02:00
Jelmer Vernooij
b77bcea352 pidl: Fix handling of typedefs of typedefs. 2010-10-01 11:03:18 +02:00
Stefan Metzmacher
fcee50b9c9 pidl: add support for pointers in typedefs
metze
2010-09-28 23:06:52 +02:00
Stefan Metzmacher
d4636c47c7 pidl:NDR/Parser: remove unused code for array element index
metze
2010-09-28 23:06:51 +02:00
Stefan Metzmacher
7fff22c29d pidl:NDR/Parser: simplify logic in ParseMemCtxPullFlags()
metze
2010-09-28 23:06:49 +02:00
Stefan Metzmacher
3fa29cdd94 pidl:NDR/Client: make the generated code look a bit nicer
metze
2010-09-28 23:06:48 +02:00
Stefan Metzmacher
96666d48a7 pidl: remove unused async property handling
metze
2010-09-28 23:06:45 +02:00
Stefan Metzmacher
a73a2abb3a pidl/Python: use has_property($d, "noopnum") helper function
metze
2010-09-28 23:06:44 +02:00
Stefan Metzmacher
65c5278f4d pidl:NDR/Client.pm: remove unreached code
metze
2010-09-28 23:06:42 +02:00
Stefan Metzmacher
121ad074f9 pidl/Python: remove todo handling from PythonFunction(), it's done by the caller
metze
2010-09-28 23:06:41 +02:00
Stefan Metzmacher
a0fa1dd6fc pidl/Typelist: let typeIs() do TYPEDEF dereference in the HASH case
metze
2010-09-28 23:06:40 +02:00
Andrew Tridgell
7d380795b6 pidl: added ifdef guards around ndr headers
this prevents us parsing the leading headers needlessly
2010-09-27 22:55:05 -07:00
Stefan Metzmacher
bea4948acb pidl:NDR/Parser: fix range() for arrays
metze
2010-09-23 13:34:08 -07:00
Jelmer Vernooij
049c4fa04d pytalloc: Add default compare function. 2010-09-21 11:47:03 -07:00
Jelmer Vernooij
6a3c687f03 pidl/python: Allow passing in UTF8 string objects as well as unicode
objects for IDL strings.

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2010-09-20 23:17:41 -07:00
Jelmer Vernooij
c4c6f8f175 s4-pild-python: Fix assignments - even though we reference the mem_ctx
of an object we still use the actual ptr.
2010-09-20 22:40:47 -07:00
Jelmer Vernooij
a7393449eb pidl: Fix segfault when accessing unicode objects. 2010-09-20 22:40:46 -07:00
Jelmer Vernooij
5dd47eeac2 s4-pidl-python: use correct talloc pointer when allocating subobjects. 2010-09-20 22:40:46 -07:00
Andrew Tridgell
83a24ff2ef pidl: prevent ndr_print_*() dying on NULL pointers
when using ndrdump you can get uninitialised structures containing
pointers. Don't segfault when trying to print them
2010-09-16 21:09:17 +10:00
Jelmer Vernooij
0bc53f7d9f pidl: Keep only a single copy of samba.dcerpc.base.ClientConnection. 2010-09-03 02:39:38 +02:00
Jelmer Vernooij
c5449c9298 pidl: Factor out generation of interface type name. 2010-09-03 00:35:29 +02:00
Andrew Tridgell
71f2ebcae0 pidl: cope with dom_sid28 in python generator
treated the same as dom_sid2
2010-09-02 13:37:07 +10:00
Andrew Tridgell
58d92cefe2 pidl-python: cope with NULL pointers in more places
NULL is converted to Py_None
2010-09-02 13:37:07 +10:00
Stefan Metzmacher
831611e221 pidl:Samba4/NDR/Client: support argument based stubs for [in,out,string]
metze
2010-08-28 10:59:20 +02:00
Stefan Metzmacher
94faf0ccbe pidl:NDR: [in,out,string] doesn't need to pointers
metze
2010-08-28 10:59:19 +02:00
Stefan Metzmacher
aa3b75ad1f pidl:Samba4/NDR/Client: correctly copy [out,charset()] buffers
If the conversion from CH_UTF16 to CH_UNIX uses multi-byte characters
in CH_UNIX, we should not silently truncate the string, but return
an error.

metze
2010-08-28 10:59:19 +02:00
Stefan Metzmacher
eeebaa63f1 pidl:Samba4/NDR/Client: fix skip reason for unsized arrays
metze
2010-08-28 10:59:18 +02:00
Andrew Tridgell
9cb771a4a0 pidl-python: ensure we allocate ref ptrs before use
this fixes a crash on samba4.samr.python in the build farm
2010-08-26 22:50:20 +10:00
Stefan Metzmacher
a701484230 pidl:Samba3/ClientNDR: remove unused ParseOutputArgument function
metze
2010-08-26 13:29:21 +02:00
Andrew Tridgell
4f8087cdb9 s4-python: reference substructures onto the parent structure
when a python object that is part of a parent structure is created, we
should reference it on the parent structure. This ensures that when
the child object goes out of scope that the parent structure is still
valid
2010-08-25 23:05:05 +10:00
Andrew Tridgell
895064000d pidl-python: fixed the docstrings for ndr_print, ndr_pack and ndr_unpack 2010-08-23 15:55:38 +10:00
Andrew Tridgell
34b8615574 pidl: cope with bad type conversions in unions
This prevents a crash when converting bad types in NDR unions

Pair-Programmed-With: Jelmer Vernooij <jelmer@samba.org>
2010-08-22 14:57:34 +10:00
Andrew Tridgell
5a025c82f5 pidl: added a __ndr_print__() method on python NDR objects
This allows you to print a returned NDR structure using
s.__ndr_print__() which gives an easy view of complex
structures, such as those from netlogon
2010-08-22 14:57:34 +10:00
Volker Lendecke
b3f9345d76 Fix a typo 2010-08-16 21:14:25 +02:00
Stefan Metzmacher
b0b73ca041 pidl:Samba4/NDR/Client.pm: correctly copy fixed size out arrays
metze
2010-08-16 10:08:45 +02:00
Michael Adam
045f4c96d5 pidl: fix printing of server side ndr request debug messages
The macros NDR_PRINT_IN_DEBUG and NDR_PRINT_OUT_DEBUG are made for
the client side. For the server side, the NDR_SET_VALUES flag needs
to be added for the OUT struct and not for the IN struct, otherwise,
the OUT part can print uninitialized data and the IN part may
recalculate string lengths illegally.
2010-08-13 23:50:41 +02:00
Stefan Metzmacher
5130e664b9 pidl:Samba3/ClientNDR: implement rpccli_ stubs on top of dcerpc_ stubs
metze
2010-08-12 14:31:23 +02:00
Stefan Metzmacher
51fb4c3860 pidl:Samba4/NDR/Client: add sync dcerpc_pipe based stubs as compat for OpenChange
This will activate the compat wrappers for all functions of an interface:
 #define DCERPC_IFACE_MYPROTO_COMPAT 1
 #include <ndr_myproto_c.h>

This will activates the compat wrappers just for specific functions:
 #define DCERPC_CALL_MYFN1_COMPAT 1
 #define DCERPC_CALL_MYFN2_COMPAT 1
 #include <ndr_myproto_c.h>

metze
2010-08-12 14:31:20 +02:00
Stefan Metzmacher
719981adfd pidl:Samba4/NDR/Client: add non struct base dcerpc_binding_handle client stubs
metze
2010-08-12 14:31:20 +02:00
Stefan Metzmacher
62297dff8f pidl:Samba4/NDR/Client: convert code to $self->pidl()
metze
2010-08-12 14:31:19 +02:00
Stefan Metzmacher
570eefc57a pidl:Samba4/NDR/Client: s/interface/if/
metze
2010-08-12 14:31:19 +02:00
Stefan Metzmacher
76691e9eaf pidl:Samba4/NDR/Client: make use of the new dcerpc_binding_handle_call() infrastructure
metze
2010-08-12 14:31:18 +02:00
Stefan Metzmacher
db89fdac73 pidl:Samba4/NDR/Client: remove old dcerpc_pipe based sync stubs
They're unused in Samba and only used by OpenChange.
I'll add a compat functions for OpenChange later.

metze
2010-08-12 14:31:18 +02:00
Stefan Metzmacher
a2e1f54b3e pidl:Samba3/ClientNDR: ignore "todo" functions
metze
2010-08-12 14:31:16 +02:00
Stefan Metzmacher
a22989a54a pidl:NDR: correctly handle no pointer bracket arrays with 'string'
metze
2010-08-09 19:39:10 +02:00
Stefan Metzmacher
0a7f749bc8 pidl:NDR: correctly handle bracket arrays with 'string'
metze
2010-08-08 11:05:19 +02:00
Stefan Metzmacher
33d1879d5b pidl: Samba3/ClientNDR - Correctly copy arrays, if r.out.size < r.in.size.
metze

Signed-off-by: Andreas Schneider <asn@samba.org>
2010-08-06 14:20:08 +02:00
Andrew Tridgell
a41dffcb6a pidl: added a new type dnsp_name
This is a name type used in DNS where each DNS component maps to a
length byte followed by the string

We want these to map to a char *, which is why we need to do this in
PIDL
2010-08-05 17:31:29 +10:00