s4-dsdb: Add debug message if we have a ldb error string
authorAndreas Schneider <asn@samba.org>
Mon, 25 Jan 2016 15:39:59 +0000 (16:39 +0100)
committerVolker Lendecke <vl@samba.org>
Tue, 2 Feb 2016 10:49:51 +0000 (11:49 +0100)
When trying to change the password with kpasswd, the KDC returns
"Unspecified password quality failure". Because we do not get the ldb
error which is e.g.: password is too young to change!

This way at least the admin can find out what is going on.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Tue Feb  2 11:49:51 CET 2016 on sn-devel-144

source4/dsdb/common/util.c

index 6807726285f174ab63c39ebb388918d8028d236d..d0a7f54a9866b0829758d2a6afa9ac2860f11264 100644 (file)
@@ -2250,6 +2250,7 @@ static NTSTATUS samdb_set_password_internal(struct ldb_context *ldb, TALLOC_CTX
                status = NT_STATUS_UNSUCCESSFUL;
                if (errmsg != NULL) {
                        werr = W_ERROR(strtol(errmsg, &endptr, 16));
+                       DBG_WARNING("%s\n", errmsg);
                }
                if (endptr != errmsg) {
                        if (W_ERROR_EQUAL(werr, WERR_INVALID_PASSWORD)) {