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

r11308: Correctly return status code in case of js error or libnet

function execution error.

rafal
This commit is contained in:
Rafal Szczesniak
2005-10-26 21:04:53 +00:00
committed by Gerald (Jerry) Carter
parent 9c211507c1
commit a50a5bef6e

View File

@@ -106,10 +106,17 @@ static int ejs_net_createuser(MprVarHandle eid, int argc, char **argv)
req.in.user_name = argv[0];
status = libnet_CreateUser(ctx, mem_ctx, &req);
if (!NT_STATUS_IS_OK(status)) {
ejsSetErrorMsg(eid, "error when creating user: %s", nt_errstr(status));
}
talloc_free(mem_ctx);
mpr_Return(eid, mprNTSTATUS(status));
return 0;
done:
return NT_STATUS_IS_OK(status) ? 0 : -1;
talloc_free(mem_ctx);
return -1;
}