Example #1
0
static int rap_user_delete(struct net_context *c, int argc, const char **argv)
{
	struct cli_state *cli;
	int ret;

	if (argc == 0 || c->display_usage) {
                return net_rap_user_usage(c, argc, argv);
	}

	if (!NT_STATUS_IS_OK(net_make_ipc_connection(c, 0, &cli)))
                return -1;

	ret = cli_NetUserDelete(cli, argv[0]);
	cli_shutdown(cli);
	return ret;
}
Example #2
0
static int rap_user_delete(int argc, const char **argv)
{
	struct cli_state *cli;
	int ret;
	
	if (argc == 0) {
		d_printf("\n\nUser name not specified\n");
                return net_rap_user_usage(argc, argv);
	}

	if (!(cli = net_make_ipc_connection(0))) 
                return -1;

	ret = cli_NetUserDelete(cli, argv[0]);
	cli_shutdown(cli);
	return ret;
}