summaryrefslogtreecommitdiff
path: root/source3/utils/net_sam.c
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2007-05-11 08:46:54 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:21:57 -0500
commit9e30a76c04d0da0bc14f7a0605db7ad51e5cfcd9 (patch)
tree06a301eb2d06b77577d9e2ccd4bf1c565f21cb8d /source3/utils/net_sam.c
parent2383ffce6993a70abffcbabdf2e6ebb0d8ccd756 (diff)
downloadsamba-9e30a76c04d0da0bc14f7a0605db7ad51e5cfcd9.tar.gz
samba-9e30a76c04d0da0bc14f7a0605db7ad51e5cfcd9.tar.bz2
samba-9e30a76c04d0da0bc14f7a0605db7ad51e5cfcd9.zip
r22786: Some cleanup by Karolin Seeger: Remove unused pdb_find_alias, and change
return values of some alias-releated pdb functions from BOOL to NTSTATUS Thanks :-) (This used to be commit 590d2164b3a33250410338771e160f6ebd1aa89d)
Diffstat (limited to 'source3/utils/net_sam.c')
-rw-r--r--source3/utils/net_sam.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/source3/utils/net_sam.c b/source3/utils/net_sam.c
index 4d3102b51f..06fc73da4b 100644
--- a/source3/utils/net_sam.c
+++ b/source3/utils/net_sam.c
@@ -580,7 +580,7 @@ static int net_sam_deletelocalgroup(int argc, const char **argv)
DOM_SID sid;
enum lsa_SidType type;
const char *dom, *name;
- int ret;
+ NTSTATUS status;
if (argc != 1) {
d_fprintf(stderr, "usage: net sam deletelocalgroup <name>\n");
@@ -589,7 +589,7 @@ static int net_sam_deletelocalgroup(int argc, const char **argv)
if (!lookup_name(tmp_talloc_ctx(), argv[0], LOOKUP_NAME_ISOLATED,
&dom, &name, &sid, &type)) {
- d_fprintf(stderr, "Could not find name %s.\n", argv[0]);
+ d_fprintf(stderr, "Could not find %s.\n", argv[0]);
return -1;
}
@@ -599,12 +599,13 @@ static int net_sam_deletelocalgroup(int argc, const char **argv)
return -1;
}
- ret = pdb_delete_alias(&sid);
+ status = pdb_delete_alias(&sid);
- if ( !ret ) {
- d_fprintf(stderr, "Could not delete local group %s.\n", argv[0]);
- return -1;
- }
+ if (!NT_STATUS_IS_OK(status)) {
+ d_fprintf(stderr, "Deleting local group %s failed with %s\n",
+ argv[0], nt_errstr(status));
+ return -1;
+ }
d_printf("Deleted local group %s.\n", argv[0]);