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

net: Make "net rpc" use functable3

(This used to be commit 428b56863c)
This commit is contained in:
Kai Blin
2008-05-21 10:27:59 +02:00
parent 98b9b5b7f3
commit c51ca559c1
4 changed files with 919 additions and 317 deletions

View File

@ -212,8 +212,6 @@ bool net_rpc_check(struct net_context *c, unsigned flags);
int rpc_printer_migrate(struct net_context *c, int argc, const char **argv);
int rpc_printer_usage(struct net_context *c, int argc, const char **argv);
int net_rpc_printer(struct net_context *c, int argc, const char **argv);
int net_rpc_help(struct net_context *c, int argc, const char **argv);
int net_rpc_usage(struct net_context *c, int argc, const char **argv);
int net_rpc(struct net_context *c, int argc, const char **argv);
/* The following definitions come from utils/net_rpc_audit.c */

File diff suppressed because it is too large Load Diff

View File

@ -482,6 +482,13 @@ int net_rpc_testjoin(struct net_context *c, int argc, const char **argv)
char *domain = smb_xstrdup(c->opt_target_workgroup);
NTSTATUS nt_status;
if (c->display_usage) {
d_printf("Usage\n"
"net rpc testjoin\n"
" Test if a join is OK\n");
return 0;
}
/* Display success or failure */
nt_status = net_rpc_join_ok(c, domain, NULL, NULL);
if (!NT_STATUS_IS_OK(nt_status)) {

View File

@ -210,8 +210,9 @@ int net_rpc_shell(struct net_context *c, int argc, const char **argv)
NTSTATUS status;
struct rpc_sh_ctx *ctx;
if (argc != 0) {
d_fprintf(stderr, "usage: net rpc shell\n");
if (argc != 0 || c->display_usage) {
d_printf("Usage:\n"
"net rpc shell\n");
return -1;
}