winexe: Some code cleanup and fixes
authorAndreas Schneider <asn@samba.org>
Thu, 8 Apr 2021 08:16:54 +0000 (10:16 +0200)
committerAndrew Bartlett <abartlet@samba.org>
Sun, 20 Jun 2021 23:26:32 +0000 (23:26 +0000)
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
examples/winexe/winexe.c

index fc37550b716dd036ed37a1d39fea11525ec0b8e2..3e0813a40913d08c9c7d7d3f81c530c3bedd79e0 100644 (file)
@@ -1807,7 +1807,7 @@ int main(int argc, char *argv[])
        TALLOC_CTX *frame = talloc_stackframe();
        const char **const_argv = discard_const_p(const char *, argv);
        struct program_options options = {0};
-       struct cli_state *cli;
+       struct cli_state *cli = NULL;
        const char *service_name = SERVICE_NAME;
        char *service_filename = NULL;
 #ifdef HAVE_WINEXE_CC_WIN32
@@ -1843,12 +1843,12 @@ int main(int argc, char *argv[])
 
        status = cli_full_connection_creds(
                &cli,
-               NULL,
+               lp_netbios_name(),
                options.hostname,
                NULL,
                options.port,
                "IPC$",
-               "?????",
+               "IPC",
                options.credentials,
                CLI_FULL_CONNECTION_IPC);