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

3169 Commits

Author SHA1 Message Date
Gregor Beck
85b145d745 s3:utils change data_blob_dup_talloc() to take a DATA_BLOB by value
Signed-off-by: Michael Adam <obnox@samba.org>
2011-10-12 22:45:53 +02:00
Jelmer Vernooij
1417ea1eed Remove pointless exception catching in tests.
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Sun Oct  9 00:00:26 CEST 2011 on sn-devel-104
2011-10-09 00:00:25 +02:00
Stefan Metzmacher
bcb02129c3 s4:dsdb/password_hash: add DSDB_CONTROL_PASSWORD_BYPASS_LAST_SET_OID
Which allows the caller to pass a given 'pwdLastSet' value
(every useful for migrations).

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Fri Oct  7 15:28:13 CEST 2011 on sn-devel-104
2011-10-07 15:28:13 +02:00
Stefan Metzmacher
ff1ce6521b s4:dsdb: fix the order of DSDB_CONTROL_* defines in samdb.h
This makes clear that struct dsdb_control_password_change
belongs to DSDB_CONTROL_PASSWORD_CHANGE_OID.

metze
2011-10-07 12:20:45 +02:00
Andrew Tridgell
83f0dc44a7 s4-dsdb: special case for deleted objects one way link
we show wellknown links to the deleted objects container

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

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Fri Oct  7 07:58:08 CEST 2011 on sn-devel-104
2011-10-07 07:58:08 +02:00
Andrew Tridgell
9b981ff1e8 s4-dsdb: don't display links to deleted objects
unless the user asks for the display of deactivated links, we should
not display DNs that link to deleted objects

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-10-07 13:20:44 +11:00
Andrew Tridgell
a729dbb269 s4-dsdb: fixed one_way_link calculation
we need to check for the other end of the link, not the current linkID

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-10-07 13:20:44 +11:00
Andrew Tridgell
a5f311d469 s4-dsdb: fixed behaviour of show_deleted and show_recycled control
to correctly implement the show_deleted and show_recycled control we
need to know if the recyclebin is enabled. When not enabled, the
isRecycled attribute is ignored, and only isDeleted is used.

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-10-07 13:20:44 +11:00
Andrew Tridgell
365f705345 s4-dsdb: fixed the check_optional_feature() call
the dsdb_check_optional_feature() call should look on our own NTDS DN
for the enabled feature. This should work for all features, not just
for forest wide fetaures.

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-10-07 13:20:44 +11: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
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
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
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
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
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
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 Bartlett
d40fe50a67 build: avoid util.h as a public header name due to conflict with MacOS 2011-09-23 09:24:03 +02:00
Andrew Tridgell
516f32654a s4-repl: remove unused principal_name element 2011-09-22 10:00:49 +10:00
Andrew Tridgell
aba856c666 s4-dsdb: load the partialReplica attribute in the @PARTITION object
this modifies the partition module to honor a partialReplica attribute
on the @PARTITION module, marking partiations as partial replicas so
the NO_GLOBAL_CATALOG control can be honoured
2011-09-22 10:00:49 +10:00
Andrew Tridgell
8c3d77d84c s4-repl: fill in GUID and SID from partition information
when we find a NC via a DN string, fill in the GUID and SID so the
caller can properly report them
2011-09-22 10:00:49 +10:00
Andrew Tridgell
783ff68628 s4-kcc: return partial replica NCs in drs showrepl
the showrepl operation should return all our replicated NCs, including
partial replicas
2011-09-22 10:00:48 +10:00
Andrew Tridgell
00ef18f19c s4-dsdb: added NO_GLOBAL_CATALOG control
this control is used to ask samdb to not return searches with a basedn
in partial repica partitions, which is needed to support the
difference between a search on the 3268 GC ldap port and the non-GC
389 port
2011-09-22 10:00:48 +10:00
Andrew Tridgell
7da636f33a s4-dsdb: get GUID and SID for DSA from extended DN
this allows us to use the DN from a hasPartialReplicaNCs attribute to
create a reps1 object
2011-09-22 10:00:48 +10:00
Andrew Tridgell
2b929b0b51 s4-dsdb: enable initial replication of partitions via DsReplicaSync
we need to create a temporary dsa object to allow the replication task
to replicate a NC that is not listed in a repsFrom attribute
2011-09-22 10:00:48 +10:00
Andrew Tridgell
86f5ecdc0c s4-repl: get NCs to replicate from our NTDS object
we need to use the hasMasterNCs and hasPartialReplicaNCs attributes on
our NTDS object to get the list of NCs to replicate, instead of using
the rootDSE. This is needed to support replicating of GC partial
replicas, which are not listed in the rootDSE
2011-09-22 10:00:48 +10:00
Andrew Tridgell
4efb4ebe63 s4-dsdb: added support for replicating with GC partial attribute set
if we are replicating a partial replica, then we need to supply the
partial attribute set we want to replicate to the server
2011-09-22 10:00:48 +10:00
Andrew Tridgell
677600fb7f s4-dsdb: failing to find the object is not an error in dsdb_loadreps()
we may not have replicated the partition yet, so this should be
considered the same as having no repsFrom/repsTo
2011-09-22 10:00:48 +10:00
Andrew Tridgell
9d98461150 s4-dsdb: cope with out of sync replication attributes in partition module
if the @ATTRIBUTES or other objects which are replicated between
partions become out of sync, then the ldb would fail to open. This
changes ensures that we can always fix those records, by running the
operation in the top level partition, and replicating the result to
the other partitions

Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com>

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Mon Sep 19 04:31:48 CEST 2011 on sn-devel-104
2011-09-19 04:31:48 +02:00
Andrew Tridgell
966b5d5de2 pyldb: fixed places where we try to concatenate a Dn with a string
you need to either use str(dn) or use %s in a format string
2011-09-19 10:57:03 +10:00
Andrew Tridgell
4577ee1f95 s4-dsdb: use get_config_basedn() in python tests
we can't just append CN=Configuration to the basedn, as that won't
give the right configuration DN for a subdomain of a forest

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-09-19 10:57:03 +10:00
Andrew Tridgell
cea37b0d6d s4-drs: cope with REPL_OBJ getncchanges call for new object
when we do a subdomain join we create a new object using a REPL_OBJ
getncchanges call for the partitions DN. This has a side effect of
creating that object. We need to skip the UDV update in that case

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-09-19 10:57:02 +10:00
Andrew Tridgell
e0c5f1c1ab s4-cracknames: use consistent search for crossRef objects
This matches the search in other places

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

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Thu Sep  8 05:02:54 CEST 2011 on sn-devel-104
2011-09-08 05:02:54 +02:00
Andrew Tridgell
de318e58b0 s4-dsdb: prevent crash on bad DN in construct_parent_guid()
this was found by a flakey test in autobuild
2011-09-08 03:35:27 +02:00
Andrew Tridgell
1e9573fe4d s4-dsdb: fixed compiler warning
sid can be const

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-09-08 03:35:27 +02:00
Amitay Isaacs
2fc233b78f s4-kcc: Fix the list of NCs for DRS replica information
AD DNS partitions (DomainDnsZones and ForestDnsZones) are listed
under msDs-hasMasterNCs attribute for post-2003 windows servers.
2011-09-07 12:16:40 +02:00
Andrew Tridgell
50648760e7 s4-cracknames: fixed cracknames to use more specific search
this uses the bitwise comparison ldap operators to ensure we only get
NC roots

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

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Mon Sep  5 12:48:39 CEST 2011 on sn-devel-104
2011-09-05 12:48:39 +02:00
Andrew Bartlett
1afeb4e391 s4-schema consolidate schema handling
It also creates a single routine dsdb_load_ldb_results_into_schema()
to handle cases where the schema is in the form of an ldb_result.

Andrew Bartlett
2011-09-05 11:19:25 +02:00
Andrew Bartlett
fe754cc7ac s4-dsdb Print clearer error messages when invalid account flags are specified on add 2011-09-05 11:25:38 +10:00
Andrew Bartlett
f81bb8df67 s4-dsdb Return ACL errors as ldb_errstring()
This string is reported to the caller, which makes debugging much easier.

Andrew Bartlett
2011-08-26 14:06:07 +02:00
Andrew Tridgell
68a42bd762 s4-dsdb: fixed use of RMD flags in ldb search in dirsync module
I'm pretty sure a SHOW_DELETED was wanted here

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

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Thu Aug 25 01:10:13 CEST 2011 on sn-devel-104
2011-08-25 01:10:13 +02:00
Andrew Tridgell
345220b762 s4-dsdb: fixed newlines in DEBUG() calls in cracknames
Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com>
2011-08-25 07:39:39 +10:00
Andrew Tridgell
4f421d0406 s4-acl: use dnsforest not dnsdomain for GC names 2011-08-25 07:39:39 +10:00
Andrew Tridgell
5a9dc1d216 s4-repl: fixed _msdcs DNS name
another multi-domain fix
2011-08-25 07:39:38 +10:00
Andrew Tridgell
484fb303ff s4-kcc: fixed _msdcs DNS name
we need to base this DNS name on the forest DNS name for multi-domain
support

Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com>
2011-08-25 07:39:38 +10:00
Andrew Tridgell
9784fbc378 s4-dsdb: added samdb_ntds_msdcs_dns_name()
this gets the DNS name for a NTDS GUID, based on the forest DNS name

Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com>
2011-08-25 07:39:38 +10:00
Andrew Tridgell
27656e9123 s4-dsdb: fixed calls to ldb_val_string_cmp()
wrong order of arguments
2011-08-25 07:39:38 +10:00
Andrew Tridgell
9f404b3dea s4-dsdb: added samdb_dn_to_dns_domain()
this converts a DC into the equivalent DNS domain. It is used when
forming t_msdcs NTDS DNS names

Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com>
2011-08-25 07:39:38 +10:00
Andrew Tridgell
bcbb35b088 s4-dsdb: assert that base DNs are used correctly
this will catch future programmer errors with incorrect base DNs

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-08-25 07:39:38 +10:00
Andrew Tridgell
1216649772 s4-dsdb: enforce NULL DN validity in partition module
windows does not allow a search on the empty DN except for rootDSE
searches or for phantom_root searches (ie. with --cross-ncs). By
enforcing this in Samba we make it more likely that our tests and
utilities will work against windows

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-08-25 07:39:38 +10:00
Andrew Tridgell
171c3cdd4a s4-dsdb: fixed basedn in extended_dn_in module
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-08-25 07:39:38 +10:00
Andrew Tridgell
68ff9ecd01 s4-dsdb: cleanup use of NULL vs base DN in samldb
NULL should be used when doing all partition searches. The default
basedn should be used when wanting just the domain NC

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-08-25 07:39:37 +10:00
Andrew Tridgell
4744c12d2c s4-dsdb: removed unused function in ACL module
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-08-25 07:39:37 +10:00
Andrew Tridgell
559d92a8df s4-dsdb: fixed all partitions search in cracknames
when searching all partitions we must use the NULL basedn, or we will
miss partitions in multi-domain setups

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-08-25 07:39:37 +10:00
Jelmer Vernooij
c292599240 samdb: Install header file. 2011-08-21 03:22:05 +02:00
Jelmer Vernooij
292fe74971 credentials: Rename library to samba-credentials to avoid name clashes.
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Thu Aug 18 22:16:38 CEST 2011 on sn-devel-104
2011-08-18 22:16:38 +02:00
Andrew Tridgell
46a76bc229 s4-dsdb: fixed deletion of backlinks for fl2000 DCs
when in FL 2000 we were not correctly deleting backlinks as we uses
dsdb_find_dn_by_guid() which doesn't find deleted objects. Modules
should use dsdb_module_dn_by_guid() which prevents going to the top
level, and finds deleted objects

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-08-18 09:26:59 +10:00
Andrew Tridgell
c5dc26b976 s4-dsdb: added comments and fixed backlink check in repl_meta_data
added comments explaining the backlink deletion code, plus fix a use
of a bitwise operation in a boolean expression, and avoid calling
dsdb_functional_level() inside a loop

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-08-18 09:26:59 +10:00
Andrew Tridgell
16fa0f68bd s4-dirsync: use dsdb_module_dn_by_guid() not dsdb_find_dn_by_guid() in modules
this prevents us going to the top level of the module stack

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-08-18 09:26:59 +10:00
Simo Sorce
f364daed22 s4:dsdb: use tevent_ fn names instaed of legacy event_ ones 2011-08-13 09:54:15 -04:00
Amitay Isaacs
ae65b971ac s4-dsdb: Provide additional method to connect to specified database path
samdb_connect() now calls samdb_connect_url() with default "sam.ldb".

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-08-13 12:30:50 +10:00
Andrew Bartlett
11698a287e s4-dsdb ensure we honour the hash_values control, even for really odd hashes 2011-08-13 12:30:49 +10:00
Andrew Bartlett
2d6e98e5c8 s4-dsdb Give a less worrying error message on failure to get a transaction 2011-08-13 12:30:49 +10:00
Andrew Bartlett
2993113a56 s4-dsdb Add ability to force a particular SID in the upgrade case 2011-08-13 12:30:49 +10:00
Andrew Bartlett
c5e41a21dd s4-dsdb Add flag to set DSDB_BYPASS_PASSWORD_HASH control 2011-08-13 12:30:48 +10:00
Andrew Tridgell
fb490d88c1 s4-dsdb: don't cache the NTDS settings DN
this DN can change due to a server rename, so we cannot cache it. It
is set by provision, but not anywhere else.

This seems to not have a large performance impact

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-08-12 04:00:07 +02:00
Andrew Tridgell
ccba16c4b8 s4-dsdb: expand dsServiceName from GUID form at runtime
this allows dsServiceName to be stored as an extended DN or GUID form
in @ROOTDSE, and its string form will be found at runtime.

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-08-12 04:00:07 +02:00
Andrew Tridgell
f7902d766a s4-dsdb: remove the naming_fsmo and pdc_fsmo modules
these are not needed now that the rootdse modules calculates the
validFSMOs attribute at runtime

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-08-12 04:00:07 +02:00
Andrew Tridgell
f9d10a304d s4-dsdb: calculate validFSMOs at runtime instead of pre-computing
this changes the rootdse to compute the validFSMOs attribute at
runtime by checking the fSMORoleOwner attribute on the appropriate
DN. This avoids the need for the pdc_fsmo and naming_fsmo modules.

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-08-12 04:00:07 +02:00
Matthias Dieter Wallnöfer
4a5e9cf0ed s4:subtree_rename LDB module - fix the move/rename constraints
s4:subtree_rename LDB module - fix the move/rename constraints

By the inspiration of an email request by ekacnet I have rechecked the
move/rename constraints and re-read the chapter 3.1.1.5.4.1 located in the
MS-ADTS technical documentation.
It really turns out that the constraint checking is only performed on
the root object of a request.

In addition add my copyright notice (I've written these constraint checks).

Autobuild-User: Matthieu Patou <mat@samba.org>
Autobuild-Date: Wed Aug 10 01:05:19 CEST 2011 on sn-devel-104
2011-08-10 01:05:19 +02:00
Matthieu Patou
dd902164d2 s4-dsdb: avoid printing a pointless debug line 2011-08-10 01:44:44 +04:00
Matthieu Patou
87e7802722 s4-drsuapi: crackname search also for deleted objects 2011-08-10 01:44:43 +04:00
Andrew Bartlett
e2733d362d s4-dsdb clarify that failure to load the schema items from DRS is expected
This happens if we have a custom schema - we need to build up the schema until
it loads, by converting more objects.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Tue Aug  9 13:10:25 CEST 2011 on sn-devel-104
2011-08-09 13:10:25 +02:00
Andrew Bartlett
b206a365ea move schema_fill_constructed() call to dsdb_setup_sorted_accessors() 2011-08-09 11:56:23 +02:00
Andrew Bartlett
dee678a7be s4-dsdb Remove unused schema function 2011-08-09 11:56:23 +02:00
Andrew Tridgell
0e9cf380ea s4-dsdb: added SAMDB_INDEXING_VERSION to @INDEXLIST
this can be used to force re-indexing of samdb when we change
something that affects index comparison, in this case the
canonicalisation of booleans

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-08-09 11:56:23 +02:00
Andrew Tridgell
6853b3a805 s4-dsdb: fixed booling conversion to check value length
this ensures we don't look past the end of the data

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-08-09 11:56:23 +02:00
Andrew Tridgell
4ede333f46 s4-dsdb: add auto-normalisation of attributes
this auto-normalises some attributes when they are added/modified. The
list that we auto-normalise is currently:

Boolean
INT32
INTEGER
UTC_TIME

This fixes a problem with groupType being stored in an unnormalised
form

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-08-09 11:56:23 +02:00
Andrew Tridgell
2ba18d89eb s4-dsdb: ensure rIDSetReferences is stored as an extended DN
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-08-09 11:56:23 +02:00
Andrew Tridgell
55b25e1e23 s4-dsdb: ensure we setup the dn_format field in schema attributes
this ensures we setup dn_format when we do runtime schema changes

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-08-09 11:56:23 +02:00
Andrew Tridgell
6ef36a0e6a s4-acl-test: use symbolic names for groupType
clearer than magic numbers
2011-08-09 11:56:23 +02:00
Andrew Tridgell
fd04a38d50 s4-dsdb: make extended_dn_in a bit more efficient
checking filter elements in the right order makes it a little faster
2011-08-09 11:56:23 +02:00
Andrew Tridgell
8ce8107a5b s4-dsdb: use dn_format shortcut to find DN format
this saves some string comparisons
2011-08-09 11:56:23 +02:00
Jelmer Vernooij
fdff105854 pyldb: Consistently use pyldb_ prefix. 2011-08-07 17:08:56 +02:00
Andrew Tridgell
37799b0644 s4-dsdb: extend the extended_dn_in module to handle DN links
this replaces DN components in incoming filter expressions with the
full extended DN of the target, which allows search expressions based
on <GUID=> and <SID=> DNs, as well as fixing the problem with one-way
links in search expressions

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-08-04 16:17:25 +10:00
Andrew Tridgell
7b5f0a7120 s4-dsdb: handle search expressions containing extended DNs
this allows for searches like member=<SID=S-1-2-3>

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com>
2011-08-04 16:17:25 +10:00
Andrew Tridgell
d4a1f6a42b s4-dsdb: added dn_format attribute of a dsdb_attribute
this is faster than string comparisons during searches at runtime

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com>
2011-08-04 16:17:25 +10:00
Andrew Tridgell
d669e83857 s4-dsdb: fixed outgoing one way link DNs
when we return a DN which is a one way link, fix the string DN
component by searching for the GUID and replacing the DN components

Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com>
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-08-04 16:17:24 +10:00
Andrew Tridgell
a74f4673ed s4-dsdb: setup a one_way_link attribute on schema attributes
this allows us to quickly determine if a DN is a one way link

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com>
2011-08-04 16:17:24 +10:00
Andrew Tridgell
fc40769b64 s4-dsdb: fixed a warning on dsdb_delete()
struct ldb_dn is never const

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com>
2011-08-04 16:17:24 +10:00
Andrew Tridgell
d10553a51c s4-dsdb: make requests for STORAGE_FORMAT control non-critical
this allows us to use dsdb_module_dn_by_guid() from levels below the
extended_dn_out module

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com>
2011-08-04 16:17:24 +10:00
Andrew Bartlett
35b309fa0c gensec: clarify memory ownership for gensec_session_info() and gensec_session_key()
This is slightly less efficient, because we no longer keep a cache on
the gensec structures, but much clearer in terms of memory ownership.
Both gensec_session_info() and gensec_session_key() now take a mem_ctx
and put the result only on that context.

Some duplication of memory in the callers (who were rightly uncertain
about who was the rightful owner of the returned memory) has been
removed to compensate for the internal copy.

Andrew Bartlett
2011-08-03 18:48:02 +10:00
Jelmer Vernooij
cdc146d0c4 remove unnecessary dependency on 'events' from ldb modules. 2011-08-01 17:48:30 +02:00
Matthieu Patou
ff1907012a s4-kcc: correctly populate the neighbor object when taking information from repsTo
Autobuild-User: Matthieu Patou <mat@samba.org>
Autobuild-Date: Sun Jul 31 00:17:17 CEST 2011 on sn-devel-104
2011-07-31 00:17:17 +02:00
Matthieu Patou
326e2dd681 s4-dsdb: Improve the calculation of system flags according to 3.1.1.5.2.4 2011-07-26 23:34:24 +02:00
Andrew Tridgell
a2c425858b s4-kcc: use dsdb_delete() instead of ldb_delete()
this adds the DSDB_SEARCH_SHOW_DELETED flag, which fixes deletion of
deleted objects

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-07-21 11:44:36 +10:00
Andrew Tridgell
114377a91f s4-dsdb: added dsdb_delete() function
this gives us a delete function that takes the standard set of dsdb
flags

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-07-21 11:44:36 +10:00
Matthieu Patou
72ca5c39c9 s4-dsdb: Use controls provided during the request while searching for object to delete
If the parent request specify the show_deleted control we must use it in
order to be able to see the deleted objects.

Also we just allow to trusted connections with the system account to
remove deleted objects, others receive an unwilling to perform.
2011-07-21 11:44:35 +10:00
Matthieu Patou
6362c9c30d s4-dsdb: check group membership only for non deleted objects
Group membership has been already removed on deleted objects so there is
no mean doing something on this kind of object.
2011-07-21 11:44:34 +10:00
Matthieu Patou
930fa1ee46 update/add my copyright 2011-07-21 11:44:33 +10:00
Matthieu Patou
9a1dd24ced s4-dsdb: In rootdse add extended dn info on all values for a given attribute
And not only on the fist value as it was the case up to this changeset.
2011-07-21 11:44:33 +10:00
Matthieu Patou
245f4b22f4 s4-dsdb: add dsdb_module_extended function similar to other dsdb_module_* functions 2011-07-21 11:44:33 +10:00
Matthieu Patou
b1ffe82fac s4-schema: add systemFlags to dsdb classes objects 2011-07-21 11:44:33 +10:00
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
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
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
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
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
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
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
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
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
28dbd8bbc1 s4-dsdb: allow removal of unknown attributes if RELAX set
this allows attributes not known in the schema to be removed if the
caller has set the RELAX control. This will be used by dbcheck to
allow cleaning of bad attributes from the database
2011-07-05 07:10:03 +02:00
Andrew Bartlett
f3c3768d30 s4-dsdb guard principalName parse for invalid inputs
We need to ensure that if this parses name.name_string as just one
val, then we don't read uninitialised and possibly unallocated memory.
Found by Adam Thorn <alt36@cam.ac.uk>

While we are checking that, we need to fix the strncasecmp() check to
first check if the string is the expected length, then check for a
match against sAMAccountName-without-doller, as otherwise we will
permit a string such as machinefoo to match a sAMAccountName of
machine.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Fri Jul  1 03:55:00 CEST 2011 on sn-devel-104
2011-07-01 03:55:00 +02:00
Andrew Bartlett
f1b1a66615 s4-dsdb Allow a servicePrincipalName of machine$
This is pointless, but MacOS X (version 10.6.8 was tested) apparently
sets machine$ into this field.

Andrew Bartlett
2011-07-01 10:43:29 +10:00
Matthieu Patou
4d51ddbb5c s4-schema: avoid segfaulting if id3.guid is NULL 2011-06-22 20:13:08 +02:00
Andrew Tridgell
a353b49047 s4-dsdb: bypass validation when relax set
this allows dbcheck to fix bad attributes

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Wed Jun 22 12:27:06 CEST 2011 on sn-devel-104
2011-06-22 12:27:06 +02:00
Andrew Tridgell
c42aeb7872 s4-dsdb: prioritise GUID in extended_dn_in
if we search with a base DN that has both a GUID and a SID, then use
the GUID first. This matters for the S-1-5-17 SID.

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-06-22 11:16:26 +02:00
Andrew Tridgell
d9ee7aebcb s4-dsdb: catch duplicate matches in extended_dn_in
When searching using extended DNs, if there are multiple matches then
return an object not found error. This is needed for the case of a
duplicate objectSid, which happens for S-1-5-17

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-06-22 11:16:26 +02:00
Andrew Tridgell
202f0a4b57 pydsdb: added get_syntax_oid_from_lDAPDisplayName()
this gives you access to the syntax oid of an attribute

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-06-22 14:47:08 +10:00
Andrew Tridgell
c46f80824b s4-dsdb: don't add zero GUID to BINARY_DN
When converting from DRS to ldb format for a BINARY_DN, don't add the
GUID extended DN element if the GUID is all zeros.

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-06-22 14:47:07 +10:00
Andrew Bartlett
a1f04e8abc libcli/util Rename common map_nt_error_from_unix to avoid duplicate symbol
The two error tables need to be combined, but for now seperate the names.

(As the common parts of the tree now use the _common function,
errmap_unix.c must be included in the s3 autoconf build).

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Mon Jun 20 08:12:03 CEST 2011 on sn-devel-104
2011-06-20 08:12:03 +02:00
Andrew Bartlett
018f4a5889 libcli/util Bring samba4 unix -> nt_status code in common.
Due to library link orders, this is already the function that is being
used.  However we still need to sort out the duplicate symbol issues,
probably by renaming things.

Andrew Bartlett
2011-06-20 14:36:06 +10:00
Andrew Tridgell
4905725599 s4-dsdb: if we don't have a remote schema, then use the local one
this allows the use of drsuapi_to_ldb() on all attributes for the
local database
2011-06-17 12:32:55 +10:00
Andrew Tridgell
665ef94d3c s4-pydsdb: added dsdb_normalise_attributes() call
this call converts a set of attributes to DRSUAPI format and back to
ldb format. This has the effect of normalising the attributes using
the schema syntax rules
2011-06-17 12:32:55 +10:00
Andrew Tridgell
56d09d5904 s4-drs: ensure we add a RMD_ADDTIME when upgrading a linked attribute
if the link was a w2k style, and we are upgrading it, then set the
RMD_ADDTIME to the current time
2011-06-10 10:14:56 +10:00
Andrew Tridgell
3e4c08096d s4-drs: cope with missing RMD_ADDTIME in linked attributes
upgraded links can be missing the RMD_ADDTIME field
2011-06-10 10:14:56 +10:00
Matthias Dieter Wallnöfer
26c7223e72 s4:schema_convert_to_ol.c - fix memory contexts
- Add more "mem_ctx" free functions on error cases
- Steal the "out" string directly onto the LDB context to be able to free
  the local "mem_ctx"

Reviewed-by: Tridge
2011-06-09 10:53:36 +02:00
Matthias Dieter Wallnöfer
87a38d77ac s4:dsdb/schema_convert_to_ol.c - quiet enum warning
Introduce a error message when choosing wrong targets.

Reviewed-by: Tridge
2011-06-09 09:35:35 +02:00
Andrew Tridgell
5d7ba30549 s4-dsdb: cope with missing backlinks in rpmd handling
if backlinks have not propogated correctly in a previous replication
this allows us to recover
2011-06-07 12:55:37 +10:00
Andrew Bartlett
a18efb1490 s4-param Remove 'sid generator'
This was only used by the Fedora DS backend for Samba4.  We agreed to
no longer support external LDAP backends.

Andrew Bartlett
2011-06-06 17:37:50 +10:00
Andrew Bartlett
c091a92be5 s4-param Remove 'sam database' parameter
This now just relies on the private dir parameter, which remains.

Andrew Bartlett
2011-06-06 15:02:38 +10:00
Matthias Dieter Wallnöfer
ff47927fb9 s4:samldb LDB module - check if the RODC group exists if creating an RODC
Older AD deployments simply don't have it and hence there is no RODC
support.

Reviewed-by: abartlet

Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Wed May 25 10:26:37 CEST 2011 on sn-devel-104
2011-05-25 10:26:37 +02:00
Matthias Dieter Wallnöfer
08f5ed8b4f s4:samldb LDB module - better to call "samldb_prim_group_trigger"
"samldb_prim_group_trigger" which as a wrapper calls "samldb_prim_group_change"
for a LDB modify operation.

Reviewed-by: abartlet
2011-05-25 08:57:51 +02:00
Matthias Dieter Wallnöfer
779d882aca s4:samldb LDB module - convert a "dsdb_module_search" into "dsdb_module_search_dn"
It saves us from checking the number of returned entries.

Reviewed-by: abartlet
2011-05-25 08:57:46 +02:00
Matthias Dieter Wallnöfer
11937ce5e1 s4:sam.py - uncomment/enhance some account type tests
Reviewed-by: abartlet
2011-05-25 08:57:42 +02:00
Matthias Dieter Wallnöfer
2ad0100d5b s4:samldb LDB modules - only objectClass "computer" is allowed to embed all types of account
Reviewed-by: abartlet
2011-05-25 08:57:35 +02:00
Matthias Dieter Wallnöfer
4740473591 s4:sam.py - tests for "isCriticalSystemObject" attribute
Reviewed-by: abartlet
2011-05-25 08:57:29 +02:00
Matthias Dieter Wallnöfer
0c753e503c s4:samldb LDB module - fix "isCriticalSystemObject" behaviour
Tests against Windows Server show that it gets set to "FALSE" (not
deleted) if we change the account type to a domain member.

Reviewed-by: abartlet
2011-05-25 08:57:24 +02:00
Matthias Dieter Wallnöfer
c72d32da6d s4:sam.py - unchanged "primaryGroupID" when account type remains the same
Enhance the testcase with a workstation example.

Reviewed-by: abartlet
2011-05-25 08:57:19 +02:00
Matthias Dieter Wallnöfer
b712c7273d s4:samldb LDB module - fix the behaviour when changing the "userAccountControl"
Ekacnet was not quite right yet but his patch made me think further.
This primary group changing is only needed if the account type changes.
With this patch we do one more search if the "userAccountControl"
changes but we save us from doing these unneeded and wrong modify replace
operations most of the time.

Reviewed-by: abartlet
2011-05-25 08:57:09 +02:00
Matthieu Patou
1b5c2d8e92 s4:sam.py - add tests to check that setting "userAccountValue" on usersdon't impact the "primaryGroupID" attribute
Notice: The domain administrators groups isn't referenced as "Domain Admins"
since this name could differ.

Signed-off-by: Matthias Dieter Wallnöfer <mdw@samba.org>

Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Sat May 21 19:19:57 CEST 2011 on sn-devel-104
2011-05-21 19:19:57 +02:00
Matthieu Patou
e3aa200a14 s4:samldb LDB module - don't change the "primaryGroupId" on LDB modifications unless we are a computer/dc/rodc
Signed-off-by: Matthias Dieter Wallnöfer <mdw@samba.org>
2011-05-21 16:25:12 +02:00
Matthias Dieter Wallnöfer
d34205add3 s4:ldb-samba/ldb_wrap.*-dsdb/samdb/samdb.c - handle LDB connection flags as unsigned
The LDB API ("ldb_connect") prescribes that they should be "unsigned".

Signed-off-by: Metze
2011-05-21 16:21:14 +02:00
Matthieu Patou
c2fa348831 s4-dsdb: add unit tests for dirsync control
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-05-21 16:25:19 +04:00
Matthieu Patou
fa400af18b s4-dsdb: implementation of the dirsync control
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-05-21 16:25:19 +04:00
Matthieu Patou
7b4e1e78be s4-dsdb: introduce dsdb_module_search_tree
With this function your own search tree can be specified

This function is similar to ldb_build_search_req_ex as it allows to
pass a parse tree structure.

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-05-21 14:39:12 +04:00
Matthieu Patou
37b1662a38 s4-dsdb: relax a bit the checks on read acl when dirsync control is specified
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-05-21 14:39:12 +04:00
Matthieu Patou
1d0fc445fa s4-dsdb: create flag for requesting ACL relax in case of DIRSYNC request
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-05-21 14:39:12 +04:00
Matthieu Patou
df83e9c15e s4: do not change the critical flag when it's on a dirsync control
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-05-21 14:39:12 +04:00
Kamen Mazdrashki
a8798d8bce s4/drepl_fsmo: Add an CR so that message is visible in the logs
Autobuild-User: Kamen Mazdrashki <kamenim@samba.org>
Autobuild-Date: Wed May 11 21:03:59 CEST 2011 on sn-devel-104
2011-05-11 21:03:59 +02:00
Andrew Bartlett
5d2ce400d2 s4-dsdb Add transactions to dsdb modify helpers 2011-05-08 17:36:26 +02:00
Andrew Tridgell
b96389d3e1 s4-socket: rename allow_access() to socket_allow_access()
this prevents a symbol collision with s3

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-05-03 07:37:07 +02:00
Andrew Bartlett
2742ec0e34 Remove strlower_m() and strupper_m() from source4 and common code.
This function is problematic because a string may expand in size when
changed into upper or lower case.  This will then push characters off
the end of the string in the s3 implementation, or panic in the former
s4 implementation.

Andrew Bartlett
2011-05-03 07:37:07 +02:00
Andrew Bartlett
cdd802af83 s4-messaging Rename messaging -> imessaging
This avoid symbol and structure conflicts between Samba3 and Samba4,
and chooses a less generic name.

Andrew Bartlett
2011-05-03 07:37:07 +02:00
Matthias Dieter Wallnöfer
bbf28703a4 s4:"ldb_connect" calls - proof for "!= LDB_SUCCESS"
Reviewed-by: abartlet
2011-04-29 19:05:04 +02:00
Matthias Dieter Wallnöfer
cc1cf31e55 s4:repl_meta_data LDB module - quiet a discard const ptr warning 2011-04-29 19:05:04 +02:00
Matthias Dieter Wallnöfer
3884fec3d5 s4:token_group.py python test - fix typos 2011-04-29 19:05:04 +02:00
Andrew Bartlett
67905b41a9 s4-param Rename private_path() -> lpcfg_private_path()
This is consistent with lock_path()

Andrew Bartlett
2011-04-29 16:38:14 +10:00
Jelmer Vernooij
0645c01b85 Fix case of libUTIL_LDB.
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Sat Apr 23 18:52:06 CEST 2011 on sn-devel-104
2011-04-23 18:52:06 +02:00
Matthieu Patou
85e8c86302 s4-dsdb: Add more information on why we don't check the SD control
Signed-off-by: Nadezhda Ivanova <nivanova@samba.org>

Autobuild-User: Nadezhda Ivanova <nivanova@samba.org>
Autobuild-Date: Fri Apr 15 16:16:27 CEST 2011 on sn-devel-104
2011-04-15 16:16:27 +02:00
Matthieu Patou
cf4a3081cb s4-dsdb: If current attribute list is empty use the one from the request
This will avoid overwritting attribute list made by upper modules.

Signed-off-by: Nadezhda Ivanova <nivanova@samba.org>
2011-04-15 16:28:08 +03:00
Andrew Bartlett
5694ba507c libcli/ldap pull LIBCLI_LDAP_MESSAGE and LIBCLI_LDAP_NDR into a library
This reduces symbol duplication

Andrew Bartlett
2011-04-13 11:47:36 +10:00
Matthias Dieter Wallnöfer
ddb41f2af4 dsdb:schema/schema_syntax.c - correctly check error code of "ldb_string_utc_to_time"
This one doesn't set ERRNO. An error happens if the result is "0".

Reviewed-by: abartlet
2011-04-07 15:53:20 +02:00
Matthias Dieter Wallnöfer
6cef940b40 dsdb:schema/schema_syntax.c - add some empty value checks on validate functions
They are needed since the check in "ldb_msg_sanity_check" will be removed.

Reviewed-by: abartlet
2011-04-07 15:53:20 +02:00
Matthias Dieter Wallnöfer
b7de06e8e7 s4:objectclass LDB module - "ldb_msg_sanity_check" call not really needed
This call should only be performed at the beginning of a request.
"ldb_msg_sanity_check" checks for DN validity (which should already have been
done at the beginning of the request) and empty attributes (which should
be done by the "objectclass_attrs" LDB module).

Hence it is superflous here.

Reviewed-by: abartlet
2011-04-07 15:53:20 +02:00