1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-23 09:57:40 +03:00

568 Commits

Author SHA1 Message Date
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
Andrew Bartlett
5cfa773202 r25710: Finally fix subtree renames. Untested code is broken code and in this
case an oddity of the javascript caused the test to 'pass'.

For the same oddity, we have a failure in ldb's handling of spaces in
DNs.  We need to resolve that too.

Andrew Bartlett
(This used to be commit e8cbac1a46f4d3b083e6bb5a509ef1ba47bebff1)
2007-12-21 05:43:24 +01:00
Andrew Bartlett
c2e5cf6e31 r25705: Ensure we return the out value to the caller.
Andrew Bartlett
(This used to be commit 3434262ad74c366ac58319c70880ca50898fa78c)
2007-12-21 05:43:22 +01:00
Andrew Bartlett
35dc4d9999 r25704: Handle the chicken-and-egg problem of setting up the LDB before we get
a schema.  perhaps i need to look into metze's 'load a schema from
ldif' code.

Andrew Bartlett
(This used to be commit f350ef5f19ec755c93c6c09210cdf276d1b66877)
2007-12-21 05:43:22 +01:00
Andrew Bartlett
c4ebf9587f r25702: Clarify comments and make this module more strict on objectclasses.
This is becoming the schema module...

Andrew Bartlett
(This used to be commit ecea817a3e793f8ac0187dd83a29e62a7d645868)
2007-12-21 05:43:21 +01:00
Andrew Bartlett
7619978553 r25701: Clarify comment
(This used to be commit cea496d2163db6dde371526dd5a79d4c090839ef)
2007-12-21 05:43:20 +01:00
Andrew Bartlett
21c65d93eb r25693: Implement the rest of subtree renames, now that tridge waved his magic
over the ldb_tdb part of the problem.

Andrew Bartlett
(This used to be commit daca0cfd2fc2ec3344415d2d31f399ee3bf16151)
2007-12-21 05:43:17 +01:00
Jelmer Vernooij
05e7c48146 r25553: Convert to standard bool type.
(This used to be commit b7371f1a191fb86834c0d586d094f39f0b04544b)
2007-10-10 15:07:54 -05:00
Günther Deschner
f5c546145e r25531: Merge GTYPE_SECURITY_UNIVERSAL_GROUP from samba3.
Guenther
(This used to be commit 5c9d755f52c8fffe93efd9543a1381a3a06ef8f9)
2007-10-10 15:07:48 -05:00
Jelmer Vernooij
2f3551ca7c r25446: Merge some changes I made on the way home from SFO:
2007-09-29 More higher-level passing around of lp_ctx.
2007-09-29 Fix warning.
2007-09-29 Pass loadparm contexts on a higher level.
2007-09-29 Avoid using global loadparm context.
(This used to be commit 3468952e771ab31f90b6c374ade01c5550810f42)
2007-10-10 15:07:34 -05:00
Jelmer Vernooij
60a1046c5c r25430: Add the loadparm context to all parametric options.
(This used to be commit fd697d77c9fe67a00939a1f04b35c451316fff58)
2007-10-10 15:07:31 -05:00
Jelmer Vernooij
37d53832a4 r25398: Parse loadparm context to all lp_*() functions.
(This used to be commit 3fcc960839c6e5ca4de2c3c042f12f369ac5f238)
2007-10-10 15:07:25 -05:00
Andrew Bartlett
4870c0dd00 r25268: Thanks to Andrew Kroeger for pointing out on IRC that this is
compleatly dead code.

Andrew Bartlett
(This used to be commit 5838aca79b11fd8a94567a04c1c1a99bc4343547)
2007-10-10 15:07:03 -05:00
Andrew Bartlett
afb0849afe r25249: Thanks to Andrew Kroeger for pointing out this silly typo (calling
end_transaction in delete_tranaction would be very much the wrong
thing to do) in the update_keytab module.

Andrew Bartlett
(This used to be commit aad9545ca12bc8a3aeaf5cc870d137d89c34bb39)
2007-10-10 15:06:59 -05:00
Andrew Bartlett
08c97435d3 r25194: A major rework of the Samba4 LSA LookupNames and LookupSids code, with
a new torture suite to match.

This should fix bug #4954 by Matthias Wallnöfer <mwallnoefer@yahoo.de>

Previously we had no knowlege of BUILTIN or well-known names.

This code needs expansion to check with winbind for trusted domains.

Andrew Bartlett
(This used to be commit e6fc0e1f54ad64bdddc88e9ebd0d8d181b6ce26a)
2007-10-10 15:06:51 -05:00
Jelmer Vernooij
7d1698d4bb r25101: Directly depend on drsblobs - can't rely on having it in via ldb.
(This used to be commit 6b4a21e1abd35c33d7a57084a86607bfa72ad3b1)
2007-10-10 15:06:37 -05:00
Jelmer Vernooij
98b57d5eb6 r25035: Fix some more warnings, use service pointer rather than service number in more places.
(This used to be commit df9cebcb97e20564359097148665bd519f31bc6f)
2007-10-10 15:05:43 -05:00
Jelmer Vernooij
ffeee68e4b r25026: Move param/param.h out of includes.h
(This used to be commit abe8349f9b4387961ff3665d8c589d61cd2edf31)
2007-10-10 15:05:38 -05:00
Jelmer Vernooij
959915a8cb r25001: Fix more C++ and other warnings, fix some of the indentation with ts=4 lines that I accidently added earlier.
(This used to be commit 0bcb21ed740fcec0f48ad36bbc2deee2948e8fc7)
2007-10-10 15:05:28 -05:00
Jelmer Vernooij
cd962355ab r25000: Fix some more C++ compatibility warnings.
(This used to be commit 08bb1ef643ab906f1645cf6f32763dc73b1884e4)
2007-10-10 15:05:27 -05:00
Andrew Bartlett
1d95a18a9b r24986: LDB has a function for comparing things that must meet the rules of
attribute names.

Andrew Bartlett
(This used to be commit 46e387580622bd6d5d621399e08c5d5003c91bbf)
2007-10-10 15:05:23 -05:00
Andrew Bartlett
bb84655d65 r24941: Simplify samdb_result_nttime(), and remove nttime_from_string()
Andrew Bartlett
(This used to be commit bcd994a139e2e8fb2e97c8b897c987ff234e0b0a)
2007-10-10 15:03:40 -05:00
Andrew Bartlett
6a92d816a7 r24918: Fix the build (forgot to include dcesrv_lsa.c in the previous commit)
and improve error strings returned from samdb.c

Andrew Bartlett
(This used to be commit a42d0eb531e663304bea840d614b2f91f95dd818)
2007-10-10 15:03:38 -05:00
Andrew Bartlett
8294016a1b r24914: In response to bug #4892 by Matthias Wallnöfer <mwallnoefer@yahoo.de>,
allow the objectclass module to reconstruct the objectclass hierarchy,
rather than using templates.

The issue being fixed in particular is that 'top' was not being set on
containers.

This should ensure we do this right for all objects.

Andrew Bartlett
(This used to be commit d17a0058ba8492b8b3f81b6f10fc34b3e45bb8a6)
2007-10-10 15:03:37 -05:00
Andrew Bartlett
50017a0075 r24793: The subtree_rename module is a work of fiction. An resemblance to a
working module, live or dead, is purely co-incidental.

Andrew Bartlett
(This used to be commit 64cc31642fd2ded149631d07bc022213f19595b8)
2007-10-10 15:03:10 -05:00
Jelmer Vernooij
0b91f39164 r24780: More work allowing libutil to be used by external users.
(This used to be commit 31993cf67b816a184a4a4e92ef8ca2532c797190)
2007-10-10 15:03:10 -05:00