1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-12 09:18:10 +03:00
Commit Graph

27110 Commits

Author SHA1 Message Date
Dave Craft
1838e16f34 Add intrasite code test switch
kcc_service struct gets a intrasite_code
boolean that is filled in via parametric parameter
kccsrv:intrasite = [true/false] in smb.conf.   This
will allow us to continue to utilize old simple
KCC topology as continuing default while newer
intra-site topology matures further.

Signed-off-by: Andrew Tridgell <tridge@samba.org>

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Thu Jul 14 00:19:12 CEST 2011 on sn-devel-104
2011-07-14 00:19:12 +02:00
Dave Craft
c8413b3420 Add kccsrv_add_repsFrom() possibility of NULL res argument
We need the ability to utilize this function in a different
manner.  KCC intra-site topology has already vetted the
replica as being appropriate to produce a repsFrom from.
We do not want kccsrv_add_repsFrom() to produce further
checking as was the case for simple topology.   Thus if
we pass a NULL (res) parameter this extra check will
be skipped.

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-14 07:05:10 +10:00
Dave Craft
4b19415f5b Remove static to allow availability to other KCC files
kccsrv_replica_flags() and
kccsrv_add_repsFrom() need to be available to functions
outside kcc_periodic.c

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-14 07:05:10 +10:00
Dave Craft
f6c90dfeba kcc_connection invocation_id added to struct
Utilized by KCC to carry the invocation id of the NTDSDSA
that we are replicating the name context from.  Utilized
when NTDSConnection is created (much like dsa_guid tracks
the NTDSDSA objectGUID that we are replicating the name
context from).

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-14 07:05:10 +10:00
Dave Craft
4dea78d508 KCC NTDSConnection should utilize NTDSCONN_OPT_IS_GENERATED
Previously this set an explicit (0x1) value whereas it
can now utilize NTDSCONN_OPT_IS_GENERATED from flags.h

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-14 07:05:09 +10:00
Dave Craft
0d1c54ecaf Standalone samdb_ntds_site_settings_options() helper
A helper function for retrieving the ntds site settings
via standalone function call.  Used within KCC

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-14 07:05:09 +10:00
Dave Craft
b52246bf2f NTDSConnection and NTDSA Site setting flags
Flags that were missing from flags.h or were incorrectly
defined inline to the kcc_topology.c code (and thus unusable
elsewhere).   These are the NTDSConnection and NTDSDSA Site
settings flags.

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-14 07:05:09 +10:00
Andrew Tridgell
3dae32397a s4-dsdb: fixed the defaultObjectCategory to have a full GUID
this fixes the DN to have a full GUID for new objects

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Wed Jul 13 14:03:30 CEST 2011 on sn-devel-104
2011-07-13 14:03:30 +02:00
Andrew Tridgell
80c8f42f05 s4-dsdb: another special case for the "member" attribute
thanks to Matthias for his great test suite work!

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-07-13 12:51:05 +02:00
Andrew Bartlett
43c0a92d23 s4-dsdb Don't process deletion of member attributes here.
We don't need to compare the delete against the primaryGroupID check
here - that test is for adds.

Andrew Bartlett
2011-07-13 12:51:05 +02:00
Andrew Tridgell
014fca1069 dsdb: fixed special case of zero NTTIME
we can't convert 0 NTTIME via a unix time_t

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-07-13 12:51:05 +02:00
Andrew Tridgell
fc476ec8ac dbcheck: use samdb_schema for getting the backlink
this is not available on an ldap samdb

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-07-13 12:51:05 +02:00
Andrew Tridgell
2087eb1602 ldb: use base searches for @ special DNs
subtree searches on these DNs don't work any more

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-07-13 12:51:05 +02:00
Andrew Tridgell
eb7c2af83b dbcheck: only do the provision dbcheck if there are objects to check
when in FILL_DRS mode, there are no objects to check yet

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-07-13 12:51:05 +02:00
Andrew Tridgell
182fd31be5 s4-provision: fixed the GUIDs in the provision using dbcheck
some DNs are are not setup with GUIDs during the provision because of
circular dependencies between objects. This adds a dbcheck pass to the
provision to fix those DNs

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-07-13 12:51:05 +02:00
Andrew Tridgell
afe4b77d35 s4-dsdb: fixed modify of ACLs on deleted objects
this is needed for the dbcheck code

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-07-13 12:51:05 +02:00
Andrew Tridgell
303b57c295 dbcheck: only fix replPropertyMetaData if we included it in the search
if we didn't find a replPropertyMetaData attribute at all then don't
try fixing it

Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com>
2011-07-13 12:51:05 +02:00
Andrew Tridgell
5064d73672 dbcheck: added checks for missing and orphansed backlinks
this checks for missing backlinks or backlinks without a forward link
and optionally fixes them

Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com>
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-07-13 12:51:05 +02:00
Andrew Tridgell
b66c57751a s4-dsdb: raise debug level for backlink errors
when dbcheck is fixing missing backlinks we don't want a DEBUG 0
message

Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com>
2011-07-13 12:51:05 +02:00
Andrew Tridgell
534c1ca00e dbcheck: fixed ldap check with no database specified
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com>
2011-07-13 12:51:05 +02:00
Andrew Tridgell
0ab3086b46 dbcheck: added --reindex option
this allows you to force a reindex of the database

Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com>
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-07-13 12:51:05 +02:00
Andrew Tridgell
6bc1957a54 samba-tool: fixed ldapcmp to run as non-root
this avoids the need for access to the secrets database 

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com>
2011-07-13 12:51:05 +02:00
Andrew Tridgell
d9e2317f49 dbcheck: added checking of backlinks
Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com>
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-07-13 12:51:05 +02:00
Andrew Tridgell
94b820af56 pydsdb: added get_backlink_from_lDAPDisplayName()
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com>
2011-07-13 12:51:05 +02:00
Andrew Tridgell
0214b7f20c s4-dsdb: moved checking of duplicate member entries to repl_meta_data.c
the samldb checks failed to account for the possibility of a member
being removed and added in the same modify operation. This happens
(for example) when dbcheck is fixing a SID in a DN.

The repl_meta_data.c code already has this check, it just wasn't
giving the right specialised error code for the 'member' attribute

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com>
2011-07-13 12:51:04 +02:00
Stefan Metzmacher
ee76239885 s4:libcli/raw: s/SMBchkpth/SMBcheckpath
metze
2011-07-12 16:50:55 +02:00
Stefan Metzmacher
110bf317d8 s4:winsdb: place wins.ldb in "state dir" instead of "lock dir"
It's not only a cache as we also support static records.

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Tue Jul 12 16:16:45 CEST 2011 on sn-devel-104
2011-07-12 16:16:45 +02:00
Stefan Metzmacher
e10d7d9941 s4:provision: place the sysvol share under "state dir" instead of "lock dir"
metze
2011-07-12 14:58:38 +02:00
Stefan Metzmacher
c0eb56d159 s4:param: add "state dir" and "cache dir" options
metze
2011-07-12 14:58:34 +02:00
Stefan Metzmacher
a6b128912b s4:libcli/raw: remove SMBkeepalive
metze
2011-07-12 09:44:05 +02:00
Stefan Metzmacher
5812a5218d s4:smb_server: s/SMBkeepalive/NBSSkeepalive
metze
2011-07-12 09:44:04 +02:00
Andrew Tridgell
330c00a14d dbcheck: use get_lDAPDisplayName_by_attid()
this is better than doing a schema search inside the dbcheck code

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Mon Jul 11 07:43:18 CEST 2011 on sn-devel-104
2011-07-11 07:43:18 +02:00
Andrew Tridgell
02562a0ca9 dsdb: added get_lDAPDisplayName_by_attid
this allows conversion from a DRS attribute ID to a LDAP display name

Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com>
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-07-11 14:32:45 +10:00
Andrew Tridgell
082a9cc728 dbcheck: improved error checking in fixup of missing metdata
when fixing missing attributes in replPropertyMetaData, allow user to
confirm changes, and check for exceptions

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com>
2011-07-11 14:32:45 +10:00
Andrew Tridgell
396beee776 s4-provision: use samba.unix2nttime() instead of hard coding NTTIME offsets
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com>
2011-07-11 14:32:45 +10:00
Matthieu Patou
723fc5fadd s4-drs: do not return links pointed to unexistant objects
When an object is deleted, link pointed to it are marked as inactive.
When the same object is purged we do not remmove the link pointed to it
(we can't know them) so they stay in the database, it turns to be a
problem for Windows 2008.

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-11 14:32:45 +10:00
Matthieu Patou
4a4c748d2b s4-dirsync: do not return linked attribute if the target object is no more
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-11 14:32:45 +10:00
Matthieu Patou
74530d6453 s4-dsdb: allow objectsid to be specified in a modification operation
if we have the provision control, it's used by dbcheck

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-11 14:32:45 +10:00
Matthieu Patou
61fc7f285e s4-samba-tool: dbcheck, check and fix broken metadata
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-11 14:32:44 +10:00
Matthieu Patou
bbd4e27745 s4-python: Add functions to get linkid and systemflags of an attribute
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-11 14:32:44 +10:00
Matthieu Patou
ab77df800e s4-dsdb: if the provision control is specified, update replication metadata even if the data hasn't change
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-11 14:32:44 +10:00
Matthieu Patou
e3fef4db0f upgradeprovision: reduce the number of attribute that we skip
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-11 14:32:44 +10:00
Matthieu Patou
c3106a6091 s4-provision: fix the value of creation timestamp to be a MS timestamp
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-11 14:32:44 +10:00
Matthieu Patou
6ec46309c3 s4-dsdb: when replacing linked attribute take always the new dn as the old dn might be broken
The usual use case is that you have a not complete linked attribute (ie.
without the SID) if we keep using the old dn, then the SID will never be
added.

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-11 14:32:44 +10:00
Matthieu Patou
3764b93b7c s4-dsdb: check for single valued attribute in repl_meta_data module
This is needed because we can have more than 1 value in a single valued
attribute as we store also deleted values. So we do the check in repl_meta_data
and then indicate LDB to do the check.

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-11 14:32:44 +10:00
Andrew Tridgell
e14725c8fe dbcheck: check all objects, including deleted objects
this makes dbcheck search over all objects, deleted or not. This
matters because when another DC replicates from this DC it replicates
the deleted objects as well, so invalid attributes in deleted objects
can cause problems on the new DC (for example, windows can get stuck
or even crash during the replication)

Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com>
2011-07-11 14:32:44 +10:00
Andrew Tridgell
6f6cda72fc s4-dsdb: deleted objects are expected to be missing mandatory attributes
the objectclass_attrs validation that an object contains all mandatory
attributes is incorrect for deleted objects, as they get stripped of
some mandatory attributes when deleted (for example, objectCategory
gets stripped)

Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com>
2011-07-11 14:32:44 +10:00
Andrew Tridgell
da75e031c3 s4-dsdb: fixed crash bug in extended_dn_in
when extended_dn_in fails to resolve a GUID extended DN component, the
debug code assumed that it was a search operation, and accessed
ac->req->op.search.base, which is not valid for non-search DN
expansions.

Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com>
2011-07-11 14:32:44 +10:00
Andrew Tridgell
faec2588f5 dbcheck: added confirm_all support for remaining checks
this allows the user to choose all/none for all the remaining database
checks

Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com>
2011-07-11 14:32:44 +10:00
Andrew Tridgell
059941b6e7 dbcheck: use specified DB schema for non-LDAP URLs
when connecting to a local database with -H we can use that databases
schema

Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com>
2011-07-11 14:32:44 +10:00