1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-10 01:18:15 +03:00
Commit Graph

1379 Commits

Author SHA1 Message Date
Andrew Bartlett
d0375cfd43 r11438: Move enum samr_RejectReason into misc.idl so I can use it in a global
prototype.

Andrew Bartlett
(This used to be commit a3abffc758)
2007-10-10 13:45:37 -05:00
Andrew Bartlett
56b4e4b62c r11402: In response to comments by volker, expand our Netlogon DsRGetDCName
IDL and testsuites.  The server-side of this remains a stub, we should
probably be doing ldb searches for the server reference record.

Andrew Bartlett
(This used to be commit 0141ed309a)
2007-10-10 13:45:31 -05:00
Jelmer Vernooij
93fd08168f r11377: Add support for building LIBRARY elements as shared libraries:
- Adds -rpath bin/ so you don't have to install Samba in order to use compiled binaries.
 - Writes out pkg-config files when building shared libs
 - Supports automatic fallback to MERGEDOBJ (which is the default) or
   OBJ_LIST (if ld -r is not supported)

Building with shared libs reduces the size of the Samba binaries from
197 Mb to 60 Mb (including libraries) on my system (GCC4, with debugging).

To build with shared libraries support enabled, run:

LIBRARY_OUTPUT_TYPE=SHARED_LIBRARY ./config.status

init functions don't get called correctly yet when using shared libs, so
you won't be able to actually run anything with success :-)

Once init functions are done, I'll look at support for loading shared
modules once again.

Based on a patch by Peter Novodvorsky (nidd on IRC).
(This used to be commit 0b54405685)
2007-10-10 13:45:28 -05:00
Andrew Bartlett
4378c3c9cc r11373: Handle an apparent alias in NBT ntlogin replies.
Andrew Bartlett
(This used to be commit 51d55d2211)
2007-10-10 13:45:28 -05:00
Tim Potter
b0dd4140c5 r11362: Remove attempt to decode uint8 array as a security descriptor. Pidl thinks
that because it is an array, the import should also be an array, i.e of
security descriptors.
(This used to be commit fb313c19c6)
2007-10-10 13:45:25 -05:00
Andrew Bartlett
56576de528 r11352: Add newly discovered (via the radiator lists) flags for controlling
plaintext and machine account logins.

Update tests to confirm this behaviour.

Andrew Bartlett
(This used to be commit a0ed41d379)
2007-10-10 13:45:22 -05:00
Tim Potter
1fb7a5348b r11318: Tweak import statement for decoding KeySecurityData as a NT security
descriptor in ethereal.
(This used to be commit 5af1b6df0a)
2007-10-10 13:45:19 -05:00
Jelmer Vernooij
8ee1ee66ed r11303: Support defining and installing public headers for libraries.
Support installing libraries.
Get rid of pkg-config file (will be autogenerated later on).
(This used to be commit b4745032a2)
2007-10-10 13:45:16 -05:00
Andrew Bartlett
c6f8330098 r11288: Fill out LSA LookupNames4 and LookupSids3, including a server-side
implementation.

Andrew Bartlett
(This used to be commit a6a615cc99)
2007-10-10 13:45:14 -05:00
Tim Potter
79b667eda9 r11262: Try to get the equivalent of a subcontext in pidl ethereal conformance
files working.  It doesn't quite work though.  (-:

This patch also allows a struct.field format to be used in an IMPORT
statement instead of a type name.

Jelmer, what do you think?
(This used to be commit d770f85347)
2007-10-10 13:45:10 -05:00
Tim Potter
9759d435ca r11261: Rename access_required field in winreg idl to access_mask so it matches
the other interfaces.
(This used to be commit 8eb582b578)
2007-10-10 13:45:09 -05:00
Tim Potter
a1444159a9 r11260: Delete a leftover scons file.
(This used to be commit 7b750a785b)
2007-10-10 13:45:09 -05:00
Tim Potter
f501b04a6c r11259: Map system_name and handle fields to new hf fields.
(This used to be commit 9be707bc4d)
2007-10-10 13:45:09 -05:00
Tim Potter
da55f56b8c r11258: Dissect all access_required fields as hex using the same hf.
(This used to be commit 4365462dc6)
2007-10-10 13:45:09 -05:00
Jelmer Vernooij
4c5a4a7e02 r11244: Relative path names in .mk files
(This used to be commit 24e1030090)
2007-10-10 13:45:06 -05:00
Jelmer Vernooij
568dd26ac7 r11243: length and size can now be filled in automatically.
(This used to be commit 99444c129d)
2007-10-10 13:45:06 -05:00
Stefan Metzmacher
c1113796eb r11187: in case the msDS-KeyVersionNumber is replicated (I didn't assume this...)
show the string in the debug output, and show it with
--option="dssync:print_pwd_blobs=yes"

metze
(This used to be commit 98c1e8e3df)
2007-10-10 13:44:58 -05:00
Stefan Metzmacher
b47e656927 r11185: - resolve attid for "supplementalCredentials" into a name
- print "supplementalCredentials" also when --option="dssync:print_pwd_blobs=yes"
  is used

abartlet: this field may contain the krb5 keys...

metze
(This used to be commit 26c69348ca)
2007-10-10 13:44:57 -05:00
Stefan Metzmacher
ba97ac6b96 r11179: revert to the old code, till jelmer find a solution how to
handle a UTF16 string in a uint8 array

metze
(This used to be commit d13315f3b1)
2007-10-10 13:44:56 -05:00
Jelmer Vernooij
087dd76232 r11141: Re-add paranoid string terminator check
(This used to be commit 55805b5ed9)
2007-10-10 13:44:54 -05:00
Jelmer Vernooij
31ffec1d41 r11107: Include 0 byte
(This used to be commit 407df9628e)
2007-10-10 13:44:50 -05:00
Jelmer Vernooij
f598135c6b 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?
(This used to be commit 7596c708ba)
2007-10-10 13:44:50 -05:00
Jelmer Vernooij
dc36f29476 r11104: Fix LOCAL-PAC test
(This used to be commit 22d0e4a9bf)
2007-10-10 13:44:50 -05:00
Jelmer Vernooij
ec6973747a r11103: Eliminate ascstr
(This used to be commit c8a0511f37)
2007-10-10 13:44:50 -05:00
Jelmer Vernooij
3f3388a564 r11102: Remove unistr_noterm
(This used to be commit bb1ed44f45)
2007-10-10 13:44:49 -05:00
Jelmer Vernooij
9fe24f4e9c r11101: Remove last instances of unistr
(This used to be commit 7e057e6bda)
2007-10-10 13:44:49 -05:00
Jelmer Vernooij
98800eb41e r11100: Replace unistr with [string,charset(UTF16)]
(This used to be commit 48f45927ce)
2007-10-10 13:44:49 -05:00
Jelmer Vernooij
8d036f304e r11099: Replace unistr with [string] equivalent
(This used to be commit 6a8291c80e)
2007-10-10 13:44:49 -05:00
Jelmer Vernooij
a0f6e35c1f r11098: Replace string with [string]
(This used to be commit 1ac8c96349)
2007-10-10 13:44:49 -05:00
Jelmer Vernooij
68d82998d2 r11096: Eliminate pointer_default_top()
(This used to be commit b773d848e8)
2007-10-10 13:44:48 -05:00
Stefan Metzmacher
cffd522b5c r11052: bring samba4 uptodate with the samba4-winsrepl branch,
before the bad merge

metze
(This used to be commit 471c0ca4ab)
2007-10-10 13:44:43 -05:00
Stefan Metzmacher
2ecb46d595 r11037:
(This used to be commit 6913e33840)
2007-10-10 13:42:33 -05:00
Stefan Metzmacher
fccbbf3546 r10997: r11980@SERNOX (orig r10037): metze | 2005-09-05 14:21:40 +0200
add struct nbt_peer_socket and use it instead of passing const char *addr, uint16 port everyhwere

 (tridge: can you review this please, (make test works)

 metze
(This used to be commit a599d7a4ae)
2007-10-10 13:39:52 -05:00
Stefan Metzmacher
2b14137167 r10984: fix valgrind warnings, I had used that to check if w2k3 accept random values here,
as w2k generates also random stuff here

metze
(This used to be commit e04c78e4e9)
2007-10-10 13:39:50 -05:00
Stefan Metzmacher
3dfe8c22b8 r10873: check the complete payload header
metze
(This used to be commit 27f8d82231)
2007-10-10 13:39:39 -05:00
Stefan Metzmacher
b2490bb98d r10872: fix the length of the dummy XPRESS decompressed buffer
metze
(This used to be commit 0a1e4498a3)
2007-10-10 13:39:38 -05:00
Stefan Metzmacher
2f115473bf r10870: decompress DsGetNCChangesCtr7 replies, that uses type 2 (MSZIP)
compression

metze
(This used to be commit b451137526)
2007-10-10 13:39:38 -05:00
Stefan Metzmacher
0e65d30bb7 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
(This used to be commit 694252b6e0)
2007-10-10 13:39:38 -05:00
Stefan Metzmacher
b94fcbd306 r10868: make flag(NDR_PAHEX) possible to use and show the union level in hex
metze
(This used to be commit 7efb92adc0)
2007-10-10 13:39:38 -05:00
Jelmer Vernooij
c7ace9b8ea r10839: Add some [ref] (required for ethereal and Samba3 parser generators)
(This used to be commit 5556deee30)
2007-10-10 13:39:34 -05:00
Andrew Tridgell
3a7e251f27 r10705: fixed a crash bug in the getdcname irpc server for winbind. The
problem was that the return string was declared as:

	[out] astring dcname

which means "this is a non-NULL string". The server code sometimes
returned NULL however (on getdc lookup failure), which caused the NDR
marshalling code to crash. When you declare a non-pointer return value
you are promising that the value can never be NULL.

The trivial fix is to use:

	[out] astring *dcname

which leaves the API alone, but includes a pointer in the wire format,
which in turn means it is valid to send a NULL string as a response.
(This used to be commit e39bac6196)
2007-10-10 13:39:22 -05:00
Andrew Tridgell
a872005c1c r10699: fixed the dcerpc code so that you can shutdown the pipe safely from
within a callback on the pipe. This should fix a problem volker
encountered with winbind. The fix invoolves making the recv_data
handler free the memory for a packet, instead of having the transport
layer free it after calling recv_data. When the transport layer freed
it, it had no way of knowing if the callback had shutdown the pipe, so
it had no way of knowing if it could safely use the pointer.

Also changed the pipe shutdown hook for the smb transport to use an
async SMB close. This ensures that when you shutdown the pipe, you
don't block waiting for the server to ack the close of the pipe fnum.
(This used to be commit c87d7f580e)
2007-10-10 13:39:21 -05:00
Volker Lendecke
e5c6a3e361 r10683: Samba3's wbinfo -t should give the correct answer now.
Tridge, if you have time, you might want to look at the segfault I was still
seeing. Now I store the handle to the netlogon pipe in the global winbind
state and free it on the next entry into check_machacc. The problem seems to
be that talloc_free()ing a pipe struct from within a callback function on that
pipe is not possible. I think I can live with that, but it has been not really
obvious. To reproduce the segfault you might want to look at putting a
talloc_free(state->getcreds->out.netlogon) into
wbsrv_samba3_check_machacc_receive_creds. This is called from a dcerpc
callback function.

In particular if the check failed it would be nice if I could delete the pipe
directly and not post a different event to some winbind queue.

I tried to delete the pipe from a timed event triggered immediately, but this
also fails because the inner loop seems to hit the same event again, calling
it twice.

Volker
(This used to be commit 5436d77648)
2007-10-10 13:39:18 -05:00
Volker Lendecke
aea73c168b r10681: Convert dcerpc_open_smb to a composite function.
Volker
(This used to be commit 42ff218ac9)
2007-10-10 13:39:18 -05:00
Stefan Metzmacher
7368af9e74 r10653: give unknown levels a name basicly the *2 levels mean
that the update or inform should be propagaded to all servers

metze
(This used to be commit 33c7c101c0)
2007-10-10 13:39:15 -05:00
Stefan Metzmacher
f1c5227078 r10637: use the correct memory context in the ndr_pull_* function
to build the talloc hierachie correct

metze
(This used to be commit afd9dda577)
2007-10-10 13:39:14 -05:00
Stefan Metzmacher
c2d7914428 r10627: - use a wrepl specific enum for the node type
- the unknown flag 0x10 seems to mean that this name was localy registered on this
  currently asked server, that flag is not present in replica records

metze
(This used to be commit ba3685c41d)
2007-10-10 13:39:13 -05:00
Stefan Metzmacher
c91fa5c504 r10610: forgot one file in the last commit:
make wrepl_nbt_name a scalar type that is another
wire representation of struct nbt_name

give wrepl_name->flags a meaning

metze
(This used to be commit 5fa13d6c2b)
2007-10-10 13:39:12 -05:00
Jelmer Vernooij
5058f4b9e8 r10586: Add MergedObject() builder. Default to Library() rather
then StaticLibrary()
(This used to be commit b53313dc51)
2007-10-10 13:39:08 -05:00
Volker Lendecke
9593101ec1 r10491: First step towards wbinfo -t: This issues a name request for the primary
domain and gets the DC's name via a mailslot call.

Metze, I renamed wbsrv_queue_reply to wbsrv_send_reply in accordance with
irpc_send_reply. Having _queue_ here and _send_ there is a bit confusing. And
as everything is async anyway, the semantics should not be too much of a
problem.

Volker
(This used to be commit 4637964b19)
2007-10-10 13:38:54 -05:00
Jelmer Vernooij
3d4ea18d4d r10478: More work on proto headers; we now generate a couple of smaller ones
that are then included by include/proto.h
(This used to be commit 703ffbaaac)
2007-10-10 13:38:52 -05:00
Jelmer Vernooij
b85f7857dc r10452: Couple of small scons updates - ignore .sconsign files
(This used to be commit b2d2b4f233)
2007-10-10 13:38:47 -05:00
Tim Potter
88b74af1d8 r10446: Add ndr_base and rpc_base sources to proto.h
Generate NDR mashalling code for all idl files (why isn't this automatically by the scanner when it finds librpc/gen_ndr/{misc,dcerpc,orpc}.h in includes.h?)
(This used to be commit 01eb22b9da)
2007-10-10 13:38:46 -05:00
Tim Potter
c715f7256a r10442: Build librpc/libndr_misc.a from librpc/idl/misc.idl. Doesn't quite work
yet as scons somehow thinks it needs to put a directory called ndr_idl
in the command line.
(This used to be commit e4a54a4c49)
2007-10-10 13:38:46 -05:00
Jelmer Vernooij
f3b412fbd6 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.
(This used to be commit 29919a7105)
2007-10-10 13:38:45 -05:00
Andrew Bartlett
51cbc188df r10402: Make the RPC-SAMLOGON test pass against Win2k3 SP0 again.
I still have issues with Win2k3 SP1, and Samba4 doesn't pass it's own
test for the moment, but I'm working on these issues :-)

This required a change to the credentials API, so that the special
case for NTLM logins using a principal was indeed handled as a
special, not general case.

Also don't set the realm from a ccache, as then it overrides --option=realm=.

Andrew Bartlett
(This used to be commit 194e8f07c0)
2007-10-10 13:38:39 -05:00
Tim Potter
d191c7d993 r10377: Save configuration stuff to sconf.cache so it isn't annoyingly run
at every single build.  Run 'scons configure=1' or delete sconf.cache
to force checks to be re-run.

Jelmer, I think this stuff is cached in the .sconf_cache directory but
the message is still displayed and it looks like it caches the compiled
test object file not the actual result of the test.
(This used to be commit 9d001dc083)
2007-10-10 13:38:33 -05:00
Andrew Tridgell
b963050769 r10368: when building the epm tower, don't put host names in the ip address
field, instead put a zero address. Note that zero is correct (ie. we
shouldn't do the lookup) as in the client we want to send a zero for
the server to fill in. When we make this call from the server we fill
in a real IP.
(This used to be commit e54c8b5658)
2007-10-10 13:38:32 -05:00
Jelmer Vernooij
6812c73534 r10348: Add scons scripts for remaining subsystems. Most subsystems build now,
but final linking still fails (as does generating files asn1, et, idl and proto
files)
(This used to be commit 4f0d7f75b9)
2007-10-10 13:38:30 -05:00
Stefan Metzmacher
b7545608ad r10346: here are only real ip-addresses valid, prevent dns lookups,
when the input is invalid

metze
(This used to be commit 1083204c1f)
2007-10-10 13:38:30 -05:00
Stefan Metzmacher
efa30b073f r10339: fix ndr_push_udlongr
metze
(This used to be commit a34d0771ce)
2007-10-10 13:38:29 -05:00
Jelmer Vernooij
5b02ee9b9d r10336: Add sconscript for a couple more subsystems.
(This used to be commit 59d4450453)
2007-10-10 13:38:29 -05:00
Tim Potter
a9e08ba474 r10238: Add a entry for sec_info to treat it as a uint32 for now.
(This used to be commit 8a0a8d259d)
2007-10-10 13:38:10 -05:00
Tim Potter
74eea860ba r10184: Fix a stack of unhandled enumeration warnings.
(This used to be commit aeb42a446b)
2007-10-10 13:38:06 -05:00
Jelmer Vernooij
e841621c0b r10181: Fix the build
(This used to be commit 231d01a3e7)
2007-10-10 13:38:06 -05:00
Andrew Bartlett
ce7166752c r10171: This seems to work for encoding/decoding a PAC at the buffers only
level (required for signature verification).

Andrew Bartlett
(This used to be commit 76c224f288)
2007-10-10 13:38:05 -05:00
Andrew Bartlett
5edbeca141 r10153: This patch adds a new parameter to gensec_sig_size(), the size of the
data to be signed/sealed.  We can use this to split the data from the
signature portion of the resultant wrapped packet.

This required merging the gsskrb5_wrap_size patch from
lorikeet-heimdal, and fixes AES encrption issues on DCE/RPC (we no
longer use a static 45 byte value).

This fixes one of the krb5 issues in my list.

Andrew Bartlett
(This used to be commit e4f2afc343)
2007-10-10 13:38:04 -05:00
Andrew Bartlett
1757f8355c r10145: Allow a variable length signature, so we can support signing with
other than arcfour-hmac-md5.  Currently we still fail to verify other
signatures however.

Andrew Bartlett
(This used to be commit 2e5884fc24)
2007-10-10 13:38:03 -05:00
Stefan Metzmacher
0559bae277 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
(This used to be commit b9ea3e8f9f)
2007-10-10 13:38:02 -05:00
Stefan Metzmacher
9cd63ddb5d r10129: fix sinple ip's in wins replication, packets
metze
(This used to be commit 7492afa48d)
2007-10-10 13:38:01 -05:00
Stefan Metzmacher
9ad5c988a4 r10126: WREPL_REPL_UPDATE also takes a wrepl_table
metze
(This used to be commit b897ad39bb)
2007-10-10 13:38:01 -05:00
Stefan Metzmacher
eaa64265f9 r10085: decode level 5 and 9 too
(this is taken from the ethereal dissector)

metze
(This used to be commit c50f5fe33b)
2007-10-10 13:37:51 -05:00
Tim Potter
622b75f4dc r10048: Dissect a security_secinfo as a uint32 just to get the winreg
dissector compiling and linking.  It's really an enum defined in
security.idl.
(This used to be commit b62811afcb)
2007-10-10 13:36:33 -05:00
Tim Potter
10a160ac2d r10046: Don't generate any ethereal dissectors for security.idl
(This used to be commit 5b8b956887)
2007-10-10 13:36:33 -05:00
Günther Deschner
ad44611170 r9888: add IDL for lsa_QueryDomainInformationPolicy to query Kerberos Settings.
Guenther
(This used to be commit d717e878bd)
2007-10-10 13:36:20 -05:00
Stefan Metzmacher
f3c121eb74 r9797: - let us parse replication packets with linked attributes fine,
- also resolve the 0x1f ('member') attid for nicer debugging

metze
(This used to be commit f6cf38d608)
2007-10-10 13:35:02 -05:00
Stefan Metzmacher
172089214e 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
(This used to be commit 8eb75bd5ac)
2007-10-10 13:35:02 -05:00
Andrew Bartlett
24186a80eb r9728: A *major* update to the credentials system, to incorporate the
Kerberos CCACHE into the system.

This again allows the use of the system ccache when no username is
specified, and brings more code in common between gensec_krb5 and
gensec_gssapi.

It also has a side-effect that may (or may not) be expected: If there
is a ccache, even if it is not used (perhaps the remote server didn't
want kerberos), it will change the default username.

Andrew Bartlett
(This used to be commit 6202267f6e)
2007-10-10 13:34:54 -05:00
Tim Potter
43fbeed881 r9577: Fix some indentation.
(This used to be commit 2759c91b81)
2007-10-10 13:34:31 -05:00
Jelmer Vernooij
b42f358d51 r9576: Couple of small fixes. Generate notice indicating
that the parsers were autogenerated.
(This used to be commit a37e2134e6)
2007-10-10 13:34:30 -05:00
Andrew Tridgell
3eb52c6cd6 r9574: - made the sec_info fields in lsa and samr use a IDL bitmap
- fixed winreg_GetKeySecurity() to use a sec_info field correctly

- simplied the winreg torture code, removing the separate opens for
  each hive

- added torture cleanup code in winreg test

- added 'create with security descriptor' in the winreg torture test
(This used to be commit f20695decd)
2007-10-10 13:34:30 -05:00
Andrew Tridgell
649882d8d5 r9567: fixed the winreg IDL for CreateKey, including a security
descriptor. To keep it simple I just use normal IDL buffers for now,
avoiding the complex methods metze used in spoolss. We might change
that later

Also added decoding of the security_descriptor in
winreg_GetKeySecurity() in smbtorture
(This used to be commit 439f34a962)
2007-10-10 13:34:29 -05:00
Tim Potter
2867f7869d r9550: Adjust some indentation.
(This used to be commit 781df1691c)
2007-10-10 13:34:27 -05:00
Stefan Metzmacher
8569e18c95 r9527: add the magic Bind GUID's, that are needed to fetch the whole
tree with DsGeNCChanges(), this is possible as administrator
without having a DC account joined to the domain

metze
(This used to be commit e6f92444d2)
2007-10-10 13:34:26 -05:00
Jelmer Vernooij
ae88822b8c r9519: Use the value() value of an element when that element is used in
limited expressions (size_is,length_is,subcontext_size,etc)
(This used to be commit 886780c298)
2007-10-10 13:34:26 -05:00
Stefan Metzmacher
8385973935 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
(This used to be commit a9a1a6f861)
2007-10-10 13:34:26 -05:00
Stefan Metzmacher
51c10eba0d r9513: - let us parse some more replies of DsAddEntry
- give some stuff a meening

metze
(This used to be commit 6d9b8d3008)
2007-10-10 13:34:25 -05:00
Stefan Metzmacher
54a703d433 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
(This used to be commit 93065f2d34)
2007-10-10 13:34:24 -05:00
Andrew Bartlett
ba90b652d9 r9505: Work on GENSEC and the code that calls it, for tighter interface
requirements, and for better error reporting.

In particular, the composite session setup (extended security/SPNEGO)
code now returns errors, rather than NT_STATUS_NO_MEMORY.  This is
seen particularly when GENSEC fails to start.

The tighter interface rules apply to NTLMSSP, which must be called
exactly the right number of times.  This is to match some of our other
less-tested modules, where adding flexablity is harder.  (and this is
security code, so let's just get it right).  As such, the DCE/RPC and
LDAP clients have been updated.

Andrew Bartlett
(This used to be commit 134550cf75)
2007-10-10 13:34:24 -05:00
Andrew Tridgell
7927513fef r9495: - added an enum for winreg key types, making it easier to read the debug logs
- got rid of winreg_Time, as its just a NTTIME
(This used to be commit 198aff894e)
2007-10-10 13:34:22 -05:00
Jelmer Vernooij
df3248f108 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.
(This used to be commit a0e63c2691)
2007-10-10 13:34:15 -05:00
Jelmer Vernooij
997da16d6c r9440: Fix bug introduced by new zero-padding code. Caught by the buildfarm.
(This used to be commit 9be03c057e)
2007-10-10 13:34:14 -05:00
Jelmer Vernooij
7c77a16e40 r9439: Make sure the remainder of the array is always initialized if the buffer is
larger then the string to be pushed.
(This used to be commit 70b52e26f3)
2007-10-10 13:34:14 -05:00
Jelmer Vernooij
d86fa7c48f r9429: Update link to DCOM spec. Fix HRESULT values.
(This used to be commit fad3413de5)
2007-10-10 13:34:13 -05:00
Stefan Metzmacher
ec96a742f7 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
(This used to be commit 1a2b836958)
2007-10-10 13:33:29 -05:00
Stefan Metzmacher
a8d31eac00 r9372: - make the subcontext handling autogenerated code look nicer,
- unify the handling of subcontext, compression and obfucation

metze
(This used to be commit 09de7e0af7)
2007-10-10 13:33:29 -05:00
Andrew Tridgell
22d2239893 r9360: fixed the IDL for winreg_SetValue()
(This used to be commit 8aff6a0bd8)
2007-10-10 13:33:28 -05:00
Andrew Tridgell
36fb8185ed 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
(This used to be commit 56769b4b1d)
2007-10-10 13:33:27 -05:00
Andrew Tridgell
212af7e08a 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
(This used to be commit ad1b9867a5)
2007-10-10 13:33:27 -05:00
Andrew Tridgell
9fffd12799 r9338: fixed the winreg IDL to be correct for the EnumKey and EnumValue
calls. The previous IDL was just a workaround for the limitations of
our older rpc infrastructure. Now that Jelmer has added much improved
string support using the charset keyword we can correctly implemenent
the unusual winreg string buffers.

Jelmer, note the little comment I put on winreg_StringBuf() about why
I couldn't use [value()] for the length field.

This also fixes EnumKey() and EnumValue() to use NTTIME fields for the
last_changed_time. I don't know why we were using a pair of uint32's,
as it is just a NTTIME.
(This used to be commit 8354b01612)
2007-10-10 13:33:25 -05:00
Andrew Tridgell
d452cd061c r9300: cope with zero length in ndr_pull_charset()
(This used to be commit 1ae255aba4)
2007-10-10 13:33:22 -05:00
Stefan Metzmacher
3be75a4c6d r9240: - move struct security_token to the idl file, with this we can
the ndr_pull/push/print functions for it in the ntacl-lsm module

- fix compiler warnings in the ldap_encode_ndr_* code

metze
(This used to be commit 83d65d0d7e)
2007-10-10 13:31:37 -05:00
Tim Potter
32e76af21a r9239: I think this is the right IDL for the eventlog record. Pidl is
generating incorrect code for arrays of strings here.
(This used to be commit 3b2476e0a0)
2007-10-10 13:31:37 -05:00
Tim Potter
d607b4473f r9237: Fix eventlog_Record typedef so it decodes records source and computer
names.  Need to get working with SIDs and extra data.
(This used to be commit 2543f78df6)
2007-10-10 13:31:35 -05:00
Jelmer Vernooij
7603394aec r9162: Fix a couple of data types
(This used to be commit 7329dd25f5)
2007-10-10 13:31:26 -05:00
Jelmer Vernooij
97eac1a46a r9161: More etheral parser generator fixes
(This used to be commit b323e83e8d)
2007-10-10 13:31:25 -05:00
Stefan Metzmacher
c56befeb62 r9157: fix white spaces
metze
(This used to be commit 475b413cfe)
2007-10-10 13:31:25 -05:00
Tim Potter
f18657aa59 r9156: Add IDL and test for FlushEventLog() but it always seems to return
NT_STATUS_ACCESS_DENIED.
(This used to be commit f18d1f539e)
2007-10-10 13:31:25 -05:00
Tim Potter
220686a5c1 r9154: Change eventlog enums to bitmaps.
Fix IDL for ReadEventLogW() function.
(This used to be commit b1b76ad9c4)
2007-10-10 13:31:24 -05:00
Jelmer Vernooij
4d4691a16b r9150: The ethereal parser generators work now. Thanks to Ronnie Sahlberg for
help with the debugging and comments on the generated code (-:
(This used to be commit 4c165f8ff6)
2007-10-10 13:31:23 -05:00
Stefan Metzmacher
90a61d99b4 r9149: add support for string arrays in GetPrinterData
metze
(This used to be commit b72062e653)
2007-10-10 13:31:23 -05:00
Andrew Tridgell
31fa87f23b r9146: - enable winreg pipe from ejs
- map the result code from rpc calls into the ejs objects

- treat winreg_String like lsa_String, hiding the length elements
(This used to be commit 2f6311c9a3)
2007-10-10 13:31:23 -05:00
Tim Potter
d87e1306c5 r9145: Some work on eventlog since jerry is doing some in Samba3. (-:
- Convert to use lsa_String instead of eventlog_String.

 - Copy across some constants.

 - Implement idl and testcase for ClearEventLog() function
(This used to be commit 352b21af3f)
2007-10-10 13:31:23 -05:00
Tim Potter
e603a36116 r9130: Fix up awful indentation.
(This used to be commit b3e0baca71)
2007-10-10 13:31:19 -05:00
Andrew Bartlett
2af19867d4 r8986: As far as I can tell, given the ldif I get from behind this, we have a
signed NTTIME here.

Andrew Bartlett
(This used to be commit 57b703a9d5)
2007-10-10 13:31:04 -05:00
Andrew Bartlett
b30f0b0391 r8855: Share this enum (describing the SamSync databases) between nbt and netlogon.
Andrew Bartlett
(This used to be commit 5e29e1c68c)
2007-10-10 13:30:12 -05:00
Andrew Bartlett
a97f667028 r8820: Push this common block of code into the caller.
Use talloc_steal() rather than talloc_reference().

Andrew Bartlett
(This used to be commit 8774f971f3)
2007-10-10 13:30:08 -05:00
Jelmer Vernooij
6553dd0c60 r8811: Fix the build..
(This used to be commit fac77f5fa2)
2007-10-10 13:30:07 -05:00
Andrew Tridgell
e95fbd6db2 r8707: this typedef isn't used, and breaks the build on HPUX, so I've removed it
(This used to be commit b9b8714297)
2007-10-10 13:29:56 -05:00
Jelmer Vernooij
4f3d66b0df r8614: Add COMRESULT/HRESULT scalar type
(This used to be commit 8637a85e6a)
2007-10-10 13:29:44 -05:00
Jelmer Vernooij
d99d06d954 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.
(This used to be commit cad40815dc)
2007-10-10 13:29:44 -05:00
Andrew Tridgell
7ee2babcfe r8587: - fixed ref allocation in irpc replies
- make every irpc server support the irpc_uptime() call
(This used to be commit eee9044826)
2007-10-10 13:29:42 -05:00
Andrew Tridgell
a32fe0f293 r8577: added management calls to list current tree connects
(This used to be commit 658befc1e4)
2007-10-10 13:29:40 -05:00
Andrew Tridgell
25428433e3 r8574: added server side irpc calls for listing the current sessions
(This used to be commit 391cfe3c96)
2007-10-10 13:29:39 -05:00
Jelmer Vernooij
762a6a14e8 r8559: Couple of (D)COM updates:
- Fixes annoying array-of-pointers bug in pidl.
 - No longer "inherit" alignment thru subcontexts
 - Use "Image Object" as example DCOM object, rather then the "My Computer" object, which is built-in and can't be accessed remotely as far as I can see
(This used to be commit bd706d4964)
2007-10-10 13:29:38 -05:00
Andrew Tridgell
9953452d49 r8522: fixed another couple of size_t warnings
(This used to be commit d2c9285483)
2007-10-10 13:29:34 -05:00
Andrew Tridgell
e835621799 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
(This used to be commit a58ea6b385)
2007-10-10 13:29:34 -05:00
Andrew Tridgell
ccc65fb995 r8519: better method of ensuring null termination
(This used to be commit f93bd0ced6)
2007-10-10 13:29:34 -05:00
Andrew Tridgell
92760db79c 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
(This used to be commit 17decd1299)
2007-10-10 13:29:34 -05:00
Stefan Metzmacher
4459d16718 r8503: remove useless line
metze
(This used to be commit ec31739642)
2007-10-10 13:29:32 -05:00
Andrew Tridgell
8b80ef14fe r8500: greatly reduce the number of build warnings on x86-64 (every NDR macro
in the generated code from pidl generated a warning)
(This used to be commit 22f7fd7634)
2007-10-10 13:23:10 -05:00
Andrew Tridgell
970ff9ba8d r8480: fixed a typo
(metze, I assume this was just a typo? it broke the build on oehmesrs6k)
(This used to be commit aa68459fe7)
2007-10-10 13:23:07 -05:00
Stefan Metzmacher
65b8c54fc2 r8476: add a note that DsAddEntry is very incomplete yet
metze
(This used to be commit 53b9175410)
2007-10-10 13:23:07 -05:00
Stefan Metzmacher
129eedc66b r8474: add some more attid mappings
for the password fields

metze
(This used to be commit 8454d32eb2)
2007-10-10 13:23:07 -05:00
Stefan Metzmacher
59d17eee38 r8375: - move from netr_StringLarge to lsa_StringLarge
- we need to use lsa_StringLarge in lsa_DnsDomainInfo, to make windows clients happy

metze
(This used to be commit 044d18f85f)
2007-10-10 13:20:13 -05:00
Stefan Metzmacher
e87f589f00 r8368: the type filed depends on the user being present or not
call ndr_print for each call

metze
(This used to be commit 0a07e4ef8d)
2007-10-10 13:20:12 -05:00
Andrew Tridgell
70278929fc r8335: removed some duplicated code
(This used to be commit 1536d66662)
2007-10-10 13:20:07 -05:00
Andrew Tridgell
39b1d2b4c4 r8286: it makes more sense to combine the refresh count with the register count, as they
are really the same packet (you can register with a refresh)
(This used to be commit 5006528554)
2007-10-10 13:19:31 -05:00
Andrew Tridgell
146c854109 r8268: added the 'needed' logic to ehs generation, so we don't generate
functions we don't need. That is a lot of functions, as ejs is only
client side, so it only needs push functions for [out] vars, and pull
functions for [in] vars

added irpc and srvsvc IDL to list of available pipes.
(This used to be commit c7a9dbe70a)
2007-10-10 13:19:28 -05:00
Andrew Tridgell
b4e53e6705 r8262: - simplify the dependency handling for ejs modules
- added config.mk entries for some more pipes

- simplify the handling of ejs variables in the pidl code
(This used to be commit 595304708d)
2007-10-10 13:19:27 -05:00
Andrew Tridgell
5ed139f096 r8261: charset style strings in pidl should be const, just like old style ndr strings
(This used to be commit aa0e1d6699)
2007-10-10 13:19:27 -05:00
Andrew Tridgell
cd88764ba1 r8260: added an init based registration system for the generated ejs rpc code, so
adding a new pipe only involves changes to librpc/config.mk
(This used to be commit 0e54fa4466)
2007-10-10 13:19:27 -05:00
Andrew Tridgell
7efeb8f451 r8256: - allow rpc calls from non-command line ejs contexts by creating a set
of null credentials to use if cmdline_credentials is not setup

- hide the length and size elements of a lsa_String from js scripts,
  so you can use a lsa_String just as an ordinary string without
  knowing its a structure. We won't do this with all structures, just
  a few core ones that are used often enough to warrant it.

- make sure returned ldb arrays have a length property
(This used to be commit 12d2092dd8)
2007-10-10 13:19:26 -05:00
Andrew Bartlett
e75c7ff39f r8252: Steal metze's thunder, and prove that with a few small tweaks, we can
now push/pull a sample PAC, and still have the same byte buffer.
(Metze set up the string code, and probably already has a similar
patch).

Unfortunetly win2k3 still doesn't like what we provide, but every step helps.

Also use data_blob_const() when we are just wrapping data for API
reasons.

Andrew Bartlett
(This used to be commit e7c8076fc1)
2007-10-10 13:19:25 -05:00
Andrew Bartlett
c0a78453a7 r8250: More PAC work. We now sucessfully verify the KDC signature from my DC
(I have included the krbtgt key from my test network).

It turns out the krbtgt signature is over the 16 (or whatever,
enc-type dependent) bytes of the signature, not the entire structure.

Also do not even try to use Kerberos or GSSAPI on an IP address, it
will only fail.

Andrew Bartlett
(This used to be commit 3b9558e82f)
2007-10-10 13:19:25 -05:00
Andrew Tridgell
f55b2b9610 r8233: - added support for more base types in pidl ejs
- added auto generation of a header with prototypes for public ejs functions

- make public functions non-static

- fixed allocation of fixed sized arrays

- added 'noejs' flag indicating that a typedef will be handled manually by ejs

- added manual functions for sid and GUID, so they show up as nice
  strings in ejs scripts

This allows ejs to bring in samr, security, lsa and misc IDL functions
(This used to be commit a8cb2dbdcc)
2007-10-10 13:19:23 -05:00
Stefan Metzmacher
0b92507760 r8232: remove samr_String and netr_String as they are the same as lsa_String
metze
(This used to be commit e601042c07)
2007-10-10 13:19:22 -05:00
Stefan Metzmacher
3d3a86f95d r8227: add STR_LARGE_SIZE flag, to support strings where the size is length+1,
metze
(This used to be commit cdd03fe87d)
2007-10-10 13:19:22 -05:00
Stefan Metzmacher
06a4e5688e r8223: fix the values of nt_version and type we reply in the server code,
also name the struct like the nt_version number

metze
(This used to be commit 1e3af5cc1f)
2007-10-10 13:19:21 -05:00
Stefan Metzmacher
e296c8de6e 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
(This used to be commit d18303a0e2)
2007-10-10 13:19:20 -05:00
Stefan Metzmacher
0a91f1777a 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
(This used to be commit 019f3dc767)
2007-10-10 13:19:20 -05:00
Andrew Tridgell
7c3fc18315 r8192: updated the glue code for the generated ejs functions from pidl
only handles a small subset of all IDL files so far
(This used to be commit 14b6436cc5)
2007-10-10 13:19:18 -05:00
Tim Potter
372f3fae88 r8171: According to Samba 3 and Ethereal, the winreg_OpenUnkown stuff is
actually a uint16 * without the [string] attribute, a la the the
system_name argument to samr_Connect().

Initialising the pointer to NULL is sufficient and we still pass the
RPC-WINREG test against win2k3.
(This used to be commit 407d962dac)
2007-10-10 13:19:16 -05:00
Stefan Metzmacher
a7fd68286a r8168: after testing I saw that w2k3 uses unique pointers on the mgmt pipe
that also matches the spec at http://www.opengroup.org/onlinepubs/9629399/apdyq.htm

metze
(This used to be commit 117e678bde)
2007-10-10 13:19:16 -05:00
Stefan Metzmacher
4a993c5241 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
(This used to be commit d19068bfb2)
2007-10-10 13:19:16 -05:00
Stefan Metzmacher
53067ce37f 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
(This used to be commit ccc9d9267a)
2007-10-10 13:19:13 -05:00
Stefan Metzmacher
a33178fc72 r8156: I found out that the unknown[2] field of the unknown[4] array is a length too,
it's always 16 bytes smaller than the size in the PAC_BUFFER

we now dump the blob's on LOCAL-PAC with -d 10

metze
(This used to be commit 4ef721ce53)
2007-10-10 13:19:13 -05:00
Stefan Metzmacher
b4b2b92282 r8150: these should be static
metze
(This used to be commit 25f5d1db29)
2007-10-10 13:19:13 -05:00
Stefan Metzmacher
148235a009 r8148: - make the PAC generation code a bit more readable and add some outof memory checks
- move to handmodified pull/push code for PAC_BUFFER
  to get the _ndr_size field and the subcontext size right

- after looking closely to the sample w2k3 PAC in our torture test (and some more in my archive)
  I found out that the first uint32 before the netr_SamInfo3 was also a pointer,
  (and we passed a NULL pointer there before, so I think that was the reason why the windows clients doesn't want our PAC)

  w2k3 uses this for unique pointers:

  ptr = ndr->ptr_count * 4;
  ptr |= 0x00020000;
  ndr->ptr_count;

- do one more pull/push round with the sample PAC

metze
(This used to be commit 0eee179415)
2007-10-10 13:19:13 -05:00
Andrew Bartlett
dbd2688c90 r8110: More PAC work. I still can't get WinXP to accept the PAC, but we are
much closer.

This changes PIDL to allow a subcontext to have a pad8 flag, saying to
pad behind to an 8 byte boundary.  This is the only way I can explain
the 4 trainling zeros in the signature struct.

Far more importantly, the PAC code is now under self-test, both in
creating/parsing our own PAC, but also a PAC from my win2k3 server.
This required changing auth_anonymous, because I wanted to reuse the
anonymous 'server_info' generation code.

I'm still having trouble with PIDL, particulary as surrounds value(),
but I'll follow up on the list.

Andrew Bartlett
(This used to be commit 50a54bf4e9)
2007-10-10 13:19:09 -05:00
Andrew Bartlett
d92b30fe38 r8108: Fix indentation, and remove a discard_const_p() that we don't need any more.
Perhaps like minimal_includes.pl, we should have a way to find these
automaticly.  Hmm...

Andrew Bartlett
(This used to be commit d13b9f548e)
2007-10-10 13:19:09 -05:00
Andrew Tridgell
9331714787 r8073: a successful rpc call from ejs!
the ejs_echo.c code is the stuff that needs to be auto-generated by
pidl. It only does echo_AddOne so far.

We also need a table for registering these calls. The code is
hard-wired for echo_AddOne for now.
(This used to be commit b1ea58ddc4)
2007-10-10 13:19:05 -05:00
Andrew Tridgell
e7f84503c0 r8068: reduced the verbosity of the EPM code
(This used to be commit 4c5974fc3d)
2007-10-10 13:19:04 -05:00
Andrew Tridgell
6ecc79b888 r8057: use our defined push/pull types in the validate code (fixes a warning)
(This used to be commit 4e14ebf51e)
2007-10-10 13:19:04 -05:00
Stefan Metzmacher
ccaf752e35 r8054: add OSVersion, OSVersionEx, DNSMachineName PrintServerData
metze
(This used to be commit 47781fccbc)
2007-10-10 13:19:03 -05:00
Andrew Tridgell
4354bebda7 r8053: requests from mmc show that the auth info for a bind should be 4 byte aligned, not
8 byte aligned
(This used to be commit c112a2b23e)
2007-10-10 13:19:03 -05:00
Stefan Metzmacher
88df3c81ee r8050: - make use of more [value()] properties
- the out subcontext's need to have a fixed size of r->in.offered,
  to make windows clients happy

metze
(This used to be commit 054e1ca434)
2007-10-10 13:19:02 -05:00
Stefan Metzmacher
cee17efc7c r8045: fix valgrind warning, add zero padding when the string doesn't fill the full FIXLEN
metze
(This used to be commit d8175b01db)
2007-10-10 13:19:02 -05:00
Jelmer Vernooij
d6acd2fb16 r8012: Add UUID for NDR64 transfer syntax.
(This used to be commit 6a3f622222)
2007-10-10 13:18:58 -05:00
Andrew Bartlett
ddffc922df r8001: Also fill in the krbtgt checksum, and make sure to put the right
checksum in the right place...

Andrew Bartlett
(This used to be commit 90d0f502da)
2007-10-10 13:18:57 -05:00
Andrew Bartlett
9a7481bcfe r7993: Further work on the Krb5 PAC.
We now generate the PAC, and can verifiy both our own PAC and the PAC
from Win2k3.

This commit adds the PAC generation code, spits out the code to get
the information we need from the NETLOGON server back into a auth/
helper function, and adds a number of glue functions.

In the process of building the PAC generation code, some hints in the
Microsoft PAC specification shed light on other parts of the code, and
the updates to samr.idl and netlogon.idl come from those hints.

Also in this commit:

The Heimdal build package has been split up, so as to only link the
KDC with smbd, not the client utils.

To enable the PAC to be veified with gensec_krb5 (which isn't quite
dead yet), the keyblock has been passed back to the calling layer.

Andrew Bartlett
(This used to be commit e2015671c2)
2007-10-10 13:18:57 -05:00
Stefan Metzmacher
a6853cf5c6 r7932: don't use the nbt called name as server name, for dcerpc_server_name()
in the ncacn_np trnaport

it's now supported to use the ip address in smbtorture for ncacn_np tests
that use dcerpc_server_name(),

and we can now pass the dns host name in the tree connect when we have the dns name
on the smbtorture command line

metze
(This used to be commit e29edbc7e6)
2007-10-10 13:18:52 -05:00
Andrew Tridgell
f04545f5d2 r7872: another place we were relying on the old behaviour of value()
(This used to be commit 25a64f8946)
2007-10-10 13:18:46 -05:00
Andrew Tridgell
7fc49243f3 r7870: fixed the RPC-SCHANNEL test. It turned out it was my const changes, as
they slightly changed the semantics of value() in pidl, which broke
a optimisation hack in some of our IDL files.

I've changed the idl files to remove the hack for now. Sometime we
need to find a better way to handle these :-)
(This used to be commit 765f75ea63)
2007-10-10 13:18:45 -05:00
Andrew Tridgell
152a6a00c3 r7865: changed pidl to take a "const void *" instead of a "void *" for the
structure in ndr_push_*() and ndr_print_*(). The push and print
functions really should not modify the structure.

metze, to make this work I had to change your spoolss hand
marshaller. Can you please check it is OK? I think that the IN and OUT
sides of that function are not ever called on the same structure, so I
think that attempt at remembering the value by assigning to
r->in._offered was not doing anything anyway, but please correct me if
I have misunderstood it.

If you really do need to remember something on those structures I'd
suggest the ndr_token_store() and ndr_token_retrieve() functions,
which are used by pidl for just this sort of thing.
(This used to be commit eee528be97)
2007-10-10 13:18:44 -05:00
Andrew Tridgell
a40d966ff5 r7763: fixed some circular dependencies
(This used to be commit 3bdf89b0f7)
2007-10-10 13:18:32 -05:00
Jelmer Vernooij
327a9ac650 r7729: Small fixes to the charset stuff.
(This used to be commit 5122b9f608)
2007-10-10 13:18:27 -05:00
Jelmer Vernooij
d4d6d0d2e5 r7706: Move ParseExpr() to util.
(This used to be commit 72efb69529)
2007-10-10 13:18:24 -05:00
Jelmer Vernooij
82dfe0b29b r7702: Implement [charset()] attribute.
(This used to be commit 7012e10bb6)
2007-10-10 13:18:23 -05:00
Jelmer Vernooij
cd39847e81 r7695: Add support for the [string] attribute that works in the traditional sense. Not
used anywhere yet.
(This used to be commit a73a35cfc7)
2007-10-10 13:18:23 -05:00
Andrew Bartlett
5b19286df0 r7690: Move the NT hash generation into the credentials system, rather than
in all the callers.  This also allows us to be more flexible in the
type of password we store.

Andrew Bartlett
(This used to be commit 00b8588c68)
2007-10-10 13:18:23 -05:00
Andrew Tridgell
5c332f6e9d r7659: fixup the ordering of socket destruction for ncacn_ip_tcp so we don't try and
remove an epoll descriptor for a closed fd
(This used to be commit bec5e9f80a)
2007-10-10 13:18:18 -05:00
Andrew Tridgell
3422499a85 r7658: don't timeout at the smb level for rpc requests as otherwise some rpc
level sign/seal mechanisms can break
(This used to be commit 9df569f023)
2007-10-10 13:18:18 -05:00
Andrew Tridgell
be8139c1e7 r7653: when a dcerpc request times out, we need to ensure that if the server
does finally answer the request and it is on the smb transport that we
don't die in the callback code as the rpc request state is gone.
(This used to be commit d47477c5c3)
2007-10-10 13:18:17 -05:00
Andrew Tridgell
64e11654d0 r7652: use event friendly connect in dcerpc socket code
(This used to be commit 154effd781)
2007-10-10 13:18:17 -05:00
Stefan Metzmacher
19c9f032fd r7644: - remove some dublicate structures SetForm and AddForm uses the same struct
- fix some typos in EnumPrintServerForms()/GetPrintServerForms()
- add AddPrintServerForms()/SetPrintServerForms() and DeletePrintServerForms

metze
(This used to be commit 7390638842)
2007-10-10 13:18:17 -05:00
Stefan Metzmacher
8f85427d6d r7643: This patch adds a new NTPTR subsystem:
- this is an abstraction layer for print services,
  like out NTVFS subsystem for file services

- all protocol specific details are still in rpc_server/spoolss/
  - like the stupid in and out Buffer handling
  - checking of the r->in.server_name
  - ...

- this subsystem can have multiple implementation
  selected by the "ntptr providor" global-section parameter

- I currently added a "simple_ldb" backend,
  that stores Printers, Forms, Ports, Monitors, ...
  in the spoolss.db, and does no real printing
  this backend is basicly for testing, how the spoolss protocol
  works

- the interface is just a prototype and will be changed a bit
  the next days or weeks, till the simple_ldb backend can
  handle all calls that are used by normal w2k3/xp clients

- I'll also make the api async, as the ntvfs api
  this will make things like the RemoteFindFirstPrinterChangeNotifyEx(),
  that opens a connection back to the client, easier to implement,
  as we should not block the whole smbd for that

- the idea is to later implement a "unix" backend
  that works like the current samba3 code

- and maybe some embedded print server vendors can write there own
  backend that can directly talk to a printer without having cups or something like this

- the default settings are (it currently makes no sense to change them :-):

ntptr providor = simple_ldb
spoolss database = $private_dir/spoolss.db

metze
(This used to be commit 455b5536d4)
2007-10-10 13:18:16 -05:00
Andrew Tridgell
af237084ec r7633: this patch started as an attempt to make the dcerpc code use a given
event_context for the socket_connect() call, so that when things that
use dcerpc are running alongside anything else it doesn't block the
whole process during a connect.

Then of course I needed to change any code that created a dcerpc
connection (such as the auth code) to also take an event context, and
anything that called that and so on .... thus the size of the patch.

There were 3 places where I punted:

  - abartlet wanted me to add a gensec_set_event_context() call
    instead of adding it to the gensec init calls. Andrew, my
    apologies for not doing this. I didn't do it as adding a new
    parameter allowed me to catch all the callers with the
    compiler. Now that its done, we could go back and use
    gensec_set_event_context()

  - the ejs code calls auth initialisation, which means it should pass
    in the event context from the web server. I punted on that. Needs fixing.

  - I used a NULL event context in dcom_get_pipe(). This is equivalent
    to what we did already, but should be fixed to use a callers event
    context. Jelmer, can you think of a clean way to do that?

I also cleaned up a couple of things:

 - libnet_context_destroy() makes no sense. I removed it.

 - removed some unused vars in various places
(This used to be commit 3a3025485b)
2007-10-10 13:18:15 -05:00
Stefan Metzmacher
056d63c62f r7580: - add GetPrinterDriverDirectory() idl, torture test and server code
- add EnumMonitors() server code and return "Standard TCP/IP Port"
- add parsing for opening Ports and Monitors with OpenPrinterEx()

metze
(This used to be commit 08e6de37bc)
2007-10-10 13:18:11 -05:00
Stefan Metzmacher
bc1f32b8ad r7575: - fix GetPrinterData() push side
- add somemore checks in the Emun*() pull/push glue code

metze
(This used to be commit 075fe1eb4b)
2007-10-10 13:18:11 -05:00
Stefan Metzmacher
04c3bbe053 r7574: - seperate [in] and [out] buffers and buf_sizes
- use the same names as etherel (offered,needed) for the buffer sizes
  (and they are really independently used)

metze
(This used to be commit f5532a5b74)
2007-10-10 13:18:11 -05:00
Jelmer Vernooij
c420c5a4c4 r7552: Use ParseExpr() for [value] attributes; allows
us somewhat cleaner IDL.
(This used to be commit b7b01bccd1)
2007-10-10 13:18:07 -05:00
Stefan Metzmacher
9ef145424a r7546: fix comment
metze
(This used to be commit de69d87ded)
2007-10-10 13:18:07 -05:00
Andrew Tridgell
ee30cf3b1d r7497: add timeouts to all rpc requests. The default timeout is 60
seconds. This should prevent the problem I am seeing on a solaris box
where a rpc request gets stuck forever
(This used to be commit c24ab34813)
2007-10-10 13:18:00 -05:00
Andrew Tridgell
d1e8e62a56 r7496: removed an unused variable
(This used to be commit a8c99d0e37)
2007-10-10 13:18:00 -05:00
Stefan Metzmacher
46b829513a r7462: fix Enum* pushing, we need to send back a buffer of the same size as we got
in the recv code..., this makes the w2k3 printserver properties gui happy:-)

metze
(This used to be commit 0130b0d902)
2007-10-10 13:17:55 -05:00
Volker Lendecke
7104da3e8f r7399: Try to get the AIX compile one step further.
Volker
(This used to be commit 75dbd20693)
2007-10-10 13:17:50 -05:00
Günther Deschner
070a0631e1 r7394: rename LSA_TRUSTED_DOMAIN_INFO_5 to LSA_TRUSTED_DOMAIN_INFO_BASIC.
Guenther
(This used to be commit aec0d99da1)
2007-10-10 13:17:49 -05:00
Jelmer Vernooij
7c9d76d30c r7377: Integrate browse service stuff more nicely
Add notes on mailslots
Add TODO list for pidl, including some plans on switching
over to using [string] attributes for pidl.
(This used to be commit fca195ce07)
2007-10-10 13:17:48 -05:00
Stefan Metzmacher
f6e1f0cf92 r7364: - remove '\' chars from copy paste
- fix allocates [out,ref] pointers to be passed between functions

metze
(This used to be commit 9a1760c618)
2007-10-10 13:17:47 -05:00
Stefan Metzmacher
f028d37c37 r7357: some minor updates
metze
(This used to be commit a547f2c2a1)
2007-10-10 13:17:46 -05:00
Stefan Metzmacher
3da5d18fe1 r7345: add WritePrinter(), AbortPrinter() and ReadPrinter() idl
metze
(This used to be commit 1fc617e871)
2007-10-10 13:17:45 -05:00
Stefan Metzmacher
56257df1d4 r7341: fix StartDocPrinter() idl
metze
(This used to be commit 08d28e5d20)
2007-10-10 13:17:44 -05:00
Stefan Metzmacher
bd1dc11f04 r7337: - fix SetJob() idl
- add StartDocPrinter() idl
- add EndDocPrinter() idl

metze
(This used to be commit c635a623bc)
2007-10-10 13:17:44 -05:00
Stefan Metzmacher
8423835521 r7331: fix parsing of spoolss_SetPrinter()
metze
(This used to be commit b0e7092bc5)
2007-10-10 13:17:43 -05:00
Stefan Metzmacher
9a831a3963 r7328: fix GetPrinterData and SetPrinterData, with zero length subcontexts
metze
(This used to be commit 73d597bacf)
2007-10-10 13:17:42 -05:00
Stefan Metzmacher
aa5ff56d89 r7327: pass down the ndr->flags to the subcontexts
metze
(This used to be commit c0462d60b5)
2007-10-10 13:17:42 -05:00
Stefan Metzmacher
5b8c972c5b r7326: fix [validate]
metze
(This used to be commit 08eb591034)
2007-10-10 13:17:42 -05:00
Jelmer Vernooij
c8b8212a83 r7314: the various ncacn and ncadg PDU's share the same namespace
(This used to be commit 58fee22e0b)
2007-10-10 13:17:41 -05:00
Jelmer Vernooij
fcc74fc060 r7313: Prefix a few functions with ncacn_ rather then dcerpc_ because they are
ncacn_ specific
(This used to be commit 875cce1268)
2007-10-10 13:17:41 -05:00
Jelmer Vernooij
430dc36c1a r7312: Add IDL for ncadg packets.
(This used to be commit 2009a430b0)
2007-10-10 13:17:40 -05:00
Andrew Tridgell
b1381947bf r7309: started adding IDL for nbt management calls. This adds a
nbtd_information() call that has just one level for now, a
NBTD_STATISTICS level for packet statistics
(This used to be commit d0772eb5a7)
2007-10-10 13:17:40 -05:00
Jelmer Vernooij
38e3381b1b r7308: Make dependency lists in the Makefile shorter (see discussion on samba-technical)
(This used to be commit 71d62d4dc7)
2007-10-10 13:17:40 -05:00
Andrew Tridgell
bf1ffa283c r7294: implemented the irpc messaging system. This is the core of the
management system I proposed on samba-technical a couple of days
ago. Essentially it is a very lightweight way for any code in Samba to
make IDL based rpc calls to anywhere else in the code, without the
client or server having to go to the trouble of setting up a full rpc
service.

It can be used with any of our existing IDL, but I expect it will
mostly be used for a new set of Samba specific management calls.

The LOCAL-IRPC torture test demonstrates how it can be used by calling
the echo_AddOne() call over this transport.
(This used to be commit 3d589a0995)
2007-10-10 13:17:37 -05:00
Jelmer Vernooij
efa7da47d4 r7278: Oops, don't compile librpc as library..
(This used to be commit e9f83bece0)
2007-10-10 13:17:35 -05:00
Jelmer Vernooij
5296bd1b51 r7274: Move m4 files to seperate dir
(This used to be commit 0dda66f0e8)
2007-10-10 13:17:35 -05:00
Tim Potter
b82d8c9928 r7212: Disambiguate dummy functions to avoid linker problemos.
(This used to be commit 61537301a3)
2007-10-10 13:17:26 -05:00
Jelmer Vernooij
a115c3e1e2 r7198: Add IDL for browse service
(This used to be commit c04fca198a)
2007-10-10 13:17:25 -05:00
Stefan Metzmacher
dc4400430c r7196: fix typo, that makes the spoolss test working with [validate]
([validate,bigendian] is still failing badly...)

metze
(This used to be commit da319b7bc3)
2007-10-10 13:17:25 -05:00
Stefan Metzmacher
180b269ac6 r7194: fix pulling of the NDR_IN data, [validate] works for the NDR_IN side now...
metze
(This used to be commit d2eb1a6844)
2007-10-10 13:17:25 -05:00
Stefan Metzmacher
2752b7cac2 r7193: add some bail out checks and fix pushing of relative pointers
metze
(This used to be commit 58a214d98f)
2007-10-10 13:17:25 -05:00
Stefan Metzmacher
01fb2de4dc r7188: make use of the new relative_base property for the spoolss_Enum* functions
metze
(This used to be commit 870ed3a2b5)
2007-10-10 13:17:25 -05:00
Stefan Metzmacher
19a154fe2b r7186: add [relative_base] property, which is allowed on typedef's
(maybe we could add them to elements latter...)

with this property all relative pointers from inside the struct or union
are relative to the struct/union start

metze
(This used to be commit c0dd18326c)
2007-10-10 13:17:24 -05:00
Stefan Metzmacher
d3dd8a4307 r7184: remove unused ndr_pull/push_struct_start/end() functions
metze
(This used to be commit 95d3286a32)
2007-10-10 13:17:24 -05:00
Stefan Metzmacher
8618c6a906 r7182: remove current support for RELATIVE_CURRENT, this will be replaced with a better aproach later
metze
(This used to be commit 9a4e9f68fb)
2007-10-10 13:17:23 -05:00
Stefan Metzmacher
4536f0ef91 r7181: add functions to calculate the buffer size needed for array buffer in the spoolss_Enum* functions
they will be later used in the spoolss server code

metze
(This used to be commit 539fe32ced)
2007-10-10 13:17:23 -05:00
Jelmer Vernooij
03c2d642a6 r7159: Improve the messages from pidl's validator module.
Change the IDL file for the echo interface to match the one we use for
Windows. The only thing different between the two files currently is the
names of the scalar types and the handling of strings.
(This used to be commit b264c61061)
2007-10-10 13:17:21 -05:00
Tim Potter
5ec5e7aa29 r7138: Doh - fix some typos.
(This used to be commit 20e1ed965a)
2007-10-10 13:17:21 -05:00
Tim Potter
b4540e5399 r7137: Add a couple more dummy idl files for the DNS server and Windows
Terminal Server remote management.
(This used to be commit 6838607893)
2007-10-10 13:17:21 -05:00
Stefan Metzmacher
62480f1252 r7120: make use of the new 'noopnum' property and get rid of handwritten
parsing code for the spoolss_Enum* functions, there still same handwritten code needed
but just to stack the autogenerated code into the correct way

metze
(This used to be commit 155d18e8b7)
2007-10-10 13:17:19 -05:00
Jelmer Vernooij
aa2580cab2 r7110: Remove invalid use of id()
(This used to be commit 9fe7e0f770)
2007-10-10 13:17:17 -05:00
Jelmer Vernooij
8017286589 r7037: Add enough pointers in the header file as well
Fix a couple of warnings.
(This used to be commit fcaa9d495c)
2007-10-10 13:17:07 -05:00
Jelmer Vernooij
55781cdce6 r7036: Allow more operations in several properties (such as size_is, length_is,
switch_is, etc) and simplify the code involved
(This used to be commit 86de98ee09)
2007-10-10 13:17:07 -05:00
Jelmer Vernooij
50d2bf0066 r7029: Make array support in pidl similar to that in other IDL compilers. We should
now able to use constructions like these:

[size_is(20)] int *x; -> Pointer to array of 20 ints
[size_is(20)] int x[]; -> Array of 20 ints
[size_is(20)] int *x[]; -> Array of 20 pointers to ints
[size_is(20,)] int *x[] -> Array of 20 pointers to ints
[size_is(,20)] int *x[]; -> Pointer to array of 20 ints
[size_is(,20)] int **x; -> Pointer to pointer to array of 20 ints
[size_is(20)] int x[][30]; -> 20 blocks of 30 ints
(This used to be commit ecf583da71)
2007-10-10 13:17:07 -05:00
Jelmer Vernooij
e427f58622 r6973: Merge new version of pidl into the main SAMBA_4_0 branch.
The main difference in this new version is the extra data structure generated
between the IDL data structure and the NDR parser:

IDL -> NDR -> { ndr_parser, ndr_header, eparser, etc }

This makes the ndr_parser.pm internals much more sane.

Other changes include:

- Remove unnecessary calls with NDR_BUFFERS (for example, GUID doesn't have any buffers, just scalars) as well as some (unnecessary) nested setting of flags.
- Parse array loops in the C code rather then calling ndr_pull_array(). This allows us to have, for example, arrays of pointers or arrays of pointers to arrays, etc..
- Use if() {} rather then if () goto foo; everywhere
- NDR_IN no longer implies LIBNDR_FLAG_REF_ALLOC
- By default, top level pointers are now "ref" (as is the default in
  most other IDL compilers). This can be overridden using the
  default_pointer_top() property.
- initial work on new ethereal parser generators by Alan DeKok and me
- pidl now writes errors in the standard format used by compilers, which
  is parsable by most editors
- ability to warn about the fact that pidl extension(s) have been used,
  useful for making sure IDL files work with other IDL compilers.

oh, and there's probably some other things I can't think of right now..
(This used to be commit 13cf227615)
2007-10-10 13:17:01 -05:00
Tim Potter
4888823524 r6939: Get rid of SUBSYSTEM::NDR since all it did was require NDR_RAW.
(This used to be commit e077d9948f)
2007-10-10 13:16:59 -05:00
Stefan Metzmacher
ef65484486 r6938: a minor update, use a better name for the NDR compression subsystem
metze
(This used to be commit 42e0aaa7fa)
2007-10-10 13:16:59 -05:00
Tim Potter
d4a7543bad r6936: Have RPC compression depend only on NDR_DRSUAPI instead of NDR_RAW which
pulls it in for everyone.
(This used to be commit 7f51a6b4f2)
2007-10-10 13:16:59 -05:00
Tim Potter
ffbeabef64 r6932: Comment out static function - not used anywhere?
(This used to be commit 742989c952)
2007-10-10 13:16:58 -05:00
Volker Lendecke
283991e1ff r6907: Unixinfo for samba4, not activated by default.
Volker
(This used to be commit 81ddffde36)
2007-10-10 13:16:56 -05:00
Jelmer Vernooij
f9ad3029ae r6863: lib-friendlier names + fix some dependencies
(This used to be commit cab81a51bf)
2007-10-10 13:16:52 -05:00
Jelmer Vernooij
e73d051e20 r6839: Add support for building subsystems as shared libraries. This can be
done by setting:
OUTPUT_TYPE = SHARED_LIBRARY
in the [SUBSYSTEM::...] section belonging to a subsystem.

The idea is to allow multiple values to OUTPUT_TYPE simultaneously
(e.g. OUTPUT_TYPE = SHARED_LIBRARY, STATIC_LIBRARY, OBJLIST )
(This used to be commit b9d0ae93ba)
2007-10-10 13:16:50 -05:00
Andrew Tridgell
eb77bb7416 r6814: fill in two more unknown values in cldap responses
(This used to be commit 5ee46b44be)
2007-10-10 13:16:47 -05:00
Jelmer Vernooij
5b18cf2268 r6795: Make some functions static and remove some unused ones.
(This used to be commit 46509eb899)
2007-10-10 13:16:44 -05:00
Stefan Metzmacher
6f76065690 r6781: -add some comments on how attributes and objectClasses are identified in DRSUAPI
-and some comments on what the attribute syntaxes matches what internal datatypes

metze
(This used to be commit 58c6887da4)
2007-10-10 13:16:43 -05:00
Andrew Tridgell
59f415c0ed r6746: added ndr_push_union_blob() for pushing IDL unions into a DATA_BLOB
(This used to be commit dc25be9d69)
2007-10-10 13:16:40 -05:00
Stefan Metzmacher
dd02669187 r6731: add a useful function for getting a guid with all bits to 0
metze
(This used to be commit 161ecce744)
2007-10-10 13:16:39 -05:00
Andrew Tridgell
2f2fc84a7c r6720: added support for the remaining 2 types of CLDAP netlogon
response.

To work around the fact that the type of the returned data is not
encoded in the packet, this required adding ndr_pull_union_blob()
which allows us to pull a blob into a union with a specified switch
value, in this case the switch value comes from the calling NtVer field.
(This used to be commit bd27e626c2)
2007-10-10 13:16:37 -05:00
Andrew Tridgell
398a3130f5 r6719: pidl need to be told that the external type netr_SchannelType is an enum, otherwise
it will assume its a struct
(This used to be commit 9a8f3e3c4c)
2007-10-10 13:16:37 -05:00
Andrew Tridgell
0ac02ed7c3 r6693: first version of cldap client library, with async interface
(This used to be commit cbeffe830b)
2007-10-10 13:16:35 -05:00