r9787: BUG 2998: patch from Humberto Diogenes <virtual.spirit@digizap.com.br> to...
[tprouty/samba.git] / source3 / utils / net_rpc.c
index 1134e718ad2d7beff7a20ab5aae45f9d9022aa03..50114d5fac6f9361b68e92984b464b40d9b493d5 100644 (file)
@@ -4974,7 +4974,7 @@ static int rpc_trustdom_establish(int argc, const char **argv)
                return -1;
        }
 
-       if (push_ucs2_talloc(mem_ctx, &uni_domain_name, domain_name_pol) < 0) {
+       if (push_ucs2_talloc(mem_ctx, &uni_domain_name, domain_name_pol) == (size_t)-1) {
                DEBUG(0, ("Could not convert domain name %s to unicode\n",
                          domain_name_pol));
                return -1;
@@ -5128,7 +5128,7 @@ static NTSTATUS vampire_trusted_domain(struct cli_state *cli,
                goto done;
        }
        
-       if (push_ucs2_talloc(mem_ctx, &uni_dom_name, trusted_dom_name) < 0) {
+       if (push_ucs2_talloc(mem_ctx, &uni_dom_name, trusted_dom_name) == (size_t)-1) {
                DEBUG(0, ("Could not convert domain name %s to unicode\n",
                          trusted_dom_name));
                nt_status = NT_STATUS_UNSUCCESSFUL;
@@ -5959,6 +5959,7 @@ int net_rpc_usage(int argc, const char **argv)
        d_printf("  net rpc shutdown \t\tto shutdown a remote server\n");
        d_printf("  net rpc rights\t\tto manage privileges assigned to SIDs\n");
        d_printf("  net rpc registry\t\tto manage registry hives\n");
+       d_printf("  net rpc service\t\tto start, stop and query services\n");
        d_printf("\n");
        d_printf("'net rpc shutdown' also accepts the following miscellaneous options:\n"); /* misc options */
        d_printf("\t-r or --reboot\trequest remote server reboot on shutdown\n");