From dadaca01d2c4ac272b3f684eaee85cf5800f5f69 Mon Sep 17 00:00:00 2001 From: Amitay Isaacs Date: Fri, 19 Aug 2011 12:27:42 +1000 Subject: [PATCH] s3-passdb: Display username when reporting error on add_sam_account. Signed-off-by: Andrew Bartlett --- source3/passdb/py_passdb.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source3/passdb/py_passdb.c b/source3/passdb/py_passdb.c index 54dbb0d3893..878886d6d52 100644 --- a/source3/passdb/py_passdb.c +++ b/source3/passdb/py_passdb.c @@ -1366,7 +1366,8 @@ static PyObject *py_pdb_add_sam_account(pytalloc_Object *self, PyObject *args) status = methods->add_sam_account(methods, sam_acct); if (!NT_STATUS_IS_OK(status)) { - PyErr_Format(py_pdb_error, "Unable to add sam account, (%d,%s)", + PyErr_Format(py_pdb_error, "Unable to add sam account '%s', (%d,%s)", + sam_acct->username, NT_STATUS_V(status), get_friendly_nt_error_msg(status)); talloc_free(tframe); -- 2.11.4.GIT