diff options
author | Andrew Bartlett <abartlet@samba.org> | 2019-03-04 15:15:43 +1300 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2019-03-07 03:50:20 +0000 |
commit | 6f2558cab8113fd22800e41d46ede1465884f80b (patch) | |
tree | 9ed1b0df708a1d84df0f3efcc0d330c9bffac4b4 /source4 | |
parent | 30f93bc7ac783efa205652ff83c7c1ab663ca73a (diff) | |
download | samba-6f2558cab8113fd22800e41d46ede1465884f80b.tar.gz |
dsdb: Provide better error strings in rootdse GUID attribute handling
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source4')
-rw-r--r-- | source4/dsdb/samdb/ldb_modules/rootdse.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/rootdse.c b/source4/dsdb/samdb/ldb_modules/rootdse.c index c5849818411..55340fa4f1e 100644 --- a/source4/dsdb/samdb/ldb_modules/rootdse.c +++ b/source4/dsdb/samdb/ldb_modules/rootdse.c @@ -515,7 +515,21 @@ static int rootdse_add_dynamic(struct rootdse_context *ac, struct ldb_message *m DSDB_SEARCH_SHOW_EXTENDED_DN, ac->req); if (ret != LDB_SUCCESS) { - return ldb_operr(ldb); + DBG_WARNING("Failed to convert GUID into full DN in rootDSE for %s: %s: %s\n", + guid_attrs[i], + ldb_dn_get_extended_linearized(ac, attr_dn, 1), + ldb_errstring(ldb)); + /* + * Provide a meaninful error string but not + * confidential DB contents possibly in the + * original string + */ + ldb_asprintf_errstring(ldb, + "Failed to find full DN for %s: %s", + guid_attrs[i], + ldb_dn_get_extended_linearized(ac, attr_dn, 1)); + /* Overstamp the error code, it would confuse the caller */ + return LDB_ERR_OPERATIONS_ERROR; } el = ldb_msg_find_element(msg, guid_attrs[i]); |