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

27660 Commits

Author SHA1 Message Date
Andrew Bartlett
7d33ec3dfe lib/util: consolidate module loading into common code
This creates a samba-modules private libary that handles the details.

Andrew Bartlett
2011-10-06 07:18:07 +02:00
Andrew Tridgell
3fca66e2b3 samba-tool: add support for fixing broken backlinks in dbcheck
this allows dangling backlinks to be removed

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

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Thu Oct  6 07:08:35 CEST 2011 on sn-devel-104
2011-10-06 07:08:35 +02:00
Andrew Tridgell
d7f617e2e1 s4-dsdb: allow deletion of backlinks if DSDB_CONTROL_DBCHECK given
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-10-06 14:34:22 +11:00
Andrew Tridgell
c2d70af1a7 s4-dsdb: added DSDB_CONTROL_DBCHECK
this will be used for overrides by the dbcheck validator

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-10-06 14:34:22 +11:00
Andrew Tridgell
2d63789e48 s4-dsdb: allow groupType update on deleted objects
this allows dbcheck to fix groupType on objects that have been deleted

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-10-06 14:34:21 +11:00
Andrew Tridgell
8976e1d50d s4-rodc: use the rodc_replica flag on the partition
this sets DSDB_REPL_FLAG_PARTIAL_REPLICA when replicating a RODC
partition, which tells the replication code to map instanceType to
remove the INSTANCE_TYPE_WRITE bit

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-10-06 14:34:21 +11:00
Andrew Tridgell
2a2deeb3b4 s4-rodc: ensure we load replicated partitions for RODCs
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-10-06 14:34:21 +11:00
Andrew Bartlett
e717af0301 s4-dsdb: Do not assume that all deleted objects have an objectCategory and sAMAccountType
Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Thu Oct  6 03:43:13 CEST 2011 on sn-devel-104
2011-10-06 03:43:13 +02:00
Andrew Bartlett
f55328a295 dsdb: Do not attempt to resolve conflicts on an RODC 2011-10-06 02:11:34 +02:00
Andrew Bartlett
55054182b2 dsdb: fix double-free in replication failure case on RODC 2011-10-06 02:11:34 +02:00
Andrew Bartlett
5c5d869975 s4-dsdb Allow repl server to start even when no master NCs are present 2011-10-06 02:11:34 +02:00
Andrew Tridgell
63319c169f s4-auth: fixed formatting of some DEBUG() lines
Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Wed Oct  5 09:45:15 CEST 2011 on sn-devel-104
2011-10-05 09:45:15 +02:00
Andrew Tridgell
6b5d8e02f7 s4-subdomain: create trust record with forest root DC
when we create a sub-subdomain we need to use the forest naming master
to setup the partition changes for the new subdomain. We also need to
setup the trust with the forest root, as that allows us to create the
needed _msdcs DNS entries in the forest

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Tue Oct  4 07:40:59 CEST 2011 on sn-devel-104
2011-10-04 07:40:59 +02:00
Andrew Tridgell
8905344bad s4-dsdb: fixed re-join of subdomain
if we repeat the join of a subdomain then we try to re-create the NC
for the subdomain during a DsAddEntry(). This allows that re-creation
to succeed if the NC already exists
2011-10-04 15:08:58 +11:00
Andrew Tridgell
28a6881d4f s4-lsa: fixed set of trust password with old password
the calculation of add_incoming and add_outgoing was not correct when
a trust was already in place

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-10-04 15:08:58 +11:00
Andrew Tridgell
e9758ef94d s4-dns: add all forest DCs to named.conf.update
this allows all DCs to update DNS entries
2011-10-04 15:08:58 +11:00
Andrew Tridgell
7244e254cc s4-ldap: added DSDB_CONTROL_NO_GLOBAL_CATALOG to ldap encoding list
also remove all the duplicated comments

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-10-04 15:08:58 +11:00
Andrew Tridgell
0ef8dca9fb s4-kdc: fixed handling of previous vs current trust password
This sorts out the correct handling for the 'kvno=255'
problem. Windows will use the previous trust password for 1 hour after
a password set, and indicates that the previous password is being used
by sending current_kvno-1. That maps to 255 if the trust password has
not actually been changed, so the initial trust password is being
used.

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-10-04 15:08:57 +11:00
Andrew Tridgell
71f3a25ff7 s4-auth: rework map_user_info() to use cracknames
to properly support multi-domain forests we need to determine if an
incoming username is part of a known forest domain or not. To do this
for all possible SPN forms, we need to use CrackNames.

This changes map_user_info() to use CrackNames if a SAM context is
available, and asks the CrackNames services to parse the incoming
username and domain into a NT4 form, which can then be used in the
SAM.

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-10-04 15:08:57 +11:00
Andrew Tridgell
0c944d07dc s4-sam: don't look in GC NCs for user accounts
We need to exclude GC partial replica naming contexts from SAM lookups

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-10-04 15:08:57 +11:00
Andrew Tridgell
aee896ad98 s4-kdc: don't look at global catalog NCs in the kdc
the kdc should not be looking for users in GC partial replicas, as
these users do not have all of the attributes needed for the KDC to
operate

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-10-04 15:08:57 +11:00
Andrew Tridgell
5717da34b9 s4-kdc: treat a kvno of 255 as unspecified
windows sometimes sends us a kvno of 255 for inter-domain trusts. We
don't yet know why it does this, but it seems that we need to treat
this as an unspecified kvno

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-10-04 15:08:57 +11:00
Andrew Tridgell
6356f4c255 s4-kcc: if we are a GC, auto-add partial replicas
when we are a global catalog server, the KCC needs to add partial
replicas for all domain partitions that we don't have copies of
2011-10-04 15:08:57 +11:00
Andrew Tridgell
278e44cf9f s4-dsdb: simplify samdb_is_gc()
we already have a function for returning the NTDS options
2011-10-04 15:08:57 +11:00
Andrew Tridgell
f469369fdf s4-dsdb: add the DSDB_CONTROL_PARTIAL_REPLICA when needed
when we are adding an object via DRS, we need to add the
DSDB_CONTROL_PARTIAL_REPLICA control if we are replicating a partial
replica, so ensure the partition module creates new NCs as partial
replicas
2011-10-04 15:08:57 +11:00
Andrew Tridgell
6b69ecd029 heimdal: handle referrals for 3 part DRSUAPI SPNs
This handles referrals for SPNs of the form
E3514235-4B06-11D1-AB04-00C04FC2DCD2/NTDSGUID/REALM, which are
used during DRS replication when we don't know the dnsHostName of the
target DC (which we don't know until the first replication from that
DC completes).

We use the 3rd part of the SPN directly as the realm name in the
referral.

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-10-04 15:08:57 +11:00
Andrew Tridgell
b930b1e1fc s4-repl: try harder to find the right SPN in replication server
when doing DRS between domains, using the right SPN is essential so
the KDC can generate referrals to point us at the right DC.  We prefer
the GC/hostname/DNSDOMAIN form if possible, but if we can't find the
hostname then this changes the code that generates the target
principal name to use either the msDS-HasDomainNCs or hasMasterNCs
attributes to try to find the target DC domainname so we can use the
E3514235-4B06-11D1-AB04-00C04FC2DCD2/GUID/DNSDOMAIN SPN form.

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-10-04 15:08:57 +11:00
Andrew Tridgell
60cbc98051 s4-dsdb: added new control DSDB_MODIFY_PARTIAL_REPLICA
this control tells the partition module that the DN being created is a
partial replica, so it should modify the @PARTITION object to add the
partialReplica attribute

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-10-04 15:08:57 +11:00
Andrew Tridgell
fb937afbec s4-join: enable cleanup on failed join
if a join fails, then cleanup the old records
2011-10-04 15:08:57 +11:00
Andrew Tridgell
efb3f45a81 s4-drs: added DSDB_REPL_FLAG_ADD_NCNAME to DsAddEntry call
we want new NCs to be created
2011-10-04 15:08:57 +11:00
Andrew Tridgell
1870fc49dd s4-dsdb: added DSDB_REPL_FLAG_ADD_NCNAME flag 2011-10-04 15:08:57 +11:00
Andrew Tridgell
50d6a76a14 s4-dsdb: fixed formatting of a debug message
another missing newline
2011-10-04 15:08:57 +11:00
Andrew Tridgell
d12309dc1a s4-partition: allow creation of uninstantiated partitions
this is needed for a subdomain join by a new NC. The NC is initially
uninstantiated
2011-10-04 15:08:56 +11:00
Andrew Tridgell
f52d8ca023 s4-dsdb: allow uninstantiated NC heads
this allows INSTANCE_TYPE_WRITE to be not set if
INSTANCE_TYPE_UNINSTANT is set
2011-10-04 15:08:56 +11:00
Andrew Tridgell
faf8581e38 s4-repl: support creation of new NCs via DsAddEntry
this adds a flag to dsdb_origin_objects_commit that tells it to create
a new NC based on the nCName in a crossRef object
2011-10-04 15:08:56 +11:00
Andrew Tridgell
df3cc35f74 s4-repl: fixed formatting of some debug messages 2011-10-04 15:08:56 +11:00
Andrew Tridgell
7d18241faa dns: added example python script for dnsserver protocol 2011-10-04 15:08:56 +11:00
Andrew Tridgell
57e30bc0cb dns: build python bindings for dnsserver RPC protocol 2011-10-04 15:08:56 +11:00
Andrew Tridgell
2fbdaab331 samba-tool: cope with GC compares in ldapcmp
the two base DNs do not need to match when doing GC replica compares
2011-10-04 15:08:56 +11:00
Andrew Tridgell
aed0d2e5eb samba-tool: added --full-sync and --sync-all options to samba-tool drs replicate 2011-10-04 15:08:56 +11:00
Andrew Tridgell
5d4f474b58 s4-dbchecker: fixed handling of DSDB DNs in dbcheck
we need to use the original value, as ldb.Dn() can't parse a DSDB
binary DN
2011-10-04 15:08:56 +11:00
Andrew Tridgell
ac581b3374 s4-dsdb: update callers to dsdb_convert_object_ex() 2011-10-04 15:08:56 +11:00
Andrew Tridgell
761fd4af2e s4-repl: update instanceType in partial_replica replication
when we receive objects to a partial replica, we need to change the
incoming instanceType to not include the INSTANCE_TYPE_WRITE
flag. Partial replicas unset this flag.
2011-10-04 15:08:56 +11:00
Andrew Tridgell
f37e81bbc5 s4-repl: add FULL_SYNC and PARTIAL_REPLICA flags
this sets the appropriate flags for replication with FULL_SYNC and
partial replica replications
2011-10-04 15:08:56 +11:00
Andrew Tridgell
bdc93190fe s4-dsdb: implement DSDB_REPL_FLAG_PRIORITISE_INCOMING
With this set, we accept changes even if they have the same tuple as
the local copy. This can be used by a FULL_SYNC replication to recover
a replica that is corrupt
2011-10-04 15:08:56 +11:00
Andrew Tridgell
f45147b2d9 s4-dsdb: disallow changes based on instanceType
if instanceType does not include INSTANCE_TYPE_WRITE, then disallow
changes to any replicated attributes. This ensures partial replicates
are not alterered
2011-10-04 15:08:56 +11:00
Andrew Tridgell
d3fa49663f s4-dsdb: added DSDB_REPL_FLAG* to replication
this allows the replication server to control replication via a set of
flags. Initial flags will allow control for partial replications and
full_sync support
2011-10-04 15:08:55 +11:00
Andrew Tridgell
0d2d6c94d2 s4-ldap-server: disallow all modifies on global catalog port 2011-10-04 15:08:55 +11:00
Kai Blin
5c890ad17f s4 provision: Set server role default when called from command line to 'dc' 2011-10-02 11:59:19 +02:00
Stefan Metzmacher
24d53ebe44 s4:smb_server/smb2: make sure we sign the final session setup
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Thu Sep 29 18:59:54 CEST 2011 on sn-devel-104
2011-09-29 18:59:54 +02:00