1
0
mirror of https://github.com/samba-team/samba.git synced 2025-10-29 04:23:51 +03:00
Commit Graph

596 Commits

Author SHA1 Message Date
Jelmer Vernooij
f6420d933b r26316: Use contexts for conversion functions. 2007-12-21 05:48:30 +01:00
Andrew Bartlett
b0de08916e r26298: Use metze's schema loading code to pre-initialise the schema into the
samdb before we start writing entries into it.

In doing so, I realised we still used 'dnsDomain', which is not part
of the standard schema (now removed).

We also set the 'wrong' side of the linked attributes for the
masteredBy on each partition - this is now set in provision_self_join
and backlinks via the linked attributes code.

When we have the schema loaded, we must also have a valid domain SID
loaded, so that the objectclass module works.  This required some ejs
glue.

Andrew Bartlett
2007-12-21 05:48:15 +01:00
Andrew Bartlett
47422b5e59 r26297: Correct error message. This function verifies attributes, not
objectclasses.

Andrew Bartlett
2007-12-21 05:48:14 +01:00
Andrew Bartlett
1dc771f903 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
2007-12-21 05:48:08 +01:00
Andrew Bartlett
7d1169b52b r26283: fix typo 2007-12-21 05:48:08 +01:00
Andrew Bartlett
9ac7f4f609 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
2007-12-21 05:48:07 +01:00
Jelmer Vernooij
e9875fcd56 r26271: Remove some more uses of global_loadparm. 2007-12-21 05:47:53 +01:00
Jelmer Vernooij
e52710d679 r26270: Require specifying the loadparm_context or NULL to cli_credentials_guess(). 2007-12-21 05:47:50 +01:00
Jelmer Vernooij
7280c1e941 r26252: Specify loadparm_context explicitly when creating sessions. 2007-12-21 05:47:29 +01:00
Andrew Bartlett
c789a91e00 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
2007-12-21 05:47:23 +01:00
Jelmer Vernooij
1386c5c925 r26237: Add loadparm context to the server service interface. 2007-12-21 05:47:15 +01:00
Jelmer Vernooij
e903978220 r26235: Avoid global_loadparm. 2007-12-21 05:47:13 +01:00
Jelmer Vernooij
84892d030d r26234: More global_loadparm fixes. 2007-12-21 05:47:12 +01:00
Jelmer Vernooij
7780bf285f r26233: Pass loadparm context when creating krb5 contexts. 2007-12-21 05:47:11 +01:00
Jelmer Vernooij
37d05fdc7b r26229: Set loadparm context as opaque pointer in ldb, remove more uses of global_loadparm. 2007-12-21 05:47:06 +01:00
Jelmer Vernooij
ba75f1613a r26228: Store loadparm context in auth context, move more loadparm_contexts up the call stack. 2007-12-21 05:47:05 +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
833dfc2f2a 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
2007-12-21 05:46:44 +01:00
Andrew Bartlett
65d17f0ad7 r26182: Extend our linked attribute testsuite to cover many more possible
modifications, and then extend our implementation to match.

Andrew Bartlett
2007-12-21 05:46:38 +01:00
Andrew Bartlett
d41f34e979 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
2007-12-21 05:46:20 +01:00
Andrew Bartlett
4a8a1003f3 r26138: Don't talloc_free() res if an error occoured.
Andrew Bartlett
2007-12-21 05:46:19 +01:00
Andrew Bartlett
a7be80766f 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
2007-12-21 05:46:19 +01:00
Jelmer Vernooij
abf2600a04 r26136: Attempt to fix dependencies for auth. 2007-12-21 05:46:18 +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
Jelmer Vernooij
28f05bb5ef r26006: Improve some dependencies. 2007-12-21 05:45:41 +01:00
Jelmer Vernooij
44529b2446 r26005: Notice the user about LD_LIBRARY_PATH or equivalent when building with shared libs. 2007-12-21 05:45:41 +01:00
Jelmer Vernooij
56dfcb4f2f r26003: Split up DB_WRAP, as first step in an attempt to sanitize dependencies. 2007-12-21 05:45:40 +01:00
Andrew Bartlett
0a44b8e9f3 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
2007-12-21 05:45:27 +01:00
Andrew Bartlett
be6ef043a3 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
2007-12-21 05:45:17 +01:00
Andrew Bartlett
f0a0d73f76 r25949: Make error messages clearer and more correct.
Andrew Bartlett
2007-12-21 05:45:13 +01:00
Andrew Bartlett
d3894c90f3 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
2007-12-21 05:45:11 +01:00
Andrew Bartlett
c8d1ab3084 r25941: Use samdb_relative_path() (new function in samdb.c) in the partitions
module.

Andrew Bartlett
2007-12-21 05:45:11 +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
Stefan Metzmacher
6223c7fddc 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
2007-12-21 05:45:02 +01:00
Andrew Bartlett
0377d85bbd 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
2007-12-21 05:44:41 +01:00
Jelmer Vernooij
9d73becbb2 r25887: Build Samba-specific ldb modules as dso's. 2007-12-21 05:44:40 +01:00
Stefan Metzmacher
f8bc6b9ad0 r25839: use nss_wrapper code in samba4 if
--enable-nss-wrapper or --enable-developer is given

metze
2007-12-21 05:44:20 +01:00
Andrew Bartlett
c66e188e67 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
2007-12-21 05:43:59 +01:00
Andrew Bartlett
9cc706e060 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
2007-12-21 05:43:58 +01:00
Andrew Bartlett
56d9dd5140 r25781: Handle and test linked attribute renames.
Andrew Bartlett
2007-12-21 05:43:56 +01:00
Stefan Metzmacher
7b77210d3e r25780: fix bool return
metze
2007-12-21 05:43:55 +01:00
Andrew Bartlett
c6a6246fbd r25763: Handle modifies, in the easy case (add/delete of elements), for the
linked attributes.

Andrew Bartlett
2007-12-21 05:43:48 +01:00
Andrew Bartlett
16a292fcb1 r25762: This test belongs best with the other checks for a valid parent, in
the objectclass module.

Andrew Bartlett
2007-12-21 05:43:47 +01:00
Andrew Bartlett
958a92ed0c 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
2007-12-21 05:43:47 +01:00
Andrew Bartlett
2a835d900f r25755: Fix a couple of memory leaks, in particular a new leak onto the NULL
context caused by my objectclass module work.

Andrew Bartlett
2007-12-21 05:43:46 +01:00
Andrew Bartlett
bfc96fff06 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
2007-12-21 05:43:45 +01:00
Andrew Bartlett
f3390c9054 r25753: Move cn=rootdse to @ROOTDSE to avoid being caught up in schema restrictions.
Andrew Bartlett
2007-12-21 05:43:45 +01:00
Andrew Bartlett
c0a0c69ac5 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
2007-12-21 05:43:43 +01:00
Andrew Bartlett
cd64094787 r25749: Add function required by linked_attributes module.
Andrew Bartlett
2007-12-21 05:43:42 +01:00
Andrew Bartlett
388e15a4c1 r25748: Don't segfault if we don't have a schema yet.
Andrew Bartlett
2007-12-21 05:43:41 +01:00