From e335b24ad00c3398f2bd4b7da9c4df6087597121 Mon Sep 17 00:00:00 2001 From: Matthias Dieter Wallnöfer Date: Sat, 14 Aug 2010 11:19:29 +0200 Subject: s4:password_hash LDB module - fix wrong error codes To match the passwords.py test --- source4/dsdb/samdb/ldb_modules/password_hash.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source4/dsdb/samdb') diff --git a/source4/dsdb/samdb/ldb_modules/password_hash.c b/source4/dsdb/samdb/ldb_modules/password_hash.c index 0f078b5c76..30f55d6360 100644 --- a/source4/dsdb/samdb/ldb_modules/password_hash.c +++ b/source4/dsdb/samdb/ldb_modules/password_hash.c @@ -1452,7 +1452,7 @@ static int check_password_restrictions(struct setup_password_fields_io *io) "check_password_restrictions: " "There's no old nt_hash, which is needed " "in order to change your password!"); - return LDB_ERR_UNWILLING_TO_PERFORM; + return LDB_ERR_CONSTRAINT_VIOLATION; } /* The password modify through the NT hash is encouraged @@ -1461,7 +1461,7 @@ static int check_password_restrictions(struct setup_password_fields_io *io) ldb_asprintf_errstring(ldb, "check_password_restrictions: " "The old password specified doesn't match!"); - return LDB_ERR_UNWILLING_TO_PERFORM; + return LDB_ERR_CONSTRAINT_VIOLATION; } } else if (io->og.lm_hash) { if (!io->o.lm_hash) { @@ -1469,14 +1469,14 @@ static int check_password_restrictions(struct setup_password_fields_io *io) "check_password_restrictions: " "There's no old lm_hash, which is needed " "in order to change your password!"); - return LDB_ERR_UNWILLING_TO_PERFORM; + return LDB_ERR_CONSTRAINT_VIOLATION; } if (memcmp(io->og.lm_hash->hash, io->o.lm_hash->hash, 16) != 0) { ldb_asprintf_errstring(ldb, "check_password_restrictions: " "The old password specified doesn't match!"); - return LDB_ERR_UNWILLING_TO_PERFORM; + return LDB_ERR_CONSTRAINT_VIOLATION; } } } -- cgit