1
0
mirror of https://github.com/samba-team/samba.git synced 2025-08-02 00:22:11 +03:00

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 590d2164b3)
This commit is contained in:
Volker Lendecke
2007-05-11 08:46:54 +00:00
committed by Gerald (Jerry) Carter
parent 2383ffce69
commit 9e30a76c04
5 changed files with 29 additions and 58 deletions

View File

@ -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]);