1
0
mirror of https://github.com/samba-team/samba.git synced 2025-10-22 07:33:16 +03:00
Commit Graph

61 Commits

Author SHA1 Message Date
Jelmer Vernooij
fc1f4d2d65 r26296: Store loadparm context in DCE/RPC server context. 2007-12-21 05:48:13 +01:00
Jelmer Vernooij
0721a07aad r26227: Make loadparm_context part of a server task, move loadparm_contexts further up the call stack. 2007-12-21 05:47:04 +01:00
Andrew Bartlett
09c0faa5b7 r26135: Remove samdb_add(), samdb_delete() and samdb_modify(), which were just
wrappers to ldb_add() etc.  samdb_replace() remains, as it sets flags on
all entries as 'replace'.

Andrew Bartlett
2007-12-21 05:46:17 +01:00
Andrew Bartlett
f1ab90c88c r25940: Rework the samldb and templates handling.
Templates just don't belong in the sam.ldb, as they don't obey any of
the other rules.  This moves them to a seperate templates.ldb.

In samldb, this patch reworks the duplicate SID and Name detection
code, to use ldb_search_exp_fmt() rather than gendb_search.  This
returns far more useful errors, which we now handle and report better.

The call to samdb_search_for_parent_domain() has been moved in samldb,
to allow both the account and SID uniqueness checks to be in the same
domain.  This function also returns better errors.

dcesrv_drsuapi.c is updated for the new prototype of
samdb_search_for_parent_domain()

Andrew Bartlett
2007-12-21 05:45:10 +01:00
Jelmer Vernooij
b7371f1a19 r25553: Convert to standard bool type. 2007-10-10 15:07:54 -05:00
Andrew Bartlett
42bcf85620 r24246: Avoid the annoying 'probable memory leak in ldb' messages, by fixing
some issues in the NBT server (this was a false positive, but easily
worked around) and DRSUAPI server.

We should take care not to use the ldb_context as a talloc pool, and
to always ensure that any results from ldb_search() are moved off that
pool with talloc_steal or talloc_free().

To work around the issue in provision, for which I can find no fault
(other than a lot of work being done in provision), I've moved the
detector trigger to 400 additional blocks.

This fixes Bug #4810 by <mwallnoefer@yahoo.de>

Andrew Bartlett
2007-10-10 15:01:29 -05:00
Andrew Tridgell
fcf38a38ac r23792: convert Samba4 to GPLv3
There are still a few tidyups of old FSF addresses to come (in both s3
and s4). More commits soon.
2007-10-10 14:59:12 -05:00
Günther Deschner
cf953d0481 r23239: Fill in drsuapi_QuerySitesByCost.
Guenther
2007-10-10 14:53:06 -05:00
Andrew Bartlett
93e2ff2e85 r22477: When an invaild base is specified to ldb_search, it should return
LDB_ERR_NO_SUCH_OBJECT.  Handle this (found against LDAP, ldb_tdb is
being updated).

Andrew Bartlett
2007-10-10 14:51:31 -05:00
Stefan Metzmacher
33550c063d r21512: finish DsBind() in the DRSUAPI server:
- fill in our on bind_info struct correctly
- remember the local and remote DsBindInfo28 struct
- remember the remote bind_buid

w2k3 now tries replicate using DsGetNCChanges() from us,
after the NET-API-BECOME-DC test created the domain controller
and replicated all data.

(But we still give a DCERPC fault in DsGetNCChanges()...)

metze
2007-10-10 14:48:47 -05:00
Stefan Metzmacher
b8c940f1e2 r21356: we have a function to get the sites dn
also it's not always under the domain dn

metze
2007-10-10 14:48:18 -05:00
Jelmer Vernooij
76c78b0339 r20850: Prefix all server calls with dcesrv_ 2007-10-10 14:43:39 -05:00
Stefan Metzmacher
d883815c8d r20514: implement idl for DsGetNT4ChangeLog() which transferres the meta data
for NT4 DC's in mixed mode domains.

This call is triggered by tranferring the PDC FSMO Role to another DC

the real meta data is encoded in the user buffer which is just a DATA_BLOB in idl

metze
2007-10-10 14:36:04 -05:00
Andrew Bartlett
21b38ae1e4 r20374: It's still 2006 (just...). Add copyright.
Andrew Bartlett
2007-10-10 14:30:18 -05:00
Andrew Bartlett
79941adbff r20353: Restructure the DRSUAPI DsGetDomainControllerInfo test, because as
usual things are more complex than they appear.

Also remove the incorrect server-side implementation, which blindly
assumed some sense of consistancy across the API switch levels.

Andrew Bartlett
2007-10-10 14:30:15 -05:00
Andrew Bartlett
2eb9e6445c r20315: Implement the server side of DsGetDomainControllerInfo. This is a
supprisingly complex call...

It turns out that the in/out parameter 'level' is not in/out, but set
seperatly by the server-side code from r->req.req1.level.

This commit also breaks out some common code from samldb into samdb.

Andrew Bartlett
2007-10-10 14:29:38 -05:00
Stefan Metzmacher
df133cd22a r19847: add idl for DsRemoveDSServer(), this is used when a server unbecomes a DC
metze
2007-10-10 14:28:25 -05:00
Simo Sorce
3929c086d5 r19832: better prototypes for the linearization functions:
- ldb_dn_get_linearized
  returns a const string

- ldb_dn_alloc_linearized
  allocs astring with the linearized dn
2007-10-10 14:28:22 -05:00
Simo Sorce
a580c871d3 r19831: Big ldb_dn optimization and interfaces enhancement patch
This patch changes a lot of the code in ldb_dn.c, and also
removes and add a number of manipulation functions around.

The aim is to avoid validating a dn if not necessary as the
validation code is necessarily slow. This is mainly to speed up
internal operations where input is not user generated and so we
can assume the DNs need no validation. The code is designed to
keep the data as a string if possible.

The code is not yet 100% perfect, but pass all the tests so far.
A memleak is certainly present, I'll work on that next.

Simo.
2007-10-10 14:28:22 -05:00
Andrew Bartlett
a1e80eeb95 r19761: This may need work, but here is an initial implementation of
DsWriteAccountSpn().

It passes the client toture test.

Andrew Bartlett
2007-10-10 14:28:20 -05:00
Günther Deschner
ca5e133e8c r16796: Fill in dsr_GetMemberships() / dsr_GetMemberships2().
This intersting call is apparently used to construct the user token,
collect memberships from other DSAs and to retrieve (nested) memberships
of a given group.

Torture test to follow (once I cleaned it up).

Guenther
2007-10-10 14:09:46 -05:00
Stefan Metzmacher
9611c8aa9c r15319: remove unneeded macros
metze
2007-10-10 14:05:14 -05:00
Jelmer Vernooij
70e7449318 r12608: Remove some unused #include lines. 2007-10-10 13:49:03 -05:00
Jelmer Vernooij
0aca5fd513 r12542: Move some more prototypes out to seperate headers 2007-10-10 13:47:55 -05:00
Andrew Bartlett
c9d5d8e45d r11270: Move the core CrackNames code from rpc_server/drsuapi to dsdb/samdb.
I'm sure this will not be the final resting place, but it will do for
now.

Use the cracknames code in auth/ for creating a server_info given a
principal name only (should avoid assumtions about spliting a
user@realm principal).

Andrew Bartlett
2007-10-10 13:45:11 -05:00
Andrew Bartlett
ab5dbbe10a r11239: Use ${REALM} for the realm in rootdse.ldif
Add the kpasswd server to our KDC, implementing the 'original' and
Microsoft versions of the protocol.

This works with the Heimdal kpasswd client, but not with MIT, I think
due to ordering issues.  It may not be worth the pain to have this
code go via GENSEC, as it is very, very tied to krb5.

This gets us one step closer to joins from Apple, Samba3 and other
similar implementations.

Andrew Bartlett
2007-10-10 13:45:06 -05:00
Andrew Bartlett
e3abbfca4a r11223: Only pass around the ldb handle (make this code easier to seperate
into a general lib).

Andrew Bartlett
2007-10-10 13:45:05 -05:00
Andrew Bartlett
2513c02c64 r11194: Use the special ldb attribute "canonicalName" (therefore testing that
codepath) in DRSUAPI CrackNames.

Fix the NT4 account return value.

Andrew Bartlett
2007-10-10 13:44:59 -05:00
Andrew Bartlett
380037ee09 r10953: Add a new function to form a canonicalName out of a DN to ldb_dn.c
Use this new function in the client and server for the CrackNames
case, where we particularly need it.

Andrew Bartlett
2007-10-10 13:39:45 -05:00
Andrew Tridgell
1af2cc067f r10894: make the handling of dn/distinguishedName much closer to real
ldap. Also ensure we put a objectclass on our private ldb's, so they
have some chance of being stored in ldap if you want to
2007-10-10 13:39:40 -05:00
Andrew Bartlett
7ec5084f63 r10811: Revert accidental commit, I still need to finish the displayName and
syntatical mapping work.

Andrew Bartlett
2007-10-10 13:39:32 -05:00
Andrew Bartlett
fd7203789a r10810: This adds the hooks required to communicate the current user from the
authenticated session down into LDB.  This associates a session info
structure with the open LDB, allowing a future ldb_ntacl module to
allow/deny operations on that basis.

Along the way, I cleaned up a few things, and added new helper functions
to assist.  In particular the LSA pipe uses simpler queries for some of
the setup.

In ldap_server, I have removed the 'ldasrv:hacked' module, which hasn't
been worked on (other than making it continue to compile) since January,
and I think the features of this module are being put into ldb anyway.

I have also changed the partitions in ldap_server to be initialised
after the connection, with the private pointer used to associate the ldb
with the incoming session.

Andrew Bartlett
2007-10-10 13:39:32 -05:00
Andrew Bartlett
8a22d46e70 r10286: This patch is ugly and disgusting, but for now it works better than the other
ideas I have had.

When I get a full list of things I want to do to a krb5_context I'll
either add gsskrb5_ wrappers, or a way of speicfying the krb5 context
per gssapi context.

(I want to ensure that the only krb5_context variables created while
executing Samba4 are via our wrapper).

Andrew Bartlett
2007-10-10 13:38:13 -05:00
Andrew Bartlett
73bd6c7534 r10045: metze reminded me to use the correct enum entry, rather than 0 for the
return here.

Andrew Bartlett
2007-10-10 13:36:32 -05:00
Tim Potter
716011dd92 r9980: Fix some warnings. 2007-10-10 13:36:26 -05:00
Andrew Bartlett
530d91de7c r9942: CN=Configuration is always under the database-wide base dn, so don't
try and pass it down as a parameter.

Andrew Bartlett
2007-10-10 13:36:24 -05:00
Andrew Bartlett
ed24d88f0e r9941: Update the CrackNames test, and provide a much improved server-side
DRSUAPI CrackNames.

We can't pass the full cracknames test until the initial provision is
updated, the seperate DomainControllerInfo and canonical names support
is added.

Andrew Bartlett
2007-10-10 13:36:24 -05:00
Simo Sorce
692e35b779 r9391: Convert all the code to use struct ldb_dn to ohandle ldap like distinguished names
Provide more functions to handle DNs in this form
2007-10-10 13:33:32 -05:00
Andrew Bartlett
242db48b98 r8998: More work on the RPC server code to avoid abusing the name attribute
as a netbios name.

Andrew Bartlett
2007-10-10 13:31:05 -05:00
Andrew Bartlett
ba5fe07b97 r8984: Use the correct cross-reference search in DRSUAPI, rather than making
assumptions about the behaviour of "name" as a NETBIOS domain name.

Andrew Bartlett
2007-10-10 13:31:03 -05:00
Stefan Metzmacher
b920b306b3 r8371: the objectGUID is now stored in binary...
metze
2007-10-10 13:20:13 -05:00
Andrew Bartlett
e13c671619 r5988: Fix the -P option (use machine account credentials) to use the Samba4
secrets system, and not the old system from Samba3.

This allowed the code from auth_domain to be shared - we now only
lookup the secrets.ldb in lib/credentials.c.

In order to link the resultant binary, samdb_search() has been moved
from deep inside rpc_server into lib/gendb.c, along with the existing
gendb_search_v().  The vast majority of this patch is the simple
rename that followed,

(Depending on the whole SAMDB for just this function seemed pointless,
and brought in futher dependencies, such as smbencrypt.c).

Andrew Bartlett
2007-10-10 13:11:12 -05:00
Stefan Metzmacher
cf7c1352ab r5742: - add torture test and idl for DsReplicaUpdateRefs()
(the torture test currently only tests if the idl is correct)

- add start for idl for DsGetNCChanges()
  (if someone didn't noticed the current ethereal trunk code can
   successful decrypt DCERPC and LDAP gsskrb5 encrypted blobs,
   when you provide a keytab and have compiled against heimdal :-)

- add a view bitmaps and enum's for better debugging

metze
2007-10-10 13:11:01 -05:00
Andrew Tridgell
9db6c79e90 r5298: - got rid of pstring.h from includes.h. This at least makes it a bit
less likely that anyone will use pstring for new code

 - got rid of winbind_client.h from includes.h. This one triggered a
   huge change, as winbind_client.h was including system/filesys.h and
   defining the old uint32 and uint16 types, as well as its own
   pstring and fstring.
2007-10-10 13:09:38 -05:00
Andrew Tridgell
ec32b22ed5 r5037: got rid of all of the TALLOC_DEPRECATED stuff. My apologies for the
large commit. I thought this was worthwhile to get done for
consistency.
2007-10-10 13:09:15 -05:00
Andrew Tridgell
fde042b3fc r4640: first stage in the server side support for multiple context_ids on 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
2007-10-10 13:08:38 -05:00
Stefan Metzmacher
983f74c365 r4203: the bind_info blob isn't a const.
here's the idl to parse it, because we don't want the
callers to manually de/encode this

metze
2007-10-10 13:07:26 -05:00
Stefan Metzmacher
4fd57d5e7c r4087: - add idl and torture tests for drsuapi_DsReplicaGetInfo()
(NOTE: that the drsuapi_DsReplicaObjMetaData2 struct is not corrently parsed yet
 and there're some unknown fields left in someother infotypes)

metze
2007-10-10 13:06:25 -05:00
Stefan Metzmacher
e896925ac0 r3999: - reply with the same DsBindInfo blob as w2k3 in the server function
- add idl for drsuapi_DsReplicaSync() not yet complete

- just return WERR_OK for the drsuapi_DsReplicaSync() server function

metze
2007-10-10 13:06:12 -05:00
Stefan Metzmacher
625826ad90 r3920: - it seem that we need to send a magic bind_guid in DsBind()
to make DsWriteAccountSpn() work

- add idl and torture test for DsWriteAccountSpn()

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