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

23858 Commits

Author SHA1 Message Date
Kamen Mazdrashki
ca80918613 s4-dsdb: Use dsdb_syntax_ctx in *_validate_ldb functions 2010-08-19 03:34:01 +03:00
Kamen Mazdrashki
b7d1586ccd s4-dsdb: Add context structure for dsdb_syntax conversion functions
This structure is intended to hold context-dependent data.

Syntax-conversion and object-conversion functions need
that data to convert objects and attributes from drs-to-ldb
and ldb-to-drs correctly.

For instance: ATTID value depends on whether we are converting
object from partition different that Schema partition.
2010-08-19 03:34:01 +03:00
Kamen Mazdrashki
20a8481d3f s4-test-dssync: remove unused variable 2010-08-19 03:34:00 +03:00
James Peach
effc61cb78 smbtorture: Make SAMBA3CASEINSENSITIVE report failures properly. 2010-08-17 20:19:35 -07:00
James Peach
21fe753303 smbtorture: Ensure that the RPC setup returns correct status. 2010-08-17 20:19:17 -07:00
Andrew Bartlett
f37793ef0a s4:ldap_server use talloc_unlink() to avoid talloc_free() with references
Both the session_info and the ldb can have references.

Andrew Bartlett
2010-08-18 10:08:43 +10:00
Andrew Bartlett
23dc2e4244 s4:auth Change {anonymous,system}_session to use common session_info generation
This also changes the primary group for anonymous to be the anonymous
SID, and adds code to detect and ignore this when constructing the token.

Andrew Bartlett
2010-08-18 09:50:45 +10:00
Andrew Bartlett
2ceb3d8d35 s4:auth Avoid doing database lookups for NT AUTHORITY users 2010-08-18 09:50:45 +10:00
Andrew Bartlett
ba52834dd9 s4:auth Remove system_session_anon() from python bindings 2010-08-18 09:50:44 +10:00
Andrew Bartlett
a68a5592c5 s4:auth Remove the system:anonymous parameter used for the LDAP backend
This isn't needed any more, and just introduces complexity.
2010-08-18 09:50:44 +10:00
Andrew Bartlett
d99ff145ae s4:auth Remove special case constructor for admin_session()
There isn't a good reason why this code is duplicated.

Andrew Bartlett
2010-08-18 09:50:44 +10:00
Andrew Bartlett
7c6ca95bec s4:security Remove use of user_sid and group_sid from struct security_token
This makes the structure more like Samba3's NT_USER_TOKEN
2010-08-18 09:50:38 +10:00
Andrew Bartlett
60086dcf9a s4:ntvfs Don't treat the user SID and primary group SID special for idmap
This simply askes IDMAP about all the user SIDs, rather than the user
and group sid, followed by all but the first two sids from the token.

Andrew Bartlett
2010-08-18 09:30:08 +10:00
Andrew Bartlett
e229f68b3e s4:security Bring in #defines for the user and primary group token location
This will allow us to stop duplicating the user and primary group SID in the
struct security_token, and therefore make it more like the NT_USER_TOKEN
in Samba3.

Andrew Bartlett
2010-08-18 09:30:08 +10:00
Matthias Dieter Wallnöfer
786c41b095 s4:netlogon RPC server - "ServerPasswordSet" operations - introduce also here the new password change syntax 2010-08-17 19:24:23 +02:00
Matthias Dieter Wallnöfer
4c8edc8f5e s4:kdc/kpasswdd.c - let the user change his own password with his own rights
Now it's finally possible that the user can change his password with a DSDB
connection using his credentials.

NOTICE: I had to extract the old password from the SAMDB since I was unable to
find it somewhere else (authinfo for example).
2010-08-17 18:45:34 +02:00
Matthias Dieter Wallnöfer
cd711da6ca s4:samr RPC server - samr_password.c - make real user password changes work
Now it's finally possible that the user can change his password with a DSDB
connection using his credentials.
2010-08-17 18:45:34 +02:00
Matthias Dieter Wallnöfer
2a423e0547 s4:kdc/rpc server - adapt the "samdb_set_password" calls which perform password sets 2010-08-17 18:45:34 +02:00
Matthias Dieter Wallnöfer
eb345ebedf s4:samdb_set_password/samdb_set_password_sid - make more arguments "const" 2010-08-17 18:45:33 +02:00
Matthias Dieter Wallnöfer
d72d7f9c5f s4:samdb_set_password/samdb_set_password_sid - make the adaptions to support the password change control
And introduce parameters to pass the old password hashes.
2010-08-17 18:45:33 +02:00
Matthias Dieter Wallnöfer
35954bb310 s4:password_hash LDB module - perform the adaptions to understand the new password change control 2010-08-17 18:45:33 +02:00
Matthias Dieter Wallnöfer
23bd3a7417 s4:acl LDB module - support password changes over the DSDB_CONTROL_PASSWORD_CHANGE_OID control
This control is used from the SAMR and "kpasswd" password changes. It is
strictly private and means "this is a password change and not a password set".
2010-08-17 18:45:33 +02:00
Matthias Dieter Wallnöfer
895a9fbbfb s4:DSDB - DSDB_CONTROL_PASSWORD_CHANGE_OID - add a structure as value to the control
This contains the NT and/or LM hash of the password specified by the user.
2010-08-17 18:45:32 +02:00
Matthias Dieter Wallnöfer
bbb9dc806e s4:DSDB - rename the "DSDB_CONTROL_PASSWORD_CHANGE_OLD_PW_CHECKED_OID"
Rename it to "DSDB_CONTROL_PASSWORD_CHANGE_OID". This control will afterwards
contain a record with the specified old password as NT and/or LM hash.
2010-08-17 18:45:32 +02:00
Stefan Metzmacher
656607943d s4:selftest: recreate $SELFTEST_PREFIX/s4client with each make test run
Otherwise just fill the disks of the build-farm hosts.

metze
2010-08-17 17:32:13 +02:00
Stefan Metzmacher
39f99e7d53 s4:selftest: run ldapi tests in 'dc:local' environment
metze
2010-08-17 17:32:11 +02:00
Nadezhda Ivanova
38e41728c5 s4-tests: Added tests for acl checks on search requests 2010-08-17 17:05:42 +03:00
Andrew Tridgell
56f04188df s4-ldb: ensure element flags are zero in ldb search return
the distinguishedName element was getting an uninitialised flags value
2010-08-17 21:21:51 +10:00
Andrew Tridgell
bb2ba90663 s4-ldbwrap: ensure session_info in ldb opaque remains valid
A DRS DsBind handle can be re-used in a later connection. This implies
reuse of the session_info for the connection. If the first connection
is shutdown then the session_info in the sam context on the 2nd
connection must remain valid.
2010-08-17 21:21:51 +10:00
Andrew Tridgell
8835a360ca s4-rpcserver: log unknown RPC calls at debug level 3
This was added as we are occasionally getting an encrypted unknown
netlogon call, and I'm having trouble looking at it in wireshark
2010-08-17 21:21:51 +10:00
Andrew Tridgell
2688375ffe s4-netlogon: added SEC_CHAN_RODC
This seems to be equivalent to SEC_CHAN_BDC, but for RODCs
2010-08-17 21:21:51 +10:00
Andrew Tridgell
82c171aa55 s4-net: use an encrypted ldap session when setting passwords
this allows for "net setpassword -H ldap://server -Uusername%password USERNAME"
to set a password remotely on a windows DC

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-08-17 21:21:51 +10:00
Andrew Tridgell
896f10301c s4-dsdb: check the type of session_info from the opaque
we saw a crash with a bad pointer here, and this may help track it
down

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-08-17 21:21:51 +10:00
Andrew Tridgell
21729b63f0 s4-drs: allow getncchanges from RODC with WRIT_REP set
w2k8r2 is setting this bit as a RODC. Instead of refusing the
replication, we now remove the bit from req8, which means other places
in the code that check this bit can stay the same

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-08-17 21:21:50 +10:00
Andrew Tridgell
45a2b408ba s4-drs: added domain_sid to DRS security checks
we need the domain_sid to determine if the account is a RODC for our
domain

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-08-17 21:21:50 +10:00
Andrew Tridgell
84bedf4028 s4-drs: fixed check for SECURITY_RO_DOMAIN_CONTROLLER
check more than the user_sid, and also check for the right rid value

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-08-17 21:21:50 +10:00
Andrew Tridgell
4e9daa0f03 s4-dsdb: added support for UF_PARTIAL_SECRETS_ACCOUNT
when this is in user_account_control the account is a RODC, and we
need to set the primaryGroupID to be DOMAIN_RID_READONLY_DCS

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-08-17 21:21:50 +10:00
Andrew Tridgell
df14f645b3 s4-dsdb: cope with cracknames of form dnsdomain\account
this is used by w2k8r2 when doing a RODC dcpromo

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-08-17 21:21:50 +10:00
Andrew Tridgell
f6e0b151a3 s4-dsdb: set LDB_FLAG_INTERNAL_DISABLE_VALIDATION for msDS-SecondaryKrbTgtNumber
msDS-SecondaryKrbTgtNumber is setup with a value that is outside the
range allowed by the schema (the schema has
rangeLower==rangeUpper==65536). We need to mark this element as being
internally generated to avoid the range checks

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-08-17 21:21:50 +10:00
Andrew Tridgell
0caf347098 s4-ldb: added LDB_FLAG_INTERNAL_DISABLE_VALIDATION
When this flag is set on an element in an add/modify request then the
normal validate_ldb() call that checks the element against schema
constraints is disabled

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-08-17 21:21:50 +10:00
Andrew Tridgell
9e27201b24 s4-ldb: added LDB_FLAG_INTERNAL_MASK
This ensures that internal bits for the element flags in add/modify
requests are not set via the ldb API

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-08-17 21:21:50 +10:00
Andrew Tridgell
6baa834ebe s4-ldb: use LDB_FLAG_MOD_TYPE() to extract element type from messages
The flags field of message elements is part of a set of flags. We had
LDB_FLAG_MOD_MASK for extracting the type, but it was only rarely
being used (only 1 call used it correctly). This adds
LDB_FLAG_MOD_MASK() to make it more obvious what is going on.

This will allow us to use some of the other flags bits for internal
markers on elements

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-08-17 21:21:50 +10:00
Andrew Tridgell
527042f78b s4-dsdb: support LDB_CONTROL_RODC_DCPROMO_OID for nTDSDSA add
this control disables the system only check for nTDSDSA add operations

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-08-17 21:21:50 +10:00
Andrew Tridgell
974279b67d s4-dsdb: fixed test for LDB_CONTROL_RODC_DCPROMO_OID
the ldb_msg_add_fmt() call returns LDB_SUCCESS on success
2010-08-17 21:21:50 +10:00
Andrew Tridgell
eed3838b48 s4-ldapserver: support controls on ldap add and rename
we need to pass the controls down to the add and rename ldb operations

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-08-17 21:21:50 +10:00
Andrew Tridgell
191d632e23 s4-dsdb: added support for LDB_CONTROL_RODC_DCPROMO_OID
this control adds a unique msDS-SecondaryKrbTgtNumber attribute to a
user object.

There is some 'interesting' interaction with the rangeLower and
rangeUpper attributes and this add. We don't implementat
rangeLower/rangeUpper yet, but when we do we'll need an override for
this control (or be careful about module ordering).

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-08-17 21:21:49 +10:00
Andrew Tridgell
dcd9fcc7b3 s4-ldap: use common functions for ldap flag controls encode/decode
many controls are simple present/not-present flags, and don't need
their own parsers

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-08-17 21:21:49 +10:00
Brad Hards
8f3542c58e build fix 2010-08-17 08:44:28 +10:00
Andrew Tridgell
045e04a2c6 s4-ldb: test the 'displayName=a,b' bug
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-08-17 08:44:28 +10:00
Andrew Tridgell
ec3ed2898f s3-provision: cope with the policy directory already existing
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-08-17 08:44:28 +10:00