From a7f26d5c6d441e1688382e5b9d3543f8a81dd74d Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Tue, 26 Jun 2012 20:52:07 +1000 Subject: [PATCH] s3-pdbtest: Report and handle errors in pdb->getsampwnam() --- source3/torture/pdbtest.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/source3/torture/pdbtest.c b/source3/torture/pdbtest.c index 1257eff9f6e..e2551c00106 100644 --- a/source3/torture/pdbtest.c +++ b/source3/torture/pdbtest.c @@ -428,14 +428,16 @@ int main(int argc, char **argv) } /* Get account information through getsampwnam() */ - if (NT_STATUS_IS_ERR(pdb->getsampwnam(pdb, in, out->username))) { - fprintf(stderr, "Error getting sampw of added user %s.\n", - out->username); + rv = pdb->getsampwnam(pdb, in, out->username); + if (NT_STATUS_IS_ERR(rv)) { + fprintf(stderr, "Error getting sampw of added user %s: %s\n", + out->username, nt_errstr(rv)); if (!NT_STATUS_IS_OK(rv = pdb->delete_sam_account(pdb, out))) { fprintf(stderr, "Error in delete_sam_account %s\n", get_friendly_nt_error_msg(rv)); } TALLOC_FREE(ctx); + exit(1); } /* Verify integrity */ -- 2.11.4.GIT