1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-25 17:57:42 +03:00

1144 Commits

Author SHA1 Message Date
Andrew Tridgell
44a99898ed s4-dsdb: fixed empty structure error on solaris8
Nadya, I'm guessing you plan on adding some real elements to this
structure later. For now I've added _dummy so the build can continue
with the Solaris C compiler.
2009-10-20 13:00:12 +11:00
Matthias Dieter Wallnöfer
0ef7c22b5d s4:password_hash LDB module - substitute "lp_workgroup" with "lp_sam_name"
According to abartlet's response on my post about "lp_workgroup" this should be
the right call.
2009-10-19 18:25:05 +02:00
Matthias Dieter Wallnöfer
85e4995364 s4:sites - get the server site (name) from DSDB 2009-10-18 14:33:43 +02:00
Andrew Tridgell
30be3fd143 s4-privileges: moved privileges to private/privilege.ldb
We were storing privileges in the sam, which was OK when we were a
standalone DC, but is no good when we replicate with a windows DC.

This moves the privileges to a separate (local) database
2009-10-17 13:01:02 +11:00
Kamen Mazdrashki
784e0c199e s4/drs: prefixMap module initial definition 2009-10-16 12:54:14 +03:00
Kamen Mazdrashki
40a8a22684 s4/drs: Propagate redefinition of drsuapi_DsReplicaOID into code base
The biggest change is that 'oid' field is transmited in binary format.
Also the field name is changed to 'binary_oid' so that
field format to be clear for callers.

After those changes, Samba4 should work the way it works before -
i.e. no added value here but we should not fail when
partial-oid is part of prefixMap transmited from Win server.

Also, thre is a bug in this patch - partial-binary-OIDs are
not handled correctly. Partial-binary-OIDs received during
replication will be encoded, but not handled correctly.
2009-10-16 12:54:14 +03:00
Andrew Tridgell
fdeeafb481 s4-dsdb: implement limit on rDN length
w2k8 imposes a limit of 64 characters on the rDN
2009-10-15 15:54:20 +11:00
Andrew Tridgell
94897d7a7c s4-dsdb: added samdb_rodc() and samdb_ntds_options()
Later we will need to make samdb_rodc() look in the database, but for
now we should at least have the function in a central place
2009-10-15 08:20:37 +11:00
Matthias Dieter Wallnöfer
5931734be6 s4:password_hash - load the domain parameters from the "loadparm context"
And don't cut them out from the DNS hostname.
2009-10-14 11:49:04 +02:00
Matthias Dieter Wallnöfer
e9686985cb s4: Changes the old occurences of "lp_realm" in "lp_dnsdomain" where needed
For KERBEROS applications the realm should be upcase (function "lp_realm") but
for DNS ones it should be used lowcase (function "lp_dnsdomain"). This patch
implements the use of both in the right way.
2009-10-14 10:50:43 +02:00
Matthias Dieter Wallnöfer
8b67e1ab70 s4:objectclass ldb module - Check for empty messages
I think the check for empty messages fits best here.
2009-10-12 17:35:52 +02:00
Andrew Bartlett
d511d889a0 s4:schema Add some error checking to the schema load 2009-10-12 16:51:03 +11:00
Andrew Bartlett
aee3c19015 s4:dsdb Make dsdb_read_prefixes_from_ldb static 2009-10-12 16:51:03 +11:00
Andrew Bartlett
c9f70fc3c7 s4:dsdb Search for the schema with dsdb_module_search(), in schema_fsmo
This avoids using an ldb_search(), which would run from the top of the
module stack.  This will help us load the schema before the partitions
are initialised.

Andrew Bartlett
2009-10-12 16:51:02 +11:00
Andrew Bartlett
1e5562ff04 s4:dsdb Add new functions to help modules do an ldb_search()
These take an ldb_module argument, and avoid doing the search from the
top of the stack again.

(This will help when modules are initialised before being added to the
partition set)

Andrew Bartlett
2009-10-12 16:50:50 +11:00
Andrew Bartlett
1dfa2ed423 s4:provision Remove all references to samba4LocalDomain
This was a bad idea all along, as Simo said at the time.  With the
full MS schema and enforcement of it, it is an even worse idea.

This fixes the provision of the member server in 'make test'

Andrew Bartlett
2009-10-12 16:50:49 +11:00
Matthias Dieter Wallnöfer
607ceff234 s3/s4 - Adapt the IDL changes on various locations 2009-10-08 09:50:19 +02:00
Matthias Dieter Wallnöfer
75eff6eaf3 s4:subtree_delete - Make the initialisation of the child counter more clear 2009-10-08 00:18:07 +02:00
Andrew Tridgell
b3377ef2ea s4-drs: fixed a memory error introduced yesterday
ids is retrurned via _ids, so it needs to be on the passed in mem_ctx
2009-10-07 16:20:16 +11:00
Matthias Dieter Wallnöfer
8536e1b947 s4:various LDB modules - "build_request" functions - propagate result codes back
It's very useful to know the exact result code when something fails and not
only a generic (by the module) created one.
Sure, there are some exception cases with specific results (special message
constellations, attributes, values...) which shouldn't be changed at all
(examples of them are in the "ldap.py" test). Therefore I looked very
carefully to not change them.
2009-10-06 19:41:16 +02:00
Matthias Dieter Wallnöfer
0d7c34a5b4 s4:rootdse module - intendation fixup 2009-10-06 19:37:53 +02:00
Matthias Dieter Wallnöfer
b87769c9a9 s4:acl module - intendation fix and comment enhancement 2009-10-06 19:37:26 +02:00
Andrew Tridgell
b43479741a s4-repl: added RELAX control and fix transactions
Added the RELAX control to dsdb_origin_objects_commit(), as it needs
to modify system objects. This patch also fixes the use of ldb
transactions in that function, and fixes a memory leak.
2009-10-06 18:55:14 +11:00
Matthias Dieter Wallnöfer
24422fae24 s4:objectclass - Free unused memory from responses 2009-10-03 15:49:40 +02:00
Matthias Dieter Wallnöfer
cb143eafef s4:schema_inferiors - Fix wrong check 2009-10-03 15:49:40 +02:00
Andrew Bartlett
4bc9a39eed s4:dsdb Use possibleInferiors to restrict creation of child objects
This also uses systemPossibleInferiors when the 'relax' control is
specified, which is done by the provision.

Andrew Bartlett
2009-10-03 12:37:55 +02:00
Andrew Bartlett
0e028fcb7d s4:dsdb add systemPossibleInferiors to schema code
This allows us to figure out what the system can add, which will not
be in possibleInferiors due to the systemOnly flag.

Andrew Bartlett
2009-10-03 12:37:55 +02:00
Andrew Bartlett
f86beaaad9 s4:dsdb Add objectClass and RDN constraints to objectClass module
These additional constraints are applied, found by the Microsoft testsuite.

 - When the parent is not present, we now return 'NO_SUCH_OBJECT'.
 - Restrict the choice of RDN to the correct one per the schema
 - Honour the allowedChildClasses attribute from the parent's objectClass.

Andrew Bartlett
2009-10-03 12:37:49 +02:00
Matthias Dieter Wallnöfer
90828cc702 s4:dsdb Don't allow creation of systemOnly objectclasses
(except as part of the provision, which specifies the 'relax' control)

Andrew Bartlett
2009-10-03 10:52:53 +02:00
Matthias Dieter Wallnöfer
2ab27d78b0 s4:repl_meta_data - various
- Add more "talloc_free"s and right error values where needed
- Add a pre-lookup for entries before searching for metadata attribute
  (also suggested by TODO list)
- Now the most part of "ldap.py" works again
2009-10-02 23:28:52 +02:00
Andrew Bartlett
e6d8226745 s4:dsdb Return correct error on invalid attribute
This error per the Microsoft testsuite
2009-10-02 17:57:12 +02:00
Andrew Bartlett
ab9c232066 s4:dsdb Pass down the exact error code on failure in repl_meta_data 2009-10-02 17:49:46 +02:00
Matthias Dieter Wallnöfer
2cbff7496e s4:samdb_set_password - Return the maximum password age when requested (not the minimum one) 2009-10-02 17:28:04 +02:00
Matthias Dieter Wallnöfer
6edb92f337 s4:samdb_set_password - cosmetic fixes 2009-10-02 17:27:30 +02:00
Matthias Dieter Wallnöfer
44df2488e3 s4: fix various warnings (not "const" related ones) 2009-10-02 15:33:48 +02:00
Andrew Bartlett
ff9fc4e4e0 s4:dsdb Fix crash from LDAP login of DOM\\
The issue here is that when we resolve DOM\\ into an NT4 name, we
would not initilise the nt4_account output.

Andrew Bartlett
2009-10-02 12:45:08 +02:00
Andrew Bartlett
984ea88156 s4:dsdb rework instanceType module - put instanceType in provision
The instanceType needs to be specified in future because that's how
the partitions are actually created.
2009-10-02 12:45:07 +02:00
Andrew Bartlett
1c71c09645 s4:dsdb Don't allow creating of new objects with an isDefunct schema class 2009-10-02 12:45:07 +02:00
Andrew Bartlett
46c2af3612 s4:dsdb Add 'lazy_commit' module to swallow the 'lazy commit' OID
This allows this control to be specified as critical.  We support the
control because we choose to always be durable in our transactions.

We really, really need a 'duplicate request' API, as at the
moment we can't do this without a large, error-prone set of code that
cannot cope with new request fields or types.

Andrew Bartlett
2009-10-02 12:45:06 +02:00
Matthieu Patou
8d7a987766 s4-ldb: Use relax control to check in replace metadata module if we accept request that specify objectGUID attribute. 2009-10-02 12:45:00 +02:00
Andrew Bartlett
642dd95d81 s4:Ensure the selected RDN is the right one per the schema
The relative DN must be the one that the most specific structural
objectclass specifies.

Andrew Bartlett
2009-10-02 12:44:58 +02:00
Andrew Tridgell
6159825845 s4-samldb: the samldb module requires that the primary group exists
We need to create Domain Users in the test ldb
2009-10-02 20:00:42 +10:00
Andrew Tridgell
48e5e215c9 s4-samdb: added some debugging
This helped track down the samba3sam.py failures
2009-10-02 20:00:08 +10:00
Matthias Dieter Wallnöfer
0227697bf4 s4:dsdb/common/sidmap - Remove
As metze pointed out - this seems to be completely dead code. I too didn't find
any dependencies in other code parts. Therefore remove it.
2009-10-02 14:22:49 +10:00
Andrew Tridgell
1726038708 s4-ldb: accept the binary DN OIDs in extended DN modules 2009-10-02 12:05:59 +10:00
Andrew Tridgell
fd22e03047 s4-ldb: Add support for binary blobs in DNs
AD has the concept of a DN prefixed with B:NN:XXXXXX: that contains a
binary blob. We need to support those in order to give correctly
formatted binary blobs for things like wellKnownObjects

This implementation is not ideal, as it allows for binary blobs on all
DNs, whereas it should only allow them on those with a syntax of
2.5.5.7. We should clean this up in the future, but meanwhile this
implementation at least gets us a working DC join of w2k8 to s4.

This patch also uses a static function for marking DNs as invalid,
which is very useful when debugging this code, as you can break on it
in gdb.
2009-10-02 12:03:05 +10:00
Matthias Dieter Wallnöfer
6637887373 s4:dsdb/common/util - remove introduced "samdb_is_capable_dc" call
I came up with a better solution which is invoked when we try to join a domain
as a DC (in file "libnet_become_dc.c"). Consider a following commit for this
patch.
2009-09-30 15:58:42 +02:00
Andrew Tridgell
4a230b5e6c s4-kcc: fixed corruption of repsFrom records by kcc
We were re-using a stack variable outside of the stack scope
2009-09-28 15:36:10 +10:00
Andrew Tridgell
0b0edbb606 s4-kcc: remove stale repsFrom entries in kcc run 2009-09-28 13:11:25 +10:00
Andrew Tridgell
f279b57f19 s4-dsdb: don't return the partition root objects
When searching across partitions, we want to avoid sending duplicate
records caused by the record appearing both as a mount point and as a
partition root in a nested partition. This patch works by intercepting
objects from searches and checking if they match a partition root. If
they do, and the partition is not the one in the partition control
request, then discard the object.
2009-09-28 13:11:21 +10:00