From: Stefan Metzmacher Date: Mon, 13 Dec 2010 10:42:48 +0000 (+0100) Subject: test password_hash bypass X-Git-Url: http://git.samba.org/?p=metze%2Fsamba%2Fwip.git;a=commitdiff_plain;h=450c2b42d113d07c149803cd88af34943f2d91b9 test password_hash bypass --- diff --git a/source4/dsdb/samdb/ldb_modules/password_hash.c b/source4/dsdb/samdb/ldb_modules/password_hash.c index 75df54be294e..51b0997392ba 100644 --- a/source4/dsdb/samdb/ldb_modules/password_hash.c +++ b/source4/dsdb/samdb/ldb_modules/password_hash.c @@ -184,6 +184,9 @@ static int password_hash_bypass(struct ldb_module *module, struct ldb_request *r sce = dsdb_get_single_valued_attr(msg, "supplementalCredentials", request->operation); +#undef ldb_error +#define ldb_error(ldb, ecode, reason) (ldb_debug(ldb, LDB_DEBUG_FATAL, "reason[%s]\n", reason),abort(), ldb_error_at(ldb, ecode, reason, __FILE__, __LINE__)) + #define CHECK_HASH_ELEMENT(e, min, max) do {\ if (e && e->num_values) { \ unsigned int _count; \ @@ -544,6 +547,10 @@ static int password_hash_bypass(struct ldb_module *module, struct ldb_request *r return ldb_next_request(module, request); } +#define ldb_next_request(m, r) password_hash_bypass(m, r) +#undef ldb_error +#define ldb_error(ldb, ecode, reason) ldb_error_at(ldb, ecode, reason, __FILE__, __LINE__) + /* Get the NT hash, and fill it in as an entry in the password history, and specify it into io->g.nt_hash */