summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2003-11-27 18:34:40 +0000
committerJeremy Allison <jra@samba.org>2003-11-27 18:34:40 +0000
commit94ca6711cfac99b1c11a665b608b969c6ac9ebbf (patch)
treea8cd38df7f895072ee39e50432ace1e86f72f3f7
parent2385a310d33dad825d4489e7cb7a8b1e79ec0073 (diff)
downloadsamba-94ca6711cfac99b1c11a665b608b969c6ac9ebbf.tar.gz
samba-94ca6711cfac99b1c11a665b608b969c6ac9ebbf.tar.bz2
samba-94ca6711cfac99b1c11a665b608b969c6ac9ebbf.zip
Fix for pdbedit error code returns (sorry, forgot who sent in the patch).
Jeremy. (This used to be commit 37c96290592607b5e731d0b8933be825d93b70f0)
-rw-r--r--source3/utils/pdbedit.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/source3/utils/pdbedit.c b/source3/utils/pdbedit.c
index c69b149469..d72634d78b 100644
--- a/source3/utils/pdbedit.c
+++ b/source3/utils/pdbedit.c
@@ -489,7 +489,11 @@ static int delete_user_entry (struct pdb_context *in, const char *username)
return -1;
}
- return NT_STATUS_IS_OK(in->pdb_delete_sam_account (in, samaccount));
+ if (!NT_STATUS_IS_OK(in->pdb_delete_sam_account (in, samaccount))) {
+ fprintf (stderr, "Unable to delete user %s\n", username);
+ return -1;
+ }
+ return 0;
}
/*********************************************************
@@ -515,7 +519,12 @@ static int delete_machine_entry (struct pdb_context *in, const char *machinename
return -1;
}
- return NT_STATUS_IS_OK(in->pdb_delete_sam_account (in, samaccount));
+ if (!NT_STATUS_IS_OK(in->pdb_delete_sam_account (in, samaccount))) {
+ fprintf (stderr, "Unable to delete machine %s\n", name);
+ return -1;
+ }
+
+ return 0;
}
/*********************************************************