diff options
author | Jeremy Allison <jra@samba.org> | 2003-11-27 18:34:42 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2003-11-27 18:34:42 +0000 |
commit | 521104359ec257ca93eb68fdf65b24ed3b3a7f4a (patch) | |
tree | 2ef9156f0a8f2716732604fe18c036fd170d2862 /source3 | |
parent | dd51a9be946a55a1a402a6d4e744214229453d93 (diff) | |
download | samba-521104359ec257ca93eb68fdf65b24ed3b3a7f4a.tar.gz samba-521104359ec257ca93eb68fdf65b24ed3b3a7f4a.tar.bz2 samba-521104359ec257ca93eb68fdf65b24ed3b3a7f4a.zip |
Fix for pdbedit error code returns (sorry, forgot who sent in the patch).
Jeremy.
(This used to be commit 685097bc50a8ef387c5082401858d482329c37bc)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/utils/pdbedit.c | 13 |
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; } /********************************************************* |