summaryrefslogtreecommitdiff
path: root/source4/dsdb/samdb
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mdw@samba.org>2010-08-14 11:19:29 +0200
committerMatthias Dieter Wallnöfer <mdw@samba.org>2010-08-14 18:48:19 +0200
commite335b24ad00c3398f2bd4b7da9c4df6087597121 (patch)
tree901cd80c98be067aa7e3d3c5febd6c3f2be7c8a7 /source4/dsdb/samdb
parenta9b055291c39198be5fb1648ba1f51418af16e09 (diff)
downloadsamba-e335b24ad00c3398f2bd4b7da9c4df6087597121.tar.gz
samba-e335b24ad00c3398f2bd4b7da9c4df6087597121.tar.bz2
samba-e335b24ad00c3398f2bd4b7da9c4df6087597121.zip
s4:password_hash LDB module - fix wrong error codes
To match the passwords.py test
Diffstat (limited to 'source4/dsdb/samdb')
-rw-r--r--source4/dsdb/samdb/ldb_modules/password_hash.c8
1 files changed, 4 insertions, 4 deletions
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;
}
}
}