1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-31 01:48:16 +03:00

289 Commits

Author SHA1 Message Date
Jelmer Vernooij
dc6b4ffc82 r5672: Use switch_type() and the token storage mechanism for unions:
- Makes union handling less special
 - Allows unions in arrays, etc
 - Compatible with midl
 - Pidl will warn about switch_type() and the type of the switch_is() variable being different
2007-10-10 13:10:58 -05:00
Jelmer Vernooij
54e0be6f1e r5663: Revert some changes I didn't mean to commit... 2007-10-10 13:10:57 -05:00
Jelmer Vernooij
a416de5825 r5661: Be a little stricter on syntax regarding arrays. A pointer to an
array can now only be :

 type *name[];

rather then :

 type *name;

which was supported in the past. Warnings will be given when the first
syntax is used. Reasons for this change in behaviour include improved
readability and the fact that the second format makes dealing with multiple
levels of pointers harder.
2007-10-10 13:10:57 -05:00
Jelmer Vernooij
48d54a9b57 r5506: Simplify the use of subcontexts and make them a bit less a special case. 2007-10-10 13:10:52 -05:00
Stefan Metzmacher
2bb29cc68a r5504: fix typo
metze
2007-10-10 13:10:52 -05:00
Jelmer Vernooij
71fd3e5c3a r5490: The big (D)COM commit! :-) Contains most of the changes described in the
DCOM paper in lorikeet. This is the result of 1.5 months work (mainly
figuring out how things *really* work) at the end of 2004.

In general:
- Clearer distinction between COM and DCOM. DCOM is now merely
  the glue between DCE/RPC+ORPC and COM. COM can also work without
  DCOM now. This makes the code a lot clearer.
- Clearer distinction between NDR and DCOM. Before, NDR had a couple of
  "if"s to cope with DCOM, which are now gone.
- Use "real" arguments rather then structures for function arguments in
  COM, mainly because most of these calls are local so packing/unpacking
  data for every call is too much overhead (both speed- and code-wise)
- Support several mechanisms to load class objects:
  - from memory (e.g. part of the current executable, registered at start-up)
  - from shared object files
  - remotely
- Most things are now also named COM rather then DCOM because that's what it
  really is. After an object is created, it no longer matters whether it
  was created locally or remotely.

There is a very simple example class that contains
both a class factory and a class that implements the IStream interface.
It can be tested (locally only, remotely is broken at the moment)
by running the COM-SIMPLE smbtorture test.

Still to-do:
 - Autogenerate parts of the class implementation code (using the coclass definitions in IDL)
 - Test server-side
 - Implement some of the common classes, add definitions for common interfaces.
2007-10-10 13:10:50 -05:00
Stefan Metzmacher
bfcc86e706 r5489: hide handwritten pull/push/print code from the caller
for the spoolss_Enum* functions

metze
2007-10-10 13:10:50 -05:00
Jelmer Vernooij
f298f2a547 r5487: - Allow disabling modules
- Disable all current DCOM functionality (I hope to commit
	a large bunch of COM and DCOM changes later today)
- Make remact and oxidresolver depend on orpc rather then dcom
2007-10-10 13:10:50 -05:00
Stefan Metzmacher
0aea8522d7 r5446: fix pulling of arrays in EnumXXX functions
metze
2007-10-10 13:10:46 -05:00
Jelmer Vernooij
fa97059d00 r5427: NTSTATUS is treated by pidl as a 'real' scalar now. 2007-10-10 13:10:45 -05:00
Andrew Tridgell
bc8d60c918 r5414: - added libcli/wins/, a basic client library for WINS replication
- added a new IDL type "udlongr", which is like udlong, but with the
  two uint32 halves reversed

- modified the winsrepl.idl to cope with a wider range of packets
2007-10-10 13:10:43 -05:00
Jelmer Vernooij
efc2e41b8d r5376: ORPC is NDR specific, so move it to ndr.pm.
Get rid of register_enum/register_bitmap, etc. (use list of
types in ndr.pm instead)
2007-10-10 13:09:48 -05:00
Jelmer Vernooij
53b4ecbcc7 r5363: - ndr_%_ptr -> ndr_%_unique_ptr
- ndr_%_relative% -> ndr_%_relative_ptr%
- Change pointer_default() default to "unique"
  (DCE uses "ptr" as default, MIDL doesn't follow the standard and uses "unique")
2007-10-10 13:09:46 -05:00
Jelmer Vernooij
c9d7b88756 r5361: Rename some functions, add tests to validator. 2007-10-10 13:09:46 -05:00
Jelmer Vernooij
d8a0a69721 r5360: Remove a couple of unused functions. 2007-10-10 13:09:45 -05:00
Jelmer Vernooij
ab490c0c88 r5286: Some first steps in making the pidl code somewhat more generic for the
various data types:

Add ndr_flags argument to all ndr push/pull scalar functions
2007-10-10 13:09:36 -05:00
Andrew Tridgell
72048e3717 r5155: define ipv4address as a based IDL type, mapped to a "const char *" in
the header, and defined on the wire as a 4 byte network byte order
IP. This means the calling code doesn't have to worry about network
byte order conversions.
2007-10-10 13:09:28 -05:00
Stefan Metzmacher
abacbc9192 r5145: define struct ipv4_addr in misc.idl,
so we can use it in nbt.idl and
get a nicer debug output

metze
2007-10-10 13:09:27 -05:00
Stefan Metzmacher
8507a57b88 r5139: fix types
metze
2007-10-10 13:09:26 -05:00
Andrew Tridgell
2dd7ccf724 r5118: added support for node status replies in nbtd. nmblookup -S now works against Samba4.
Also added support for the '*' wildcard name
2007-10-10 13:09:24 -05:00
Andrew Tridgell
5707ebc9ec r5109: - fixed handling of zero-length subcontexts in the ndr library
- added error checking on socket startup in nbtd
2007-10-10 13:09:23 -05:00
Andrew Tridgell
61c43509f7 r5084: - handle arbitrary data in the NULL record reply type for nbt name queries
- fixed unaligned pulls at the end of the packet in the ndr lib
2007-10-10 13:09:20 -05:00
Andrew Tridgell
ec32b22ed5 r5037: got rid of all of the TALLOC_DEPRECATED stuff. My apologies for the
large commit. I thought this was worthwhile to get done for
consistency.
2007-10-10 13:09:15 -05:00
Andrew Tridgell
1d1a9c11ee r5036: changed HYPER_T to the more standard "hyper" 2007-10-10 13:09:15 -05:00
Andrew Tridgell
f86521677d r5034: - added a type mapping function in pidl, so the type names in our IDL
files don't need to match the type names in the generated headers

- with this type mapping we no longer need definitions for the
  deprecated "int32", "uint8" etc form of types. We can now force
  everyone to use the standard types int32_t, uint8_t etc.

- fixed all the code that used the deprecated types

- converted the IDL types "int64" and "uint64" to "dlong" and
  "udlong". These are the 4 byte aligned 64 bit integers that
  Microsoft internally define as two 32 bit integers in a
  structure. After discussions with Ronnie Sahlberg we decided that
  calling these "int64" was confusing, as it implied a true 8 byte
  aligned type

- fixed all the cases where we incorrectly used things like
  "NTTIME_hyper" in our C code. The generated API now uses a NTTIME for
  those. The fact that it is hyper-aligned on the wire is not relevant
  to the API, and should remain just a IDL property
2007-10-10 13:09:15 -05:00
Andrew Tridgell
ae7e625bfa r4885: added a new NBT client library. Features include:
- structures defined using IDL in nbt.idl
 - build around our events structure, and talloc
 - fully async
 - supports all NBT packet fields as per rfc1002
 - easy interfaces for name query and status

For the moment there are just a couple of test functions in
namequery.c, test_name_query() and test_name_status(). These will be
removed when we hook the new library into libcli/ fully

The new library will also be a fairly good basis for a nbt
server. Although it can't be a server as-is, I wrote it with the needs
of a server in mind (for example, extremely scalable idtree based
packet handling)
2007-10-10 13:09:01 -05:00
Andrew Tridgell
0d31523aae r4772: fixed checking of the conformant size for dom_sid2 2007-10-10 13:08:53 -05:00
Stefan Metzmacher
0d2286ba56 r4676: NTTIME_1sec is a standard NTTIME for the calling code
as it's already converted in the pull/push code

metze
2007-10-10 13:08:41 -05:00
Andrew Bartlett
1fed79cb0f r4673: Fix the IDL for the QuerySecret LSA call.
This call uses a new IDL type, NTTIME_hyper.  This is 8-byte aligned,
as the name suggests.

Expand the QuerySecret LSA calls in RPC-SAMLOGON and RPC-LSA, to
validate the behaviour of times, and of the old secrets.

Thanks to tridge for spotting the use of HYPER!

Andrew Bartlett
2007-10-10 13:08:40 -05:00
Andrew Tridgell
6e7754abd0 r4591: - converted the other _p talloc functions to not need _p
- added #if TALLOC_DEPRECATED around the _p functions

- fixes the code that broke from the above

while doing this I fixed quite a number of places that were
incorrectly using the non type-safe talloc functions to use the type
safe ones. Some were even doing multiplies for array allocation, which
is potentially unsafe.
2007-10-10 13:08:30 -05:00
Stefan Metzmacher
c3b2d2cca3 r4557: support for [flags()] on typedef enum|bitmap
NDR_PAHEX is handled by ndr_print_enum() now

metze
2007-10-10 13:08:27 -05:00
Andrew Tridgell
2011bbeb84 r4550: talloc() is now typesafe. It is exactly equivalent to the old talloc_p() macro. Use
talloc_size() if you want the old behaviour.

I have kept talloc_p() as an alias for now. Once we change all calls
to be plain talloc() then we can remove it.
2007-10-10 13:08:26 -05:00
Andrew Tridgell
89b74b5354 r4549: got rid of a lot more uses of plain talloc(), instead using
talloc_size() or talloc_array_p() where appropriate.

also fixed a memory leak in pvfs_copy_file() (failed to free a memory
context)
2007-10-10 13:08:25 -05:00
Stefan Metzmacher
052a7d4f9a r4535: add full support for
typedef bitmap {
    FLAG1 = 0x01
} fooflags;

typedef struct {
    fooflags flags;
}

metze
2007-10-10 13:08:19 -05:00
Andrew Tridgell
1a24a50384 r4526: - much simpler (and more accurate!) ndr_size_*() code generation. It
is less efficient, but I really doubt that matters.

- use enum in epmapper.idl for protocol type

- added support for "enum8bit" flag, used in epmapper.idl
2007-10-10 13:08:18 -05:00
Andrew Tridgell
29955004aa r4519: added the enum print function in ndr_basic.c 2007-10-10 13:08:17 -05:00
Andrew Tridgell
3040cd6515 r4139: 2nd attempt at fixing the null ptr in size_is() problem. 2007-10-10 13:06:30 -05:00
Andrew Tridgell
e839b19ec5 r4110: fixed pidl to allow arrays to have size_is() and length_is() elements
that depend on variables that come after the array in the structure or function.

This has been something that has been problematic for a while, but the
winreg QueryValue problem finally prompted me to fix it properly. We
should now go back and fix up all the ugly workarounds we have used to
avoid this problem in other calls.

Unfortunately the solution is fairly complex, and involves the use of
the internal ndr token lists (similar to the solution for relative
pointers). I wonder if anyone else will be able to follow the logic if
I get run over by a bus :-)
2007-10-10 13:06:27 -05:00
Stefan Metzmacher
717454eb2f r4102: more uint64 vs HYPER_T fixes
NOTE:
 [u]int64 uses 4 Byte alignment
 and HYPER_T uses 8 Byte alignment

metze
2007-10-10 13:06:26 -05:00
Andrew Tridgell
c4c83f04f5 r4098: catch null guid string so RPC-DRSUAPI works against my server 2007-10-10 13:06:26 -05:00
Andrew Tridgell
80d15fa340 r4052: fixed a bunch of code to use the type safe _p allocation macros 2007-10-10 13:06:18 -05:00
Andrew Tridgell
90cdfd921e r4051: use talloc_array() instead of talloc() when allocating arrays in auto-generated ndr code 2007-10-10 13:06:18 -05:00
Stefan Metzmacher
623411f74e r3997: fix STR_CHARLEN pull case
metze
2007-10-10 13:06:12 -05:00
Stefan Metzmacher
56c66f4a09 r3984: success full parse the repsFrom/repsTo LDAP fields
metze
2007-10-10 13:06:11 -05:00
Stefan Metzmacher
523e6acf4f r3972: use GUID_* naming context and move GUID_* functions to one place
metze
2007-10-10 13:06:09 -05:00
Stefan Metzmacher
44f168c44d r3956: start to decode the repsFrom and repsTo fileds but not ready
metze
2007-10-10 13:06:07 -05:00
Stefan Metzmacher
db35f3b0f9 r3869: in the NDR encoded replPropertyMetaData attribute in ADS
I see a new 64 bit time field which are seconds since 1601,

this will be mapped to NTTIME by th eparsing code

+#define NTTIME_1sec NTTIME

metze
2007-10-10 13:05:59 -05:00
Jelmer Vernooij
a00bda88e1 r3861: - Put ndr and rpc client code in seperate files
- Add some const
2007-10-10 13:05:58 -05:00
Andrew Tridgell
f68a6b6b91 r3830: unified the query/set security descriptor code with the rest of the
queryfileinfo/setfileinfo logic, so querying/setting a security
descriptor is treated as just another file query/set operation.

This will allow NTVFS backends to see the query/set security
descriptor operations as RAW_FILEINFO_SEC_DESC and
RAW_SFILEINFO_SEC_DESC operations.
2007-10-10 13:05:57 -05:00
Stefan Metzmacher
b620bdd672 r3810: create a LIB_SECURITY subsystem
- move dom_sid, security_descriptor, security_* funtions to one place
  and rename some of them

metze
2007-10-10 13:05:56 -05:00