s4-dsdb: Remove hooks for non-directory password handling
authorAndrew Bartlett <abartlet@samba.org>
Wed, 27 Jun 2012 02:42:31 +0000 (12:42 +1000)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 27 Jun 2012 09:29:17 +0000 (11:29 +0200)
This was an interesting hack, and the local_password module still exists, but
until it has a use case and a test case, remove the bypass of password_hash.

Andrew Bartlett

source4/dsdb/samdb/ldb_modules/password_hash.c

index c22a0b2713ec0e13cf76ace851b6294a3998be02..620de755d88e2d33a998b08a9111e2fef0b955b7 100644 (file)
@@ -2760,12 +2760,6 @@ static int password_hash_add(struct ldb_module *module, struct ldb_request *req)
                return ldb_next_request(module, req);
        }
 
-       /* If the caller is manipulating the local passwords directly, let them pass */
-       if (ldb_dn_compare_base(ldb_dn_new(req, ldb, LOCAL_BASE),
-                               req->op.add.message->dn) == 0) {
-               return ldb_next_request(module, req);
-       }
-
        bypass = ldb_request_get_control(req,
                                         DSDB_CONTROL_BYPASS_PASSWORD_HASH_OID);
        if (bypass != NULL) {
@@ -2959,12 +2953,6 @@ static int password_hash_modify(struct ldb_module *module, struct ldb_request *r
                return ldb_next_request(module, req);
        }
        
-       /* If the caller is manipulating the local passwords directly, let them pass */
-       if (ldb_dn_compare_base(ldb_dn_new(req, ldb, LOCAL_BASE),
-                               req->op.mod.message->dn) == 0) {
-               return ldb_next_request(module, req);
-       }
-
        bypass = ldb_request_get_control(req,
                                         DSDB_CONTROL_BYPASS_PASSWORD_HASH_OID);
        if (bypass != NULL) {