summaryrefslogtreecommitdiff
path: root/source3/torture/pdbtest.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2012-06-26 20:52:07 +1000
committerAndrew Bartlett <abartlet@samba.org>2012-06-26 14:10:17 +0200
commita7f26d5c6d441e1688382e5b9d3543f8a81dd74d (patch)
treea223c012129d4525e7143350894e959f9304cb33 /source3/torture/pdbtest.c
parentff4d8fcd8d69e19608cc5b8bd65ca022d714c95a (diff)
downloadsamba-a7f26d5c6d441e1688382e5b9d3543f8a81dd74d.tar.gz
samba-a7f26d5c6d441e1688382e5b9d3543f8a81dd74d.tar.bz2
samba-a7f26d5c6d441e1688382e5b9d3543f8a81dd74d.zip
s3-pdbtest: Report and handle errors in pdb->getsampwnam()
Diffstat (limited to 'source3/torture/pdbtest.c')
-rw-r--r--source3/torture/pdbtest.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/source3/torture/pdbtest.c b/source3/torture/pdbtest.c
index 1257eff9f6..e2551c0010 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 */