summaryrefslogtreecommitdiff
path: root/source4/rpc_server
AgeCommit message (Collapse)AuthorFilesLines
2007-10-10r5102: This is a major simplification of the logic for controlling top levelAndrew Tridgell4-222/+173
servers in smbd. The old code still contained a fairly bit of legacy from the time when smbd was only handling SMB connection. The new code gets rid of all of the smb_server specific code in smbd/, and creates a much simpler infrastructures for new server code. Major changes include: - simplified the process model code a lot. - got rid of the top level server and service structures completely. The top level context is now the event_context. This got rid of service.h and server.h completely (they were the most confusing parts of the old code) - added service_stream.[ch] for the helper functions that are specific to stream type services (services that handle streams, and use a logically separate process per connection) - got rid of the builtin idle_handler code in the service logic, as none of the servers were using it, and it can easily be handled by a server in future by adding its own timed_event to the event context. - fixed some major memory leaks in the rpc server code. - added registration of servers, rather than hard coding our list of possible servers. This allows for servers as modules in the future. - temporarily disabled the winbind code until I add the helper functions for that type of server - added error checking on service startup. If a configured server fails to startup then smbd doesn't startup. - cleaned up the command line handling in smbd, removing unused options (This used to be commit cf6a46c3cbde7b1eb1b86bd3882b953a2de3a42e)
2007-10-10r5090: Fix up the IDL for LogonGetDomainInfo in NETLOGON.Andrew Bartlett1-1/+1
Andrew Bartlett (This used to be commit e5afc3609382a7b534c9d845e809d135a0d4eb3a)
2007-10-10r5080: patch from ronnie to make our samr IDL a little more consistentAndrew Tridgell1-12/+12
(This used to be commit 7607ddda3f221bd5a68d28c0eae297569fbb58b1)
2007-10-10r5037: got rid of all of the TALLOC_DEPRECATED stuff. My apologies for theAndrew Tridgell21-179/+179
large commit. I thought this was worthwhile to get done for consistency. (This used to be commit ec32b22ed5ec224f6324f5e069d15e92e38e15c0)
2007-10-10r5034: - added a type mapping function in pidl, so the type names in our IDLAndrew Tridgell2-3/+3
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 (This used to be commit f86521677d7ff16bdc4815f9524e5286026f10f3)
2007-10-10r4945: the te element isn't needed any moreAndrew Tridgell1-5/+1
In general, now that events are children of the structure they are handling events for, the caller only needs to keep the event handle around if it plans on changing the event flags later (This used to be commit 8c8955155476827408c107af38089c8320631526)
2007-10-10r4944: every event_add_*() caller was having to call talloc_steal() to takeAndrew Tridgell1-2/+1
control of the event, so instead build that into the function. If you pass NULL as mem_ctx then it leaves it as a child of the events structure. (This used to be commit 7f981b9ed96f39027cbfd500f41e0c2be64cbb50)
2007-10-10r4943: Smplified the events handling code a lot. The first source ofAndrew Tridgell1-9/+1
complexity was that events didn't automatically cleanup themselves. This was because the events code was written before we had talloc destructors, so you needed to call event_remove_XX() to clean the event out of the event lists from every piece of code that used events. I have now added automatic event destructors, which in turn allowed me to simplify a lot of the calling code. The 2nd source of complexity was caused by the ref_count, which was needed to cope with event handlers destroying events while handling them, which meant the linked lists became invalid, so the ref_count ws used to mark events for later destruction. The new system is much simpler. I now have a ev->destruction_count, which is incremented in all event destructors. The event dispatch code checks for changes to this and handles it. (This used to be commit a3c7417cfeab429ffb22d5546b205818f531a7b4)
2007-10-10r4758: - added async support to the session request codeAndrew Tridgell1-2/+0
- added async support to the negprot client code - removed two unused parameters from smbcli_full_connection() code - converted smbclient to use smbcli_full_connection() rather than reinventing everything itself (This used to be commit 71cbe2873473e039b4511511302cb63f1c50bce8)
2007-10-10r4745: remove the distinguishedName attribute adds from samr. See theAndrew Tridgell1-5/+0
discussion on samba-technical about this. (This used to be commit e9dff03f79db00636e2b6d93a22e40a3cefed876)
2007-10-10r4728: split up server_services into:Stefan Metzmacher2-80/+55
- stream_socket services the smb, ldap and rpc service which sets up a srtam socket end then waits for connections and - task services which this you can create a seperate task that do something (this is also going through the process_model subsystem so with -M standard a new process for this created with -M thread a new thread ... I'll add datagram services later when we whave support for datagram sockets in lib/socket/ see the next commit as an example for service_task's metze (This used to be commit d5fa02746c6569b09b6e05785642da2fad3ba3e0)
2007-10-10r4715: alwys add the distinguishedName attributeStefan Metzmacher1-0/+5
the w2k3 dc join needs that metze (This used to be commit 29bc75ba28f8c73fe22878948ed43c41faee474c)
2007-10-10r4713: Add initial support for QueryTrustedDomainInfo on LSA.Andrew Bartlett1-6/+47
(more info levels to come) Andrew Bartlett (This used to be commit 175ae7599ee06d8856ffb8912c7fe4e68ebe5feb)
2007-10-10r4712: slight tidy up in alter_context serverAndrew Tridgell1-2/+1
(This used to be commit 20ab5bed34c852509b7f3e4c778ff23f4379b36e)
2007-10-10r4707: w2k3 don't restict passwords onStefan Metzmacher2-10/+21
netr_ServerPasswordSet and netr_ServerPasswordSet2 so we do now I also add a torture test for this metze (This used to be commit d896ac603a5cf387a10b21e64e2c92ff2626bc4d)
2007-10-10r4703: Add support for EnumTrustDomain, and expand the testsuite.Andrew Bartlett2-5/+82
Add my copyright to the SAMR server. Andrew Bartlett (This used to be commit 51e94fa26cc602ddca652776c213cd7096f9703a)
2007-10-10r4702: implment idl, torture test and server code for netr_ServerPasswordSet2()Stefan Metzmacher1-5/+108
metze (This used to be commit 7d8ba92da2b8babe7165f105591fd3e5738b2319)
2007-10-10r4698: - Initial implementation of trusted domains in LSA.Andrew Bartlett2-181/+381
- Use templates for Secrets and the new trusted domains - Auto-add modifiedTime, createdTime and objectGUID to records in the samdb layer. Andrew Bartlett (This used to be commit 271c8faadfe2d9e0f3d523a1cdc831f5f9e35d19)
2007-10-10r4695: Leave less memory handing around on long-term TALLOC_CTX.Andrew Bartlett1-19/+29
Add lsa_Delete() support for secrets. Andrew Bartlett (This used to be commit be4cd59f331c1ef38831ee874376d3cd073e2186)
2007-10-10r4694: 'fix' the behaviour for setting only the old, but not the new secret.Andrew Bartlett1-3/+43
(The behaviour is a little odd, but we wanted bug-for-bug, right? :-) Andrew Bartlett (This used to be commit 6a09a84320c9ab18568a66efb3839a8dcde834af)
2007-10-10r4690: - add support for async rpc server repliesStefan Metzmacher4-108/+235
the backend should check for (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_MAY_ASYNC) then it's allowed to reply async then the backend should mark that call as async with dce_call->state_flags |= DCESRV_CALL_STATE_FLAG_ASYNC; later it has to manualy set r->out.result and then send the reply by calling status = dcesrv_reply(p->dce_call); NOTE: that ncacn_np doesn't support async replies yet - implement an async version of echo_TestSleep - reenable the echo_TestSleep torture test (this need to be more strict when we have support for async ncacn_np) metze (This used to be commit f0a0dbeb25b034b1333078ca085999359f5f6209)
2007-10-10r4682: A LDB-based secrets implementation in Samba4.Andrew Bartlett1-17/+466
This uses LDB (a local secrets.ldb and the global samdb) to fill out the secrets from an LSA perspective. Some small changes to come, but the bulk of the work is now done. A re-provision is required after this change. Andrew Bartlett (This used to be commit ded33033521a6a1c7ea80758c5c5aeeebb182a51)
2007-10-10r4680: Make more efficient use of memory in SAMR:Andrew Bartlett1-2/+2
Avoid a strdup, use a talloc_reference Use the shortest term memory context possible Andrew Bartlett (This used to be commit 5569db0f94807b7e2418630fbdca03be9c65e838)
2007-10-10r4663: fixed SPNEGO auth in the rpc serverAndrew Tridgell1-3/+4
(This used to be commit 439cbb9ead2443513ecc84f5638924e056ebdc73)
2007-10-10r4650: - make more use of bitmap and enum'sStefan Metzmacher2-2/+3
- move some structs out of misc.idl metze (This used to be commit b6543a6e3057b5588ec50a2ebf6c7c932209efe6)
2007-10-10r4648: fix netr_ServerPasswordSet() bugsStefan Metzmacher1-22/+18
metze (This used to be commit 7feface9b77f2be4f592d04a6131348af761a8e8)
2007-10-10r4647: - use talloc_zero() instead of ZERO_STRUCTP()Stefan Metzmacher1-23/+20
- fix uninitialized memory bug found by valgrind metze (This used to be commit 1118a1b1bb09c9a369bb9600fbe8ad3523b7e36f)
2007-10-10r4642: added support for alter_context in the server for adding new ↵Andrew Tridgell2-6/+80
interfaces to an existing pipe (This used to be commit b6af57c86829aadc261cd7b79091cef17c15b967)
2007-10-10r4641: Push a few more details into the schannel ldb, and into theAndrew Bartlett2-47/+37
credentials struct it maintains. Clearly much of this will be replaced with some system to pass and store the session_info, as that is the 'right way' to handle this. Andrew Bartlett (This used to be commit c6fcb33a887fbf0c0b42c3bc331df942a985128c)
2007-10-10r4640: first stage in the server side support for multiple context_ids on ↵Andrew Tridgell13-251/+211
one pipe this stage does the following: - simplifies the dcerpc_handle handling, and all the callers of it - split out the context_id depenent state into a linked list of established contexts - fixed some talloc handling in several rpc servers that i noticed while doing the above (This used to be commit fde042b3fc609c94e2c7eedcdd72ecdf489cf63b)
2007-10-10r4639: initialize all struct members!Stefan Metzmacher1-8/+7
tridge: sorry for making you such a pain... could you check if that fixes your bugs metze (This used to be commit c215372eb0916df1e532b77c8365f401a8c32a38)
2007-10-10r4620: - add interface functions to the auth subsystem so that callers ↵Stefan Metzmacher3-52/+44
doesn't need to use function pointers anymore - make the module init much easier - a lot of cleanups don't try to read the diff in auth/ better read the new files it passes test_echo.sh and test_rpc.sh abartlet: please fix spelling fixes metze (This used to be commit 3c0d16b8236451f2cfd38fc3db8ae2906106d847)
2007-10-10r4618: - tidied up the alter_context client code a bitAndrew Tridgell1-13/+13
- there is no alter_nak or alter_ack packet, its all done in an alter_response - auto-allocated the contex_ids - tried to fix up the dcom code to work again with alter_context. Jelmer, please take a look :) (This used to be commit dd1c54add8884376601f2f8a56c01bfb8add030c)
2007-10-10r4616: the first phase in the addition of proper support forAndrew Tridgell1-6/+7
dcerpc_alter_context and multiple context_ids in the dcerpc client library. This stage does the following: - split "struct dcerpc_pipe" into two parts, the main part being "struct dcerpc_connection", which contains all the parts not dependent on the context, and "struct dcerpc_pipe" which has the context dependent part. This is similar to the layering in libcli_*() for SMB - disable the current dcerpc_alter code. I've used a #warning until i get the 2nd phase finished. I don't know how portable #warning is, but it won't be long before I add full alter context support anyway, so it won't last long - cleanup the allocation of dcerpc_pipe structures. The previous code was quite awkward. (This used to be commit 4004c69937be7e5dae56f9567ca607f982d395d3)
2007-10-10r4591: - converted the other _p talloc functions to not need _pAndrew Tridgell1-1/+4
- 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. (This used to be commit 6e7754abd0c225527fb38363996a6e241b87b37e)
2007-10-10r4563: fixed lsa_EnumAccounts() server side to return all accounts that have ↵Andrew Tridgell1-1/+2
privileges, as volker discovered (This used to be commit 09edc31f3b92105dab585614553ba5e94ccdf588)
2007-10-10r4558: more use of bitmaps and enumsStefan Metzmacher2-4/+9
metze (This used to be commit 2a859fbc90a6b043bac318196e42c2949958d57f)
2007-10-10r4549: got rid of a lot more uses of plain talloc(), instead usingAndrew Tridgell2-3/+2
talloc_size() or talloc_array_p() where appropriate. also fixed a memory leak in pvfs_copy_file() (failed to free a memory context) (This used to be commit 89b74b53546e1570b11b3702f40bee58aed8c503)
2007-10-10r4520: added a enum test function to the echo pipeAndrew Tridgell1-0/+6
(This used to be commit f9e0aa1ab1faac039893db241819907c9c4bb510)
2007-10-10r4508: - simplify the code and allocate only in one placeStefan Metzmacher1-15/+4
- the ZERO_STRUCT(r->out) is useless and wrong if we would have a [ref,out] parameter also note the r->out is already initialized by the pidl generated code metze (This used to be commit 09727d3d4acdc90165f37ef726ba6f6ef6f77b98)
2007-10-10r4499: Almost make our Samba4 server pass the RPC-SAMLOGON torture test.Andrew Bartlett2-57/+96
I just need to fix a couple of NTLMv2 issues before we can fully pass, and put this in test_rpc.sh, as a 'should pass' test. Andrew Bartlett (This used to be commit 4b52409e385366d87724bb79f4fad4803e8ecfec)
2007-10-10r4490: when implementing one rpc server call in terms of another call, youAndrew Tridgell1-1/+3
must zero r.out before making the 2nd call if the 2nd call has any non-ref out parameters. This is needed for the case where the 2nd call fails, and the 1st call would then fill in its out fields based on uninitialised memory. (This used to be commit 202470326dcfaa5d36aaaf6be47eec40fed50402)
2007-10-10r4487: fixed the use of ldb_msg_add_*() in the samr password backendAndrew Tridgell1-18/+28
(This used to be commit d79cc8b901ef273547bab2f66355e075da61ce9b)
2007-10-10r4485: remove unused TODO comment we already handle the ↵Stefan Metzmacher1-2/+0
DS_ROLE_STANDALONE_SERVER case correct metze (This used to be commit 7ab9de14afa8abb44f0f6c16217964618fcaf894)
2007-10-10r4484: - use the nTMixedDomain attribute to check if our domain is mixed ↵Stefan Metzmacher1-5/+9
mode or not metze (This used to be commit 7fe9550375a7a922f9fc93944acaf7915ee107c1)
2007-10-10r4483: - rename same structs, enums and uninons of the dssetup pipeStefan Metzmacher1-72/+137
to match the style we are using in other pipes - first fillin local vars and only set the out parameter on success - for the server code only to the samdb lookup when it's needed NOTE: the DsRoleGetPrimaryDomainInformation() code with DS_ROLE_MEMBER_SERVER is not tested yet, does someone has a w2k3 member server to test with? metze (This used to be commit e6d1136497f501fe0687bfb34a155db6a9d87bde)
2007-10-10r4475: fixed smbd to work with the small changes in the ldb API (the most ↵Andrew Tridgell3-121/+176
important change was in the ldb_msg_add_*() routines, which now use the msg as a context, and thus it needs to be a talloc ptr) (This used to be commit 1a4713bfd0e519f3eb7b3241121ff914a6eeef18)
2007-10-10r4461: finished the remaining information levels in the DSSETUP pipe. The ↵Andrew Tridgell1-20/+38
pipe is now complete! The only glitch is that I am returning DS_ROLE_MEMBER_SERVER when I should be returning DS_ROLE_PRIMARY_DC. This is needed for the moment or ACL editing doesn't work from w2k3. Once we have some more ADS calls we should be able to fix this. (This used to be commit 6566dc2805a9f6473ebab70b0dbd381c4dbd42c8)
2007-10-10r4458: Create ncalrpc directory with 0755 rather then 0700 so non-root usersJelmer Vernooij1-1/+1
can use ncalrpc as well. (This used to be commit 02340bb6eec394576d23f2c51956f4c47f475452)
2007-10-10r4453: use lp_server_role(), which currently returns 3, for the dssetupAndrew Tridgell1-1/+1
role. The value '5', which is what my w2k3 DC returns, doesn't work. I'm not sure why this is. with this change the GUI ACL editor from w2k3 works properly, with either server role in the HKLM registry. (This used to be commit 27a8b270bdd029a850c5ec3d10c1ac42468169cb)