From 37c96290592607b5e731d0b8933be825d93b70f0 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 27 Nov 2003 18:34:40 +0000 Subject: [PATCH] Fix for pdbedit error code returns (sorry, forgot who sent in the patch). Jeremy. --- source/utils/pdbedit.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/source/utils/pdbedit.c b/source/utils/pdbedit.c index c69b1494694..d72634d78b5 100644 --- a/source/utils/pdbedit.c +++ b/source/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; } /********************************************************* -- 2.47.3