1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-26 10:04:02 +03:00

1733 Commits

Author SHA1 Message Date
Kamen Mazdrashki
2264d917ae s4/dsdb: Update Schema cache with updated schemaInfo value
Error checking is simplified and my leave leeks.
I did it this way to make code more readable, and if we
get error in those lines, it will be WERR_NOMEM in which
case we are in a much deeper troubles than delayed freeing
of few bytes.
2010-04-29 04:54:07 +03:00
Kamen Mazdrashki
e41eac96af s4/samldb: Create initial schemaInfo value if it doesn't exists yet 2010-04-29 04:54:06 +03:00
Kamen Mazdrashki
546a727bd3 s4/dsdb: Use default schemaInfo value when no such value is given
Having no value for schemaInfo is totally OK as it turns out.
In such cases, we should use a default value with
all fields set to 0.
2010-04-29 04:54:06 +03:00
Kamen Mazdrashki
5bf12e101a Revert "s4/dsdb: Set schemaInfo attribute value during provisioning"
This reverts commit 8149094eddebd9a0e8b7c123c2ed54d00164bb26.

Windows implementation does not set schemaInfo attribute value
until first Schema update request.
This way, newly provisioned forest returns no schemaInfo value.

I think it won't be bad for us to have this value preset, but
I want to mimic Win AD behavior as close as possible.
2010-04-29 04:54:05 +03:00
Kamen Mazdrashki
bf49ac99c9 s4/dsdb: dsdb_validate_invocation_id() should validate by objectGUID
This function is used in DRSUpdateRefs() implementation where we
get DSA's objectGUID rather than invocationId
2010-04-28 12:11:03 +03:00
Stefan Metzmacher
4d191b6fa7 s4:dsdb/common: if we don't have the ip of the client return the server site as client site
metze
2010-04-27 13:00:24 +02:00
Andrew Tridgell
ff2edd52cb s4-dns: call spn update command alongside dns update
call samba_spnupdate at the same time as samba_spnupdate
2010-04-27 19:27:19 +10:00
Matthias Dieter Wallnöfer
8219c4f69c s4:kcc_periodic.c - fix counter types
We are counting LDB objects here -> therefore "unsigned"
2010-04-27 08:19:10 +02:00
Matthias Dieter Wallnöfer
093d35661d s4:util - add a function which finds the matching client site using the client address
The lookup of the client site is done using the subnets in the configuration
partition. If no one matches we use the Windows Server fallback mechansim.
This means: if only one site is available just use it. If they're more set the
output variable to "".

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2010-04-27 15:24:41 +10:00
Andrew Tridgell
7e2b3ab14f s4-repl: added a workaround for WERR_DS_DRA_NO_REPLICA DsReplicaSync errors
The 0xc0002104/WERR_DS_DRA_NO_REPLICA seems to be spurious, and can be
avoided by setting DRSUAPI_DRS_SYNC_ALL in the DsReplicaSync request.

We need to investigate this further, and find out from MS why this is
sometimes being sent, even when the target DC has the right repsFrom
entries
2010-04-27 15:24:40 +10:00
Andrew Tridgell
b0aa476948 s4-drs: add entries to repsTo based on calculated repsFrom
This is based on the documentation: "the KCC will automatically create
the Reps-To attributes on destination DSAs based on other DSAs
Reps-From entries."
2010-04-27 10:38:59 +10:00
Andrew Tridgell
3119296e42 s4-drepl: don't setup a repsFrom from a DC that isn't a master for a NC
use hasMasterNCs to see what NCs we should be pulling from each DC
2010-04-27 10:38:59 +10:00
Andrew Tridgell
5b81962ed1 s4-repl: these messages are common, and don't deserve debug level 1
getting older attributes is quite common
2010-04-27 10:38:58 +10:00
Andrew Tridgell
8aa30f9580 s4-repl: on a failed request, clear the current ptr
this prevents the queue being stuck on failure
2010-04-27 10:38:58 +10:00
Andrew Tridgell
9b18b339c0 s4-repl: end repl request when not doing an UpdateRefs
otherwise the queue is stuck forever
2010-04-27 10:38:58 +10:00
Andrew Tridgell
5fb60bc311 s4-repl: don't delete repsTo entry on DsReplicaSync
we rely on the highestUSN counters instead. W2K8 does not resend
DsUpdateRefs each time, and the WSPP docs do not indicate that repsTo
should be deleted
2010-04-27 10:38:58 +10:00
Andrew Tridgell
5ce1dbf2e3 s4-ddb: don't create partitions with the UNINSTANT flag set
these partitions and not on the server we are replicating from. Also
check for deleted partitions.

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-04-26 19:06:07 +10:00
Andrew Tridgell
a31c711ba7 s4-drs: allow getncchanges requests to non WRIT_REP partitions for extended ops
Needed for RID allocation

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-04-26 19:06:07 +10:00
Andrew Tridgell
159de40b0b s4-drepl: don't send an UpdateRefs unless its a plain replication
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-04-26 19:06:06 +10:00
Andrew Tridgell
267e0b3616 s4-drs: make links to foreign partitions non-fatal
DN links outside the set of partitions we are replication should be
allowed.

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-04-26 19:06:06 +10:00
Matthieu Patou
c88b83b7c1 s4 dns: Allow to specify static grant entries to be added to the dynamicaly generated named.conf.update
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2010-04-24 14:09:10 +02:00
Andrew Tridgell
bb1ba4ff76 s4-drs: added new SECURITY_RO_DOMAIN_CONTROLLER level
This is used for allowing operations by RODCs, and denying them
operations that should only be allowed for a full DC

This required a new domain_sid argument to
security_session_user_level()

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Pair-Programmed-With: Rusty Russell <rusty@samba.org>
2010-04-22 19:36:16 +10:00
Andrew Tridgell
1f92df90fd s4-drs: removed dsdb_validate_client_flags()
This test is in the wrong place. We end up validating our own flags.

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-04-22 19:36:16 +10:00
Andrew Tridgell
0d3823b152 s4-dsdb: removed an unused variable 2010-04-22 19:36:16 +10:00
Andrew Tridgell
a06b537cc3 s4-dsdb: added dsdb_validate_invocation_id()
this validates that a invocationID matches an account sid

This will be used to ensure that we don't allow DRS replication
from someone a non-DC or administrator

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-04-22 19:36:16 +10:00
Andrew Tridgell
1ecefd74a2 s4-dsdb: added dsdb_get_extended_dn_sid()
This will be used by the RODC code

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-04-22 19:36:15 +10:00
Andrew Tridgell
70cc9fd5c6 s4-dsdb: moved rodc schema validation to samldb.c
This means we are only doing the checks for schema changes

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-04-22 19:36:15 +10:00
Fernando J V da Silva
73513fb7e7 s4-drs: Use new samdb_rodc() function in s4 code
This patch fits the calling to the new samdb_rodc() function and
fix a little bug in this function.

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2010-04-22 19:36:15 +10:00
Fernando J V da Silva
59aa0a07d2 s40-drs: Do not send GetNCChanges messages to RODCs
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2010-04-22 19:36:15 +10:00
Fernando J V da Silva
fbdbd67c76 s4-drs: dsdb_validate_client_flags() function
This function is intended to check if some client is not lying about
his flags. At this moment, it only checks for RODC flags.

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2010-04-22 19:36:15 +10:00
Fernando J V da Silva
57bcdf008f s4-drs: samdb_is_rodc() function and new samdb_rodc() function
This patch creates the samdb_is_rodc() function, which looks for
the NTDSDSA object for a DC that has a specific invocationId
and if msDS-isRODC is present on such object and it is TRUE, then
consider the DC as a RODC.
The new samdb_rodc() function uses the samdb_is_rodc() function
for the local server.

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2010-04-22 19:36:15 +10:00
Fernando J V da Silva
c023fc217e s4-drs: Do not allow system-critical attributes to be RODC filtered
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2010-04-22 19:36:14 +10:00
Andrew Bartlett
47e7e48746 s4:ldap-backend Fix LSA test failures with OpenLDAP backend - convert SIDs
The SIDs in some queries were not being passed as binary, but as
strings in comparison with the securityIdentifer object.  We need to
recognise that these are SIDs in the simple_ldap_map.

Andrew Bartlett
2010-04-22 18:37:19 +10:00
Andrew Bartlett
cbb818222a s4:OpenLDAP-backend Use the new rdnval module in OpenLDAP
This is rather than rdn_name, which tries to do the job on the client
side.  We need to leave this module in the stack for Fedora DS (and of
course the LDB backend).

Andrew Bartlett
2010-04-22 18:37:18 +10:00
Andrew Bartlett
9eacde808e s4:dsdb Revert accidentilly commited change for LDAP backends
In the future, LDAP backends will be resposible for maintaining the
'name' attributes.

Andrew Bartlett
2010-04-22 18:37:18 +10:00
Andrew Tridgell
2dcc84432e s4-schema: allow revision numbers of zero
w2k8r2 sends a revision of zero in the initial schema replication
during a net vampire

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-04-21 13:35:56 +10:00
Andrew Bartlett
ea5cf7ce05 s4:provision Pass in the invoication ID and NTDS Settings DN to Schema()
By putting these values into the cache on the LDB, this reduces some
of the noise in provision, particularly with the LDAP backend.

Andrew Bartlett
2010-04-20 12:11:18 +10:00
Matthias Dieter Wallnöfer
e0d6f1a6da s4:dsdb/dns/dns_update.c - fix a typo 2010-04-17 20:42:37 +02:00
Nadezhda Ivanova
eef184301a s4:Replaced dsdb_get_dom_sid_from_ldb_message() with samdb_result_dom_sid() 2010-04-16 14:28:35 +03:00
Stefan Metzmacher
a7f8c197ad s4:rootdse: only return "tokenGroups", when the client asked for them
metze
2010-04-15 19:02:26 +02:00
Jelmer Vernooij
13bbfa3fca pydsdb: Fix memory leak on invalid parameters, formatting, trivial
typos.
2010-04-15 18:45:41 +02:00
Matthieu Patou
d784ecec55 s4 python: Add a function to get the oid of an attribute when the attid is known
This function is mainly to help decoding replPropertyMetaData in python

Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
2010-04-15 18:45:41 +02:00
Matthias Dieter Wallnöfer
34ff1c6944 s4:samdb_server_site_name - fix indentation 2010-04-13 15:40:43 +02:00
Matthias Dieter Wallnöfer
a894d6cc37 s4:acl/descriptor LDB module - distinguish between root and default basedn
The first is the forest base DN, the second the domain base DN. At the moment
we assume that they are both the same but it hasn't to be so.

Nadia, I would invite you to fix the outstanding parts regarding this (I added
comments).
2010-04-13 09:32:34 +02:00
Matthias Dieter Wallnöfer
719a46913b s4:dsdb/common/util.c - add a call which determines centrally the forest DNS domainname 2010-04-13 09:32:33 +02:00
Matthias Dieter Wallnöfer
c116d80053 s4:remove "samdb_root_dn", "samdb_base_dn", "samdb_config_dn" and "samdb_schema_dn"
They aren't needed anymore.
2010-04-13 08:57:07 +02:00
Matthias Dieter Wallnöfer
ad9e407357 Revert "s4:prefer "samdb_*_dn" basedn calls over the "ldb_get_*_dn" functions"
We should use the "ldb_get_*_basedn" calls since they are available in the LDB
library.
2010-04-13 08:55:15 +02:00
Matthias Dieter Wallnöfer
8e4c34880a s4:objectclass LDB module - remove a unneeded newline 2010-04-13 08:24:09 +02:00
Matthias Dieter Wallnöfer
98ce053efd s4:prefer "samdb_*_dn" basedn calls over the "ldb_get_*_dn" functions
Purely cosmetic change.
2010-04-12 18:49:01 +02:00
Jelmer Vernooij
3a34b5f35e subunit: Remove more test output that could be interpreted by subunit. 2010-04-11 20:57:33 +02:00