1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +03:00
Commit Graph

20784 Commits

Author SHA1 Message Date
Andrew Tridgell
19e515aac7 s4-repl: added request for RID allocation in drepl task
The drepl task now checks to see if our rIDAllocationPool is
exhausted, and if it is then we queue a extended operation
DsGetNCChanges call to ask the RID Manager to give us a new allocation
pool.

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-01-08 13:03:00 +11:00
Andrew Tridgell
8cd2bedee7 s4-dsdb: added dsdb_find_guid_attr_by_dn()
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-01-08 13:03:00 +11:00
Andrew Tridgell
37340d5a2e s4-ridalloc: copy with missing rIDNextRid and rIDAllocationPool
The attributes rIDNextRid and rIDAllocationPool are not replicated, so
their initial value when we first get a RID Set from the RID Manager
is blank.

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-01-08 13:03:00 +11:00
Andrew Tridgell
45550f83f0 s4-dsdb: added dsdb_module_set_integer()
This will be used by ridalloc.c

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-01-08 13:03:00 +11:00
Andrew Tridgell
c12b9ab2f2 s4-dsdb: clarify who is responsible for each attribute
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-01-08 13:03:00 +11:00
Andrew Tridgell
dd8cb3c7ed s4-dsdb: fixed usage of rIDAllocationPool and rIDPreviousAllocationPool
These are very badly named attributes! See the comments in ridalloc.c
for a explanation of what they really seem to mean

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-01-08 13:03:00 +11:00
Andrew Tridgell
5136438ad6 s4-dsdb: implement refresh of RID Set pool for a local RID Manager
when we run out of RIDs in our RID Set pool then grab a new one from
the RID Manager object

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-01-08 13:03:00 +11:00
Andrew Tridgell
53d10d139e s4-provision: don't hard wire the creation of the RID Set object
We now create it automatically in the samldb module when the first
user is created. 

The creation of the dns user also had to move to the _modify.ldif as
it now relies on the fSMO role being setup for the RID Manager

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-01-08 13:03:00 +11:00
Andrew Tridgell
1053ce529d s4-dsdb: implement creation of the RID Set object
when we are the RID Manager we can create our own RID Set object when
the first user is created
2010-01-08 13:02:59 +11:00
Andrew Tridgell
439ee5aaae s4-dsdb: use dsdb_next_callback()
We can't just use the callers callback directly otherwise the
ldb_module_done() is never called on the parent request, as the child
request is passed to the callback.

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-01-08 13:02:59 +11:00
Andrew Tridgell
d0bd6e7ea5 s4-dsdb: added dsdb_next_callback()
This should be used when you create a sub request and just want the
parent requests callback to be called when done.

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-01-08 13:02:59 +11:00
Andrew Tridgell
e6f14ac2c4 s4-dsdb: added dsdb_module_constrainted_update_integer()
This provides a convenient way to update a integer attribute with a
constrained delete/add

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-01-08 13:02:59 +11:00
Andrew Tridgell
f24011059b s4-dsdb: added dsdb_module_reference_dn()
This adds a module callable version of samdb_reference_dn(), which
finds a DN via a reference link

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-01-08 13:02:59 +11:00
Andrew Tridgell
f137f93e09 s4-dsdb: added dsdb_module_add()
added a ldb add function for modules

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-01-08 13:02:59 +11:00
Andrew Tridgell
fcfb5d7b63 s4-provision: allow provision modifies to add records
we need to recognise a changetype of 'add'
2010-01-08 13:02:59 +11:00
Andrew Tridgell
226460d543 s4-dsdb: move the RID allocation logic into ridalloc.c
This will end up having the RID Manager logic as well, so all the RID
pool allocation logic is in one spot

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-01-08 13:02:58 +11:00
Andrew Tridgell
7f90a05c66 s4-samldb: use RID Set to allocate user/group RIDs
This is the first step towards DRS-friendly RID allocation. We now get
the next rid from the RID Set object

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-01-08 13:02:58 +11:00
Andrew Tridgell
5eb3b919c5 s4-provision: the DC object itself needs a fixed objectSID
We can't allocate a objectSID until we have rIDSetReferences, but that
is in the DC object, so we have to force the objectSID of the DC

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-01-08 13:02:58 +11:00
Andrew Tridgell
2bad107aa1 s4-dsdb: added samdb_rid_set_dn()
This returns the DN of our RID Set object

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-01-08 13:02:58 +11:00
Andrew Tridgell
a1362492ab s4-provision: added an initial RID Set
We will allocate RIDs from this set

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-01-08 13:02:58 +11:00
Andrew Tridgell
bd6d0e9379 s4-ldb: added nice ldif display of 64 bit ranges for RIDs 2010-01-08 13:02:58 +11:00
Andrew Tridgell
fbc3a0fe62 s4-dsdb: added samdb_reference_dn()
This returns a 'reference' DN, which is a link to a DN, from the
specified object. It is then used by samdb_server_reference_dn() which
returns the serverReference DN, and samdb_rid_manager_dn() which
returns the rIDManagerReference DN.
2010-01-08 13:02:58 +11:00
Jelmer Vernooij
c915bd8718 linked_attributes: Fix missing dependency on util. 2010-01-08 01:31:21 +01:00
Tim Prouty
57be1d07af s4 torture: Add RAW-OPEN-NTCREATEDIR to test error checking for open directories as files 2010-01-07 15:32:27 -08:00
Steven Danneman
71a40d7e2c s4/torture: fix small bug in lock test
Cleanup path should unlock, not cancel existing locked range.
2010-01-06 18:48:10 -08:00
Steven Danneman
655bdb19bd s4/torture: add more lock cancellation tests
* Test the SMB1 behavior when multiple lock ranges are requested, pend,
  and then are cancelled.  The entire LockingAndX request fails.
2010-01-06 18:48:10 -08:00
Günther Deschner
3dbe8603d9 s4-smbtorture: add test_ChangeID to RPC-SPOOLSS.
This tests ChangeID consistency between spoolss_GetPrinterData,
spoolss_GetPrinterDataEx and spoolss_GetPrinter (level 0).

Guenther
2010-01-06 22:09:37 +01:00
Günther Deschner
7568f49134 s4-smbtorture: add test_SetPrinter to RPC-SPOOLSS.
Guenther
2010-01-06 22:09:36 +01:00
Günther Deschner
0457cf915b s4-smbtorture: refactor test_GetPrinter in RPC-SPOOLSS.
Guenther
2010-01-06 22:09:36 +01:00
Kamen Mazdrashki
a2044b9a61 s4: Fix result check for getaddrinfo()
I think this completes commit 50feca550e.
Now result should be handled correctly both for systems that
support EAI_NODATA but returns EAI_NONAME (as my Ubuntu 9.x)
and systems that doesn't support EAI_NODATA at all.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2010-01-06 14:26:32 +01:00
Matthias Dieter Wallnöfer
a08a0ffd37 s4:SAMLDB LDB module - Fix trailing whitespaces 2010-01-05 20:55:47 +01:00
Matthias Dieter Wallnöfer
77ce33c419 s4:SAMLDB LDB module - Rework to allow checks for wrong "defaultObjectCategory" attributes
This allows a stricter check for "defaultObjectCategory" attributes which is
performed when the "relax" control isn't specified.
Additional note: As the added comment points out this isn't complete.
And I personally think that moving this at some point to the "objectclass"
module is a better idea to make this fully work (since there we have direct
access to the schema). If someone has a good idea how to do this please inform
me.

Anyway, the SAMLDB module does require some restructure since at the moment it's
very overloaded and therefore a bit a mess. In the meantime I started to work
on a new approach to realise it in a better way.
2010-01-05 20:55:47 +01:00
Matthias Dieter Wallnöfer
c051008540 s4:schema_load.c - Typo 2010-01-05 20:55:46 +01:00
Matthias Dieter Wallnöfer
bbf9885013 s4:ldap_schema.py - add an additional check for validity of "defaultObjectCategory" 2010-01-05 20:55:45 +01:00
Matthias Dieter Wallnöfer
d8ca002a8c s4:ldap_schema.py - Move generated attributes check
Make more clear that they're created before the "schemaUpdateNow".
2010-01-05 20:55:32 +01:00
Jeremy Allison
2a66db8f93 Fix the merged build. Probably not strictly correct but allows us to "make test".
Jeremy.
2010-01-04 13:27:48 -08:00
Stefan Metzmacher
f04e10f4c0 s4:dsdb/repl: convert dreplsrv_out_drsuapi_send/recv to tevent_req
metze
2010-01-04 09:36:25 +01:00
Stefan Metzmacher
a06e5cdb99 s4: Happy New Year 2010
metze
2010-01-04 08:42:49 +01:00
Andrew Tridgell
504754856e s4-dsdb: force REVISION_ADS for new and updated ACLs in dsdb
w2k8-r2 gives a "schema mismatch" error if the revision is not set to
REVISION_ADS and you replicate the ntsecuritydescriptor using DRS.

Nadya, please check this!

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-01-02 17:28:36 +11:00
Andrew Tridgell
e809b721e9 s4-drs: don't give an error on repsTo delete if add is also specified
w2k8-r2 in dcpromo asks for a delete+add during its initial join.
2010-01-02 17:28:35 +11:00
Andrew Tridgell
0bc902ac84 s4-sddl: DRS replication needs REVISION_ADS for SDs
DRS replication with w2k8-r2 fails with a schema mismatch error if we
set the revision to NT4
2010-01-02 17:28:35 +11:00
Jelmer Vernooij
a214ebc3d6 ldb: Fix the standalone ldb build. 2010-01-02 02:40:30 +01:00
Andrew Tridgell
00b39c70f5 s4-dsdb: switched to using RMD_FLAGS instead of DELETED in extended DNs
This allows for more flags in the future
2010-01-02 08:16:57 +11:00
Andrew Tridgell
cced567364 s4-kcc: added a preiodic task to remove deleted objects
we check for deleted objects in each partition every 10 minutes, using
onelevel searches
2010-01-02 08:16:56 +11:00
Andrew Tridgell
08bad38035 s4-dsdb: fixed several memory leaks
need to be careful with those temporary contexts
2010-01-02 08:16:56 +11:00
Andrew Tridgell
031460b8a2 s4-dsdb: fixed samdb_create_foreign_security_principal() to use the wellknown GUID
This also fixes a memory leak
2010-01-02 08:16:56 +11:00
Andrew Tridgell
335af02218 s4-ldb: fixed valgrind error: ares can be freed by callback 2010-01-02 08:16:56 +11:00
Andrew Tridgell
8eaed073a7 s4-dsdb: make sure 'whenChanged' is set on modify
We also should preserve (and then replace) whenChanged on delete
2010-01-02 08:16:56 +11:00
Andrew Tridgell
9819d280d6 s4-dsdb: added dsdb_tombstone_lifetime() 2010-01-02 08:16:56 +11:00
Andrew Tridgell
23eb9f49a7 s4-dsdb: allow system to remove deleted objects
This will be used by a periodic job to remove tombstoned objects
2010-01-02 08:16:56 +11:00