diff options
author | Rafal Szczesniak <mimir@samba.org> | 2003-08-15 21:57:59 +0000 |
---|---|---|
committer | Rafal Szczesniak <mimir@samba.org> | 2003-08-15 21:57:59 +0000 |
commit | b1993600e6d1ccaf5290c70e482bb8baec743882 (patch) | |
tree | efe94b24970eff58aae5bf74f1b906f018bbe8fe /source3/utils | |
parent | 85020f6255fc08a5f35760b0417e061538d5e790 (diff) | |
download | samba-b1993600e6d1ccaf5290c70e482bb8baec743882.tar.gz samba-b1993600e6d1ccaf5290c70e482bb8baec743882.tar.bz2 samba-b1993600e6d1ccaf5290c70e482bb8baec743882.zip |
In case of 'net rpc trustdom add' without domain name we were silently
asking for password without a piece of error message or explanation.
rafal
(This used to be commit d46793b33577f7e77b7632b016918e3ce175c238)
Diffstat (limited to 'source3/utils')
-rw-r--r-- | source3/utils/net_rpc.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/source3/utils/net_rpc.c b/source3/utils/net_rpc.c index 2f8743a138..fefc5af365 100644 --- a/source3/utils/net_rpc.c +++ b/source3/utils/net_rpc.c @@ -1707,8 +1707,13 @@ static NTSTATUS rpc_trustdom_add_internals(const DOM_SID *domain_sid, struct cli static int rpc_trustdom_add(int argc, const char **argv) { - return run_rpc_command(NULL, PI_SAMR, 0, rpc_trustdom_add_internals, - argc, argv); + if (argc > 0) { + return run_rpc_command(NULL, PI_SAMR, 0, rpc_trustdom_add_internals, + argc, argv); + } else { + d_printf("Usage: net rpc trustdom add <domain>\n"); + return -1; + } } |