1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-07 00:58:40 +03:00

1916 Commits

Author SHA1 Message Date
Anatoliy Atanasov
7200c25646 Revert "s4-rodc: Fix provision warnings by creating ntds objectGUID in provision"
This reverts commit c3cbb846d0bfbaa11fd255bada7fa5fe502d4d96.
The fix is not correct, we should cache a bool to answer amIRODC
2010-05-11 12:54:18 +03:00
Stefan Metzmacher
8489934ce3 Revert "s4:password_hash LDB module - don't break the provision"
This reverts commit 6276343ce1b7dd7d217e5a419c09f209f5f87379.

This is not needed anymore.

metze
2010-05-11 08:38:26 +02:00
Stefan Metzmacher
ad5b9ae8dc Revert "s4:password hash LDB module - check that password hashes are != NULL before copying them"
This reverts commit fa87027592f71179c22f132e375038217bc9d36a.

This check is done one level above now.

metze
2010-05-11 08:38:02 +02:00
Stefan Metzmacher
8ff38004e8 s4:dsdb/password_hash: only try to handle a hash in the unicodePwd field if it's given
Sorry, I removed this logic while cleaning up indentation levels...

metze
2010-05-11 08:37:03 +02:00
Matthias Dieter Wallnöfer
56421886de s4:password_hash LDB module - we might not have a cleartext password at all
When we don't have the cleartext of the new password then don't check it
using "samdb_check_password".
2010-05-10 23:50:03 +02:00
Matthias Dieter Wallnöfer
4f25baecc1 s4:password_hash LDB module - quiet a warning 2010-05-10 20:04:37 +02:00
Matthias Dieter Wallnöfer
fa87027592 s4:password hash LDB module - check that password hashes are != NULL before copying them 2010-05-10 20:02:21 +02:00
Matthias Dieter Wallnöfer
6276343ce1 s4:password_hash LDB module - don't break the provision
This is to don't break the provision process at the moment. We need to find
a better solution.
2010-05-10 19:51:31 +02:00
Matthias Dieter Wallnöfer
029351571a s4:samdb_set_password - adapt it for the user password change handling
Make use of the new "change old password checked" control.
2010-05-10 19:12:26 +02:00
Matthias Dieter Wallnöfer
6e8098b261 s4:samdb_set_password/samdb_set_password_sid - Rework
Adapt the two functions for the restructured "password_hash" module. This
means that basically all checks are now performed in the mentioned module.

An exception consists in the SAMR password change calls since they need very
precise NTSTATUS return codes on wrong constraints ("samr_password.c") file
2010-05-10 19:07:46 +02:00
Stefan Metzmacher
fc8e3ffb5f s4:password_hash - Implement password restrictions
Based on the Patch from Matthias Dieter Wallnöfer <mwallnoefer@yahoo.de>.

metze
2010-05-10 18:06:54 +02:00
Matthias Dieter Wallnöfer
6a69ec2f5a s4:password_hash - Rework to handle password changes
- Implement the password restrictions as specified in "samdb_set_password"
  (complexity, minimum password length, minimum password age...).
- We support only (administrative) password reset operations at the moment
- Support password (administrative) reset and change operations (consider
  MS-ADTS 3.1.1.3.1.5)
2010-05-10 18:06:24 +02:00
Matthias Dieter Wallnöfer
12c4b09fd5 s4:password_hash - Rework unique value checks
Windows Server performs the constraint checks in a different way than we do.
All testing has been done using "passwords.py".
2010-05-10 17:54:16 +02:00
Matthias Dieter Wallnöfer
3ce4a0c5f2 s4:password_hash - Various (mostly cosmetic) prework
- Enhance comments
- Get some more attributes from the domain and user object (needed later)
- Check for right objectclass on change/set operations (instances of
  "user" and/or "inetOrgPerson") - otherwise forward the request
- (Cosmetic) cleanup in asynchronous results regarding return values
2010-05-10 17:54:15 +02:00
Matthias Dieter Wallnöfer
726fb35f9f s4:dsdb: add new controls
- Add a new control for getting status informations (domain informations,
  password change status) directly from the module
- Add a new control for allowing direct hash changes
- Introduce an addtional control "change_old password checked" for the password
2010-05-10 17:54:15 +02:00
Anatoliy Atanasov
c3cbb846d0 s4-rodc: Fix provision warnings by creating ntds objectGUID in provision 2010-05-10 17:24:02 +03:00
Matthias Dieter Wallnöfer
e2806f9e4d s4:acl ldb module - fix typos 2010-05-10 12:39:44 +02:00
Matthias Dieter Wallnöfer
946993238f s4:dsdb/util.c - Add a new function for retrieving password change attributes
This is needed since we have not only reset operations on password fields
(attributes marked with REPLACE flag) but also change operations which can be
performed by users itself. They have one attribute with the old value marked
with the REMOVE flag and one with the new one marked with the ADD flag.
This function helps to retrieve them (argument "new" is used for the new
password on both reset and change).
2010-05-10 12:20:27 +02:00
Matthias Dieter Wallnöfer
1cdc46a90a s4:samldb LDB module - make "samldb_member_check" synchronous again 2010-05-09 20:26:31 +02:00
Matthias Dieter Wallnöfer
4153da4069 s4:samldb LDB module - make "samldb_prim_group_users_check" synchronous again 2010-05-09 19:16:13 +02:00
Matthias Dieter Wallnöfer
d91ee0b095 s4:samldb LDB module - update the copyright notice 2010-05-09 19:16:12 +02:00
Andrew Bartlett
6dfa851ce9 s4:dsdb Provide an intelegent fallback if not CN=Subnets is found
We may as well fall back rather than return NULL (which callers don't
do useful things with).

Andrew Bartlett
2010-05-09 21:18:52 +10:00
Stefan Metzmacher
435ce8ebd7 dsdb/password_hash: remove usage of msDs-KeyVersionNumber
metze
2010-05-09 21:18:52 +10:00
Andrew Bartlett
7b11ce738d s4:dsdb Use replPropertyMetaData as the basis for msDS-KeyVersionNumber
This means that the existing kvno will no longer be valid, all
unix-based domain members may need to be rejoined, and
upgradeprovision run to update the local kvno in
secrets.ldb/secrets.keytab.

This is required to match the algorithm used by Windows DCs, which we
may be replicating with.  We also need to find a way to generate a
reasonable kvno with the OpenLDAP backend.

Andrew Bartlett
2010-05-09 21:18:52 +10:00
Anatoliy Atanasov
f84aeea739 s4/rodc: Support read-only database
Check on modify if we are RODC and return referral.
On the ldap backend side now we pass context and ldb_modify_default_callback
to propagate the referral error to the client.
2010-05-04 18:32:18 +02:00
Anatoliy Atanasov
bcdaa23798 s4/rodc: Fix the callbacks up the stack to handle referrals on modify requests 2010-05-04 18:31:47 +02:00
Anatoliy Atanasov
d3081741c9 s4/rodc: Implement msDS-isRODC constructed attr 2010-05-03 18:28:00 +02:00
Nadezhda Ivanova
e2e39117bc Replaced DS_FLAG_ATTR_IS_CRITICAL with SCHEMA_FLAG_ATTR_IS_CRITICAL. 2010-05-03 16:47:56 +02:00
Nadezhda Ivanova
15b42d6515 Added a function to check if an attribute can belong to a filtered replica. 2010-05-03 14:50:10 +02:00
Andrew Bartlett
dfd7ad2083 s4:dsdb Fix use of memory after free in repl_meta_data
The upgraded link values are were allocated on tmp_ctx, and need to be
kept until they are written to the DB.  If we don't give the correct
context, they will be gone after the talloc_free(tmp_ctx).

Found by Matthieu Patou <mat+Informatique.Samba@matws.net>

Andrew Bartlett
2010-05-01 22:20:25 +10:00
Anatoliy Atanasov
dbbbc7d1f8 s4/rodc: RODC FAS initial implementation 2010-04-29 10:18:06 +03:00
Kamen Mazdrashki
59830d0a6e s4/dsdb: schemaInfo revision may be 0
In case schemaInfo value is still not set, WinAD supplies
schemaInfo blob with revision = 0 and GUID_ZERO
2010-04-29 04:54:07 +03:00
Kamen Mazdrashki
a8438015ca s4/dsdb: remove unused dsdb_schema_info_create() function 2010-04-29 04:54:07 +03:00
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