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

1959 Commits

Author SHA1 Message Date
Matthias Dieter Wallnöfer
6b7e436871 s4:acl LDB module - password attributes - check also the "dBCSPwd" attribute
It's also a possible password change/set attribute candidate.
2010-07-08 21:52:15 +02:00
Matthias Dieter Wallnöfer
921308f1e8 s4:acl LDB module - move a "mem_ctx" creation to the place where it is actually checked
Memory allocations and their result checks should be as tight as possible.
2010-07-08 19:28:44 +02:00
Nadezhda Ivanova
10c60f2372 Added a test to prove by default users can change each other's pass if the old is known 2010-07-08 15:38:16 +03:00
Kamen Mazdrashki
609b865691 s4-dsdb/util: Reorder DSDB_FLAG_* checks
On good thing about having more clear function interfaces
(and forcing callers to specify clearly what they want)
is that now I can execute following search:
git grep DSDB_FLAG_NEXT_MODULE | wc -l

This showed that DSDB_FLAG_NEXT_MODULE flag is about 6 times
more frequently used than DSDB_FLAG_OWN_MODULE.
So this should reduce branch prediction by six times
in this part of the code, right :)
2010-07-08 02:38:36 +03:00
Kamen Mazdrashki
0c4bbb7106 s4-dsdb: Implement module switching in dsdb_module_search_dn()
This allows caller to choose from where to start DN search
2010-07-08 02:38:36 +03:00
Kamen Mazdrashki
62a0f11dcb s4-source4/dsdb/samdb/ldb_modules/acl.c Use DSDB_FLAG_NEXT_MODULE flag 2010-07-08 02:38:35 +03:00
Kamen Mazdrashki
02f0c6d1eb s4-source4/dsdb/samdb/ldb_modules/linked_attributes.c Use DSDB_FLAG_NEXT_MODULE flag 2010-07-08 02:38:35 +03:00
Kamen Mazdrashki
0d2116a423 s4-source4/dsdb/samdb/ldb_modules/naming_fsmo.c Use DSDB_FLAG_NEXT_MODULE flag 2010-07-08 02:38:35 +03:00
Kamen Mazdrashki
b18ab82604 s4-source4/dsdb/samdb/ldb_modules/operational.c Use DSDB_FLAG_NEXT_MODULE flag 2010-07-08 02:38:34 +03:00
Kamen Mazdrashki
7694b1964f s4-source4/dsdb/samdb/ldb_modules/partition_init.c Use DSDB_FLAG_NEXT_MODULE flag 2010-07-08 02:38:34 +03:00
Kamen Mazdrashki
b62715964a s4-source4/dsdb/samdb/ldb_modules/pdc_fsmo.c Use DSDB_FLAG_NEXT_MODULE flag 2010-07-08 02:38:33 +03:00
Kamen Mazdrashki
2ee14378c3 s4-source4/dsdb/samdb/ldb_modules/repl_meta_data.c Use DSDB_FLAG_NEXT_MODULE flag 2010-07-08 02:38:33 +03:00
Kamen Mazdrashki
d7bcac5a9f s4-source4/dsdb/samdb/ldb_modules/ridalloc.c Use DSDB_FLAG_NEXT_MODULE flag 2010-07-08 02:38:33 +03:00
Kamen Mazdrashki
dc720739ab s4-source4/dsdb/samdb/ldb_modules/samba_dsdb.c Use DSDB_FLAG_NEXT_MODULE flag 2010-07-08 02:38:32 +03:00
Kamen Mazdrashki
8c7a6a8dc7 s4-source4/dsdb/samdb/ldb_modules/schema_load.c Use DSDB_FLAG_NEXT_MODULE flag 2010-07-08 02:38:32 +03:00
Kamen Mazdrashki
64c31b7e0a s4-source4/dsdb/samdb/ldb_modules/util.c Use DSDB_FLAG_NEXT_MODULE flag 2010-07-08 02:38:32 +03:00
Andrew Tridgell
87df785a68 s4-dsdb: use ldb_operr() in the dsdb code
this replaces "return LDB_ERR_OPERATIONS_ERROR" with "return ldb_operr(ldb)"
in places in the dsdb code where we don't already explicitly set an
error string. This should make is much easier to track down dsdb
module bugs that result in an operations error.
2010-07-07 20:14:55 +10:00
Matthias Dieter Wallnöfer
502bddf767 s4:new_partition LDB module - fix an uninitalised variable warning
> [ 651/1946] Compiling dsdb/samdb/ldb_modules/new_partition.c
> ../dsdb/samdb/ldb_modules/new_partition.c: In function 'new_partition_add':
> ../dsdb/samdb/ldb_modules/new_partition.c:195: warning: 'down_req' may be used uninitialized in this function
The "down_req" variable isn't used anymore.
2010-07-06 21:54:21 +02:00
Matthias Dieter Wallnöfer
9c8135785a s4:dsdb - samdb_result_force_password_change - also when "pwdLastSet" is "-1" we shouldn't force a password change
This value is set by the ADUC console.
2010-07-06 21:54:20 +02:00
Stefan Metzmacher
a236bc4b33 s4:dsdb/password_hash: implement DSDB_CONTROL_BYPASS_PASSWORD_HASH_OID
metze
2010-07-05 18:00:15 +02:00
Stefan Metzmacher
6d7b9648e5 s4:dsdb: allocate DSDB_CONTROL_BYPASS_PASSWORD_HASH_OID
When importing users from Samba3 we need to control all values.

metze
2010-07-05 18:00:14 +02:00
Stefan Metzmacher
24d6950f63 s4:dsdb/password_hash: fix some c++ compiler warnings
metze
2010-07-05 18:00:14 +02:00
Nadezhda Ivanova
d300085868 Changed passwords.py to use the correct account as acl checks now pass. 2010-07-05 00:20:37 +03:00
Nadezhda Ivanova
81240b13b3 s4-dsdb: Implementation of User-Change-Password and User-Force-Password-Change
These CARs need to be checked on password change and password reset operations.
    Apparently the password attributes are not influenced by Write Property.
    Single detele operations and modifications of dBCSPwd are let through to the
    password_hash module. This is determined experimentally.
2010-07-05 00:17:38 +03:00
Matthias Dieter Wallnöfer
343e9320ba s4:subtree_rename LDB module - Cosmetic fixes 2010-07-04 22:05:18 +02:00
Matthias Dieter Wallnöfer
7d483cdc04 s4:subtree_delete LDB module - fix comments and add my copyright
(I've introduced the subtree delete mechanism)
2010-07-04 22:05:17 +02:00
Matthias Dieter Wallnöfer
f41d9eb8dc s4:dsdb/tests/python/ldap_schema.py - remove a now useless "schemaUpdateNow" request
"schemaUpdateNow" on s4 is now a non-op and therefore not strictly needed anymore.
2010-07-03 15:37:45 +02:00
Matthias Dieter Wallnöfer
465c601071 s4:urgent_replication.py test - remove unneeded "relax" control parameters 2010-07-03 15:30:20 +02:00
Matthias Dieter Wallnöfer
326aac06f5 s4:schema_load LDB module - fix a segfault condition on schema refresh
The schema refresh operation itself starts requests from the top of the LDB
modules stack (see call "dsdb_schema_set_attributes" - search operations).
This doesn't work well when these do perform "dsdb_get_schema" calls. Since the
new schema isn't marked as "refreshed" atm (but in fact it still is - we didn't
terminate the reload/refresh yet) we could perform other calls to
"dsdb_schema_refresh" and run into serious trouble (segfault).
2010-07-03 15:28:57 +02:00
Matthias Dieter Wallnöfer
02eab66026 s4:schema_set.c - Fix a comment 2010-07-03 14:53:03 +02:00
Matthias Dieter Wallnöfer
d1ee7ab16e s4:dsdb_schema_set_attributes - remove unneeded filter criterias
We already choose the right entry by specifying the right basedn with scope
"LDB_SCOPE_BASE".
2010-07-03 14:53:02 +02:00
Matthias Dieter Wallnöfer
368aa25f7c s4:dsdb_module_load_partition_usn - check for "res->count" equal/unequal to 1 2010-07-03 12:47:46 +02:00
Matthias Dieter Wallnöfer
4df9757b48 s4:schema_set.c - fix typo 2010-07-03 12:36:34 +02:00
Matthias Dieter Wallnöfer
de81160e75 s4:schema_load.c - jump to "failed" on an error condition 2010-07-03 12:35:16 +02:00
Matthias Dieter Wallnöfer
ec9fa906c7 s4:dsdb/tests/passwords.py - set and reset the "minPwdAge" properly
After a patch proposal of Nadya and some reflection I think that it's really
worth to change all tests which need a "0" "minPwdAge" to set it manually and
reset the default afterwards.

So we can finally introduce the default "minPwdAge" on provision.

Patch proposal by: Nadya Ivanova
2010-07-03 11:28:21 +02:00
Nadezhda Ivanova
86cde0a7dc Tests for user-change-password and force-password-change access rights 2010-07-02 16:38:05 +03:00
Anatoliy Atanasov
62341537d7 s4/schema: remove unnecessary deletion of dsdb_schema cached pointer
This is needed so we can find and free old schemas based using
the cached pointer
2010-07-02 11:55:33 +03:00
Andrew Tridgell
2671b5aeb0 s4-dsdb: fixed spelling of supportedSASLMechanisms
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-07-02 12:49:04 +10:00
Andrew Bartlett
c48279896d s4:dsdb Ensure we free old schema copies
It was reported by aatanasov that we kept around one whole schema per
modification made.  This does not fix that, but I hope moves us closer
to a fix

The most important part of the fix is that:

-		if (schema_out != schema_in) {
-			talloc_unlink(schema_in, ldb);
-		}

was the wrong way around.  This is now handled in the schema_set calls.

Andrew Bartlett
2010-07-02 10:08:16 +10:00
Kamen Mazdrashki
5a66edc99e s4/dsdb: Assert DSDB_FLAG_*_MODULE is always passed in function call
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-07-02 10:08:12 +10:00
Kamen Mazdrashki
73474998e1 s4-source4/dsdb/samdb/ldb_modules/util.c Use DSDB_FLAG_NEXT_MODULE flag
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-07-02 10:08:07 +10:00
Kamen Mazdrashki
682f7a5338 s4-source4/dsdb/samdb/ldb_modules/subtree_delete.c: Use DSDB_FLAG_NEXT_MODULE flag
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-07-02 10:08:02 +10:00
Kamen Mazdrashki
bf373d5c29 s4-source4/dsdb/samdb/ldb_modules/schema_load.c: Use DSDB_FLAG_NEXT_MODULE flag
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-07-02 10:07:57 +10:00
Kamen Mazdrashki
7c653c429a s4-source4/dsdb/samdb/ldb_modules/samldb.c: Use DSDB_FLAG_NEXT_MODULE flag
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-07-02 10:07:53 +10:00
Kamen Mazdrashki
0e023f2340 s4-source4/dsdb/samdb/ldb_modules/samba3sid.c: Use DSDB_FLAG_NEXT_MODULE flag
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-07-02 10:07:48 +10:00
Kamen Mazdrashki
30a69eb4a0 s4-source4/dsdb/samdb/ldb_modules/rootdse.c: Use DSDB_FLAG_NEXT_MODULE flag
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-07-02 10:07:43 +10:00
Kamen Mazdrashki
68c6e607d9 s4-source4/dsdb/samdb/ldb_modules/ridalloc.c: Use DSDB_FLAG_NEXT_MODULE flag
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-07-02 10:07:39 +10:00
Kamen Mazdrashki
f3f87e8dee s4-source4/dsdb/samdb/ldb_modules/repl_meta_data.c: Use DSDB_FLAG_NEXT_MODULE flag
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-07-02 10:07:34 +10:00
Kamen Mazdrashki
b29921b82e s4-dsdb/samdb/ldb_modules/linked_attributes.c: make use of DSDB_FLAG_NEXT_MODULE flag
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-07-02 10:07:27 +10:00
Kamen Mazdrashki
f570eec264 s4/dsdb: Add DSDB_FLAG_NEXT_MODULE flag
Although it is not currently used in implementation,
my intention is for callers to clearly state what
action they want to execute.

Currently when a caller wants to pass the call to the next
module in the chain, this flag is either omitted or 0 is used
(which is somewhat hacky, isn't it)

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-07-02 10:07:09 +10:00