1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-14 19:24:43 +03:00

693 Commits

Author SHA1 Message Date
Andrew Bartlett
19b00d57f4 r26284: Rather than just debug, push the error back up the stack as the error
string, if we fail to load the schema.

Andrew Bartlett
(This used to be commit 1dc771f903dd613a4d6494f7fd45d35c4d282a33)
2007-12-21 05:48:08 +01:00
Andrew Bartlett
9bdc1194da r26283: fix typo
(This used to be commit 7d1169b52b583abee48f4dafac01f5887060002e)
2007-12-21 05:48:08 +01:00
Andrew Bartlett
d4fbd381fa r26282: These modules expect errors, but if we don't wipe the error string, we
get phony error strings at the caller, which is very confusing.

Andrew Bartlett
(This used to be commit 9ac7f4f6098b392dbe4a883a802d2417e074586a)
2007-12-21 05:48:07 +01:00
Jelmer Vernooij
da0f222f43 r26271: Remove some more uses of global_loadparm.
(This used to be commit e9875fcd56de0748ed78d7e3c9cdb4919cd96d3c)
2007-12-21 05:47:53 +01:00
Jelmer Vernooij
5b357ca877 r26270: Require specifying the loadparm_context or NULL to cli_credentials_guess().
(This used to be commit e52710d6794a25ba697f8c26b43784226964f9cb)
2007-12-21 05:47:50 +01:00
Jelmer Vernooij
43696d2752 r26252: Specify loadparm_context explicitly when creating sessions.
(This used to be commit 7280c1e9415daabb2712db1372e23f9846272ede)
2007-12-21 05:47:29 +01:00
Andrew Bartlett
cd1f19d7d3 r26244: Add a module (sans tests for the moment) that implements ranged
results, as used particularly by MMC's Active Directory Users and
Computers to list group members.

This may be used on any attribute, but is useful to obtain attributes
that may be lengthy in 'pages'.  The implementation presumes that
attributes will always be returned by the DB in the same order.

Andrew Bartlett
(This used to be commit c789a91e00b47b2f02513e97101b9606d00c6aaa)
2007-12-21 05:47:23 +01:00
Jelmer Vernooij
291ddf4336 r26237: Add loadparm context to the server service interface.
(This used to be commit 1386c5c92505a950c65411b8af74d703ce023f95)
2007-12-21 05:47:15 +01:00
Jelmer Vernooij
934e932387 r26235: Avoid global_loadparm.
(This used to be commit e9039782204389cc827e76da319d5ccf6d33be46)
2007-12-21 05:47:13 +01:00
Jelmer Vernooij
7e298580e0 r26234: More global_loadparm fixes.
(This used to be commit 84892d030de6266fc0f3a699cade960dd5dc37bc)
2007-12-21 05:47:12 +01:00
Jelmer Vernooij
120ecdb5cb r26233: Pass loadparm context when creating krb5 contexts.
(This used to be commit 7780bf285fdfc30f89409d0436bad0d4b6de5cd4)
2007-12-21 05:47:11 +01:00
Jelmer Vernooij
cc04f143dc r26229: Set loadparm context as opaque pointer in ldb, remove more uses of global_loadparm.
(This used to be commit 37d05fdc7b0e6b3211ba6ae56b1b5da30a6a392a)
2007-12-21 05:47:06 +01:00
Jelmer Vernooij
51db4c3f3d r26228: Store loadparm context in auth context, move more loadparm_contexts up the call stack.
(This used to be commit ba75f1613a9aac69dd5df94dd8a2b37820acd166)
2007-12-21 05:47:05 +01:00
Jelmer Vernooij
f4a1083cf9 r26227: Make loadparm_context part of a server task, move loadparm_contexts further up the call stack.
(This used to be commit 0721a07aada6a1fae6dcbd610b8783df57d7bbad)
2007-12-21 05:47:04 +01:00
Andrew Bartlett
364266e22a r26192: Handle, test and implement the style of extended_dn requiest that MMC uses.
It appears that the control value is optional, implying type 0 responses.

Failing to parse this was causing LDAP disconnects with 'unavailable
critical extension'.

Andrew Bartlett
(This used to be commit 833dfc2f2af84c45f954e428c9ea6babf100ba92)
2007-12-21 05:46:44 +01:00
Andrew Bartlett
37fdef233e r26182: Extend our linked attribute testsuite to cover many more possible
modifications, and then extend our implementation to match.

Andrew Bartlett
(This used to be commit 65d17f0ad7ead438333abcccb0bd56b038ffb88e)
2007-12-21 05:46:38 +01:00
Andrew Bartlett
470043bf7a r26140: Add a new test for searches by distinguieshedName and dn, and
implement these in the simple ldap mapping module.

We still don't pass this test, because we must get linked attributes
into OpenLDAP.

Andrew Bartlett
(This used to be commit d41f34e979bb119f71ab3cc2fdb3c08e4b92849c)
2007-12-21 05:46:20 +01:00
Andrew Bartlett
93e3a47206 r26138: Don't talloc_free() res if an error occoured.
Andrew Bartlett
(This used to be commit 4a8a1003f3cc8db530182138e2331e860149e844)
2007-12-21 05:46:19 +01:00
Andrew Bartlett
adef944c43 r26137: Rename the entryUUID module to better match it's purpose: being a
simple ldap mapping (a complex mapping will follow).

Fix the module to handle 'name' better, rather than using the 'name'
attribute built into OpenLDAP, rename to samba4RDN.  We need to see if
this can be handled in the backend.

Also rename the functions and inernal module name to entryuuid for
consistancy.

Andrew Bartlett
(This used to be commit a7be80766f4270d63433bbd6a976ebf302ed3433)
2007-12-21 05:46:19 +01:00
Jelmer Vernooij
0ac6bffdf4 r26136: Attempt to fix dependencies for auth.
(This used to be commit abf2600a044cdbab6c5d7880d18217bff3d15c39)
2007-12-21 05:46:18 +01:00
Andrew Bartlett
25143a2648 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
(This used to be commit 09c0faa5b7e1a560bf13b99a2584012a47377bb6)
2007-12-21 05:46:17 +01:00
Jelmer Vernooij
dc2273ba37 r26006: Improve some dependencies.
(This used to be commit 28f05bb5ef9e727298f4b61e71c42a8703374b96)
2007-12-21 05:45:41 +01:00
Jelmer Vernooij
013a762ca2 r26005: Notice the user about LD_LIBRARY_PATH or equivalent when building with shared libs.
(This used to be commit 44529b24467ac94d47d14a53177554b39a80da1a)
2007-12-21 05:45:41 +01:00
Jelmer Vernooij
ca0b72a1fd r26003: Split up DB_WRAP, as first step in an attempt to sanitize dependencies.
(This used to be commit 56dfcb4f2f8e74c9d8b2fe3a0df043781188a555)
2007-12-21 05:45:40 +01:00
Andrew Bartlett
579eca54b7 r25981: Don't create an ldb_request on NULL.
A re-arrangment of the code due to the base DN checking meant that the
ac->down_req array wasn't started, so was NULL

Andrew Bartlett
(This used to be commit 0a44b8e9f3e1a85c27d105cdd1572a0df936f612)
2007-12-21 05:45:27 +01:00
Andrew Bartlett
3f7dcaceba r25957: Rework the cracknames code to use less gendb_search() and instead call
ldb_search_exp_fmt().  While it is a bit more verbose to code with, it
returns better error codes, and allows us to handle the case where the
base DN doesn't exist better.

Andrew Bartlett
(This used to be commit be6ef043a3f811e6b08d3e5fe7094a72d974134a)
2007-12-21 05:45:17 +01:00
Andrew Bartlett
b34f286d3a r25949: Make error messages clearer and more correct.
Andrew Bartlett
(This used to be commit f0a0d73f768434cb474b311d7c366d1f2a06c8f4)
2007-12-21 05:45:13 +01:00
Andrew Bartlett
5d4f507a65 r25942: Make various ldb modules handle an LDB backend that enforces validity
of Base DNs in searches (returning an error of LDB_ERR_NO_SUCH_ENTRY).

We need to handle this if ldb_tdb is to behave correctly compared with
LDAP, as well as if we are using an LDAP backend.

In doing so, I realised that subtree_rename and subtree_delete
(prevention) need rather different wait loops, so it seemed easier to
split it out into it's own module.

I've fixed the licence on both of these modules to be GPLv3.

Andrew Bartlett
(This used to be commit d3894c90f31fb45e038ab478cd9d7d34962d069b)
2007-12-21 05:45:11 +01:00
Andrew Bartlett
7f18e15e3f r25941: Use samdb_relative_path() (new function in samdb.c) in the partitions
module.

Andrew Bartlett
(This used to be commit c8d1ab30845fa1496c85630b138b1cb512c2b6aa)
2007-12-21 05:45:11 +01:00
Andrew Bartlett
3f2ca10d2d 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
(This used to be commit f1ab90c88c782c693b41795d70368650806543b5)
2007-12-21 05:45:10 +01:00
Stefan Metzmacher
529763a9aa r25920: ndr: change NTSTAUS into enum ndr_err_code (samba4 callers)
lib/messaging/
lib/registry/
lib/ldb-samba/
librpc/rpc/
auth/auth_winbind.c
auth/gensec/
auth/kerberos/
dsdb/repl/
dsdb/samdb/
dsdb/schema/
torture/
cluster/ctdb/
kdc/
ntvfs/ipc/
torture/rap/
ntvfs/
utils/getntacl.c
ntptr/
smb_server/
libcli/wrepl/
wrepl_server/
libcli/cldap/
libcli/dgram/
libcli/ldap/
libcli/raw/
libcli/nbt/
libnet/
winbind/
rpc_server/

metze
(This used to be commit 6223c7fddc972687eb577e04fc1c8e0604c35435)
2007-12-21 05:45:02 +01:00
Andrew Bartlett
27c9f6c235 r25891: Test that we get the correct return value when we attempt to reference
invalid entries with a linked attribute.

Make Samba4 pass that test, by fixing a silly bug in the
linked_attributes module.  (By passing down the 'original' request
structure, tdb would override our handle, and therefore we would never
be called for the 'wait', which collects the errors).

Fix up the provision templates to handle the newly required
referential integrity.

Andrew Bartlett
(This used to be commit 0377d85bbdcb2c4f110b0519005f0d1d10bc0c0b)
2007-12-21 05:44:41 +01:00
Jelmer Vernooij
e7cf933d41 r25887: Build Samba-specific ldb modules as dso's.
(This used to be commit 9d73becbb24fbde2e319e18e84af35d9efaeefda)
2007-12-21 05:44:40 +01:00
Stefan Metzmacher
6ce86941de r25839: use nss_wrapper code in samba4 if
--enable-nss-wrapper or --enable-developer is given

metze
(This used to be commit f8bc6b9ad0eec60bff7fdc5653397efd9a044a29)
2007-12-21 05:44:20 +01:00
Andrew Bartlett
b98169884b r25788: Use a single routine to handle the creation of modify requests in the
linked_attributs code.

This drasticly reduces the code duplication here.

Andrew Bartlett
(This used to be commit c66e188e6729a8e12854017d62067b4ae4a23af8)
2007-12-21 05:43:59 +01:00
Andrew Bartlett
605032d997 r25786: Add function required by linked_attributes module (We need a list of
all linked attributes in the schema, so we can try and find them).

Andrew Bartlett
(This used to be commit 9cc706e06079899e58d4806ec27f86ae019cff60)
2007-12-21 05:43:58 +01:00
Andrew Bartlett
8a8948a17a r25781: Handle and test linked attribute renames.
Andrew Bartlett
(This used to be commit 56d9dd5140b6d7d7bbaa2f59ecdff7ee70c4faac)
2007-12-21 05:43:56 +01:00
Stefan Metzmacher
5df2dfa2fc r25780: fix bool return
metze
(This used to be commit 7b77210d3e2c644d28d6e3795e6c4423dc6ea4bf)
2007-12-21 05:43:55 +01:00
Andrew Bartlett
3c5a71f7e5 r25763: Handle modifies, in the easy case (add/delete of elements), for the
linked attributes.

Andrew Bartlett
(This used to be commit c6a6246fbde996ec7e85cb66f060cfe8b90044dd)
2007-12-21 05:43:48 +01:00
Andrew Bartlett
a4c79f06ae r25762: This test belongs best with the other checks for a valid parent, in
the objectclass module.

Andrew Bartlett
(This used to be commit 16a292fcb134adec110cbc4c8f0fb03323750a45)
2007-12-21 05:43:47 +01:00
Andrew Bartlett
464dd2ada1 r25761: Rename to be a DN to be a child of itself wasn't being checked for.
This prevents CN=test,dc=samba,dc=example,dc=com being renamed into
CN=test2,cn=test,dc=samba,dc=example,dc=com

Andrew Bartlett
(This used to be commit 958a92ed0c6bee19d8b86df7c66330d2bba23e46)
2007-12-21 05:43:47 +01:00
Andrew Bartlett
2de30ecd94 r25755: Fix a couple of memory leaks, in particular a new leak onto the NULL
context caused by my objectclass module work.

Andrew Bartlett
(This used to be commit 2a835d900fee71e4461d5d18e39b4358fa6fdfba)
2007-12-21 05:43:46 +01:00
Andrew Bartlett
46210e11f1 r25754: More work on normal forms for ldb input.
This patch is to ensure that all attributes are in the same case as
the schema specifies.  In the process, I ensure that all attributes
are indeed in the schema.

This ensures we use the schema case, not the user supplied case for
future responses, which assists any (incorrect, but possible) case
sensitive processing on a client.

I've also removed more of the subtle 'schema &&' that metze objected
to in the for loops, moving to a much more explicit 'if (schema)'.

Andrew Bartlett
(This used to be commit bfc96fff063e7cc278755c043b9da0ed4b75a615)
2007-12-21 05:43:45 +01:00
Andrew Bartlett
47f6988c6d r25753: Move cn=rootdse to @ROOTDSE to avoid being caught up in schema restrictions.
Andrew Bartlett
(This used to be commit f3390c9054244c0e4381007b36bbac9a17800570)
2007-12-21 05:43:45 +01:00
Andrew Bartlett
16d0395047 r25750: Update the objectclass module to improve consistency in Samba4.
The aim here is to ensure that if we have

CN=Users,DC=samba,DC=example,DC=com

that we cannot have a DN of the form

cn=admin ,cn=useRS,DC=samba,DC=example,DC=com

This module pulls apart the DN, fixes up the relative DN part, and
searches for the parent to copy the base from.

I've used the objectclass module, as I intend to also validate the
placement of child objects, by reading the allowedChildClasses virtual
attribute.

In the future, I'll also force the attribute names to be consistant
(using the case from the schema).

Andrew Bartlett
(This used to be commit c0a0c69ac5a81cfcb7c7d5ba38db59f8686c30ab)
2007-12-21 05:43:43 +01:00
Andrew Bartlett
bb96624d68 r25749: Add function required by linked_attributes module.
Andrew Bartlett
(This used to be commit cd6409478744b9755c3a048d8d411dbe99f977f0)
2007-12-21 05:43:42 +01:00
Andrew Bartlett
fa5c16944e r25748: Don't segfault if we don't have a schema yet.
Andrew Bartlett
(This used to be commit 388e15a4c1fab55d376be956c2a7168b946bc994)
2007-12-21 05:43:41 +01:00
Andrew Bartlett
7c721a1f49 r25747: Implement linked attributes, for add operations.
Much more work is still required here, particularly to handle this
better during the provision, and to handle modifies and deletes, but
this is a start.

Andrew Bartlett
(This used to be commit 2ba99d58e9fe1f8e4b15a58a2fdfce6e876f99b4)
2007-12-21 05:43:41 +01:00
Andrew Bartlett
33201d1df2 r25729: Fix silly regression in the subtree_rename - I broke normal renames.
Bug 5041

Andrew Bartlett
(This used to be commit 7e68051bb7a9ac5f1b232c32b7614db61c3c1bc4)
2007-12-21 05:43:31 +01:00
Andrew Bartlett
1f680ef45d r25723: Add a check to prevent deletion of entries with children. Sadly MMC
doesn't trigger it's recursive delete correctly, but the error return
is correct (but perhaps needs a different LDAP wire format).

Andrew Bartlett
(This used to be commit 10ba3ae6990098e772683de9144b13b3f1d45a36)
2007-12-21 05:43:29 +01:00