1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-18 17:57:55 +03:00

351 Commits

Author SHA1 Message Date
Stefan Metzmacher
ed4a3e53fd r12856: make the logic much more sane
metze
2007-10-10 13:50:54 -05:00
Stefan Metzmacher
ab58decf82 r12803: if we free the ndr structure how should we access the private pointer anymore?
thanks valgrind!

metze
2007-10-10 13:49:57 -05:00
Jelmer Vernooij
8e95aee6fb r12651: Remove STR_LARGE_SIZE as it's no longer used 2007-10-10 13:49:35 -05:00
Jelmer Vernooij
aa880bf196 r12650: Remove support for NULLTERM flag (is already covered by tridge's
fixes to [validate])
2007-10-10 13:49:34 -05:00
Andrew Tridgell
f2e68ec649 r12634: make the [validate] binding string switch also check to see if the
string form of the structure we receive matches the generated
form. This has the effect of checking things like value() attributes.
2007-10-10 13:49:10 -05:00
Jelmer Vernooij
70e7449318 r12608: Remove some unused #include lines. 2007-10-10 13:49:03 -05:00
Jelmer Vernooij
2e5a6eb219 r12558: Support [flag(NULLTERM)] on [charset()] arrays 2007-10-10 13:47:57 -05:00
Jelmer Vernooij
0aca5fd513 r12542: Move some more prototypes out to seperate headers 2007-10-10 13:47:55 -05:00
Jelmer Vernooij
8dcfcaf75a r12513: Similar change as my previous commit, but now for transfer syntaxes.
Avoids converting a static string to GUID every time we check whether
a transfer syntax is equal to that of NDR.
2007-10-10 13:47:49 -05:00
Andrew Tridgell
482548031e r12016: fixed a valgrind error 2007-10-10 13:47:00 -05:00
Stefan Metzmacher
247f90c28d r11973: make it easier to find bugs
metze
2007-10-10 13:46:53 -05:00
Stefan Metzmacher
66a94de5dd r11676: as tridge uses 0x%llx in his latest commits...
try to use it every where and see how portable it is

metze
2007-10-10 13:46:12 -05:00
Jelmer Vernooij
55805b5ed9 r11141: Re-add paranoid string terminator check 2007-10-10 13:44:54 -05:00
Jelmer Vernooij
407df9628e r11107: Include 0 byte 2007-10-10 13:44:50 -05:00
Jelmer Vernooij
7596c708ba r11105: Warn if conformant arrays are not at the end of a struct
Support conformant [string] arrays
Eliminate utf8string

This breaks xattr binary compatibility with previous versions - is that a
problem?
2007-10-10 13:44:50 -05:00
Stefan Metzmacher
27f8d82231 r10873: check the complete payload header
metze
2007-10-10 13:39:39 -05:00
Stefan Metzmacher
0a1e4498a3 r10872: fix the length of the dummy XPRESS decompressed buffer
metze
2007-10-10 13:39:38 -05:00
Stefan Metzmacher
694252b6e0 r10869: add dummy functions and dummy parsing of XPRESS decompression,
this is the compression algorithm used by w2k3 for DsGetNCChanges().

This algorithm isn't known yet, but it seems to be some sort of Lempel-Ziv
algorithm.

metze
2007-10-10 13:39:38 -05:00
Stefan Metzmacher
7efb92adc0 r10868: make flag(NDR_PAHEX) possible to use and show the union level in hex
metze
2007-10-10 13:39:38 -05:00
Stefan Metzmacher
afd9dda577 r10637: use the correct memory context in the ndr_pull_* function
to build the talloc hierachie correct

metze
2007-10-10 13:39:14 -05:00
Jelmer Vernooij
29919a7105 r10438: Move portability functions to lib/replace/; replace now simply ensures
that a given set of (working) POSIX functions are available (without
prefixes to their names, etc). See lib/replace/README for a list.

Functions that behave different from their POSIX specification
(such as sys_select, sys_read, etc) have kept the sys_ prefix.
2007-10-10 13:38:45 -05:00
Stefan Metzmacher
1083204c1f r10346: here are only real ip-addresses valid, prevent dns lookups,
when the input is invalid

metze
2007-10-10 13:38:30 -05:00
Stefan Metzmacher
a34d0771ce r10339: fix ndr_push_udlongr
metze
2007-10-10 13:38:29 -05:00
Stefan Metzmacher
b9ea3e8f9f r10141: if some of the LIBNDR_ALIGN_* flags and LIBNDR_FLAG_REMAINING are set,
ndr_pull_data_blob() doesn't work correct. so make them exclute each other.

jelmer, tridge: does that look correct? it fixes a problem, abartlet had
with krb5pac.idl, where the align flags are inherited from the parent, and we want to get the
[flag(NDR_REMAINING)] DATA_BLOB signature;

metze
2007-10-10 13:38:02 -05:00
Stefan Metzmacher
8eb75bd5ac r9795: fix the ndr_pull_string code to handle, some special cases,
where the idl was something like this:

uint32 size;
[size_is(size+1)] wchar_t *string;

we always need a pair of NDR_PULL_NEEDED_BYTES() and ndr_pull_advance(),
with the same size passed in.

metze
2007-10-10 13:35:02 -05:00
Stefan Metzmacher
a9a1a6f861 r9518: - remove the subcontext_size() hack from rev 9509
as it isn't needed
- parse some more DsAddEntry() errors
- add some more attid constands so that all attribute that are needed
  for a DsAddEntry in the DC Domain Join are mapped
- add value() for __ndr_size, to more attribute container, so that the caller
  doesn't need to fill them in, that was the reason for getting an NDR_FAULT

metze
2007-10-10 13:34:26 -05:00
Stefan Metzmacher
93065f2d34 r9509: start to fix the pushing of drsuapi_DsAttributeValueDNString structs,
this uses a trick with talloc_get_type() to workaround using [value()] vars
in [subcontext_size()]

metze
2007-10-10 13:34:24 -05:00
Jelmer Vernooij
a0e63c2691 r9441: Use "const char *" for fixed-size arrays with charset() because
these can require more elements in the local charset (usually UTF8) then
in the wire one.
2007-10-10 13:34:15 -05:00
Jelmer Vernooij
9be03c057e r9440: Fix bug introduced by new zero-padding code. Caught by the buildfarm. 2007-10-10 13:34:14 -05:00
Jelmer Vernooij
70b52e26f3 r9439: Make sure the remainder of the array is always initialized if the buffer is
larger then the string to be pushed.
2007-10-10 13:34:14 -05:00
Stefan Metzmacher
1a2b836958 r9373: - create a hierachical memory tree with recursiv ndr_pull_* functions
- with this it's also possible to talloc_free() the ndr_pull structure
  and talloc_steal(ndr->current_mem_ctx); to fetch the whole data of the hierachical tree
- if the toplevel struct is a valid talloc pointer it's also possible to use
  NDR_PULL_SET_MEM_CTX(ndr, mem_ctx); to the the toplevel pointer with the struct pointer

(NOTE: no callers are using this yet, but they shortly will)

metze
2007-10-10 13:33:29 -05:00
Stefan Metzmacher
09de7e0af7 r9372: - make the subcontext handling autogenerated code look nicer,
- unify the handling of subcontext, compression and obfucation

metze
2007-10-10 13:33:29 -05:00
Andrew Tridgell
56769b4b1d r9356: a better way of coping with NULL arrays in the array bounds checking. This copes with the
case of size_is(*size) where size is NULL, and the array is NULL
2007-10-10 13:33:27 -05:00
Andrew Tridgell
ad1b9867a5 r9347: this array bounds checking is harder than it looks ...
this copes with 2 more situations:

1) where the array is NULL, which would previously be coped with by a
   if (ptr) check, but now in the deferred array bounds checking needs
   to look at the array variable in the ndr code. Not nice.

2) nest the array checking along with the SCALARS vs BUFFERS checks, ensuring we don't
   do array bounds checking for a buffer when in scalars only mode
2007-10-10 13:33:27 -05:00
Andrew Tridgell
1ae255aba4 r9300: cope with zero length in ndr_pull_charset() 2007-10-10 13:33:22 -05:00
Andrew Tridgell
b9b8714297 r8707: this typedef isn't used, and breaks the build on HPUX, so I've removed it 2007-10-10 13:29:56 -05:00
Jelmer Vernooij
8637a85e6a r8614: Add COMRESULT/HRESULT scalar type 2007-10-10 13:29:44 -05:00
Jelmer Vernooij
cad40815dc r8612: Parse::Pidl::NDR:
Values that are deferred but don't contain deferred data don't
	need NDR_BUFFERS

Parse::Pidl::Samba::NDR::Parser:
	Only use manually written array access functions when the array
	functions are faster then the autogenerated ones. Makes ndr_basic.c
	a bit shorter.
2007-10-10 13:29:44 -05:00
Andrew Tridgell
d2c9285483 r8522: fixed another couple of size_t warnings 2007-10-10 13:29:34 -05:00
Andrew Tridgell
a58ea6b385 r8520: fixed a pile of warnings from the build farm gcc -Wall output on
S390. This is an attempt to avoid the panic we're seeing in the
automatic builds.

The main fixes are:

 - assumptions that sizeof(size_t) == sizeof(int), mostly in printf formats

 - use of NULL format statements to perform dn searches.

 - assumption that sizeof() returns an int
2007-10-10 13:29:34 -05:00
Andrew Tridgell
f93bd0ced6 r8519: better method of ensuring null termination 2007-10-10 13:29:34 -05:00
Andrew Tridgell
17decd1299 r8518: ensure all constructed NDR packets are null terminated. This is needed
by the new ldb code dealing with binary records, but is also a good
defensive strategy in general
2007-10-10 13:29:34 -05:00
Andrew Tridgell
22f7fd7634 r8500: greatly reduce the number of build warnings on x86-64 (every NDR macro
in the generated code from pidl generated a warning)
2007-10-10 13:23:10 -05:00
Andrew Tridgell
1536d66662 r8335: removed some duplicated code 2007-10-10 13:20:07 -05:00
Andrew Tridgell
aa0e1d6699 r8261: charset style strings in pidl should be const, just like old style ndr strings 2007-10-10 13:19:27 -05:00
Stefan Metzmacher
cdd03fe87d r8227: add STR_LARGE_SIZE flag, to support strings where the size is length+1,
metze
2007-10-10 13:19:22 -05:00
Stefan Metzmacher
d18303a0e2 r8212: fix pushing of nbt_string's:
- we now use an ndr_token_list, for the nbt string label pointer offsets
  this avoids to scan the whole buffer

- we need to check for already send string on a per component basis
  not only for the fullname

e.g.
w2k3 response this in the CLDAP netlogon replies

forest: w2k3.vmnet1.vm.base
dns_name: sub1.
pdc_dns_name: w2k3-104.

and this will be interpreted like

forest: w2k3.vmnet1.vm.base
dns_name: sub1.w2k3.vmnet1.vm.base
pdc_dns_name: w2k3-104.w2k3.vmnet1.vm.base

metze
2007-10-10 13:19:20 -05:00
Stefan Metzmacher
019f3dc767 r8210: - make the ndr_token_* function public
- allow comparison function to be passed for ndr_token_retrive_cmp_fn(),
  this is for matching the keys, if NULL is passed, the old behavior
  tok->key == key is used

metze
2007-10-10 13:19:20 -05:00
Stefan Metzmacher
d19068bfb2 r8167: - use the same algorithm than w2k3 for 'unique' pointer values
- add a new 'sptr' (simple-full) pointer type to simulate what we need to support pipes
  like epmapper and mgmt that uses 'ptr' full pointer in their spec

- I runned make test and test_w2k3.sh with this, all fine

does we have any other pipe using 'unique' pointer where we need 'ptr'?

btw: jelmer, what does 'ignore' pointers do? they are allowed in pidl but not implemented!

metze
2007-10-10 13:19:16 -05:00
Stefan Metzmacher
ccc9d9267a r8157: add the algorithm for unique pointers that w2k3 uses.
this is ifdef'ed out currently because we use 'unique' pointers in the epmapper pipe,
where we should use 'ptr' full pointers.

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