s3-utils: Remove unused connect_to_ipc_krb5()
authorAndrew Bartlett <abartlet@samba.org>
Thu, 9 Feb 2012 05:07:06 +0000 (16:07 +1100)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 23 Feb 2012 05:14:19 +0000 (16:14 +1100)
Found by callcatcher.

Andrew Bartlett

source3/utils/net_proto.h
source3/utils/net_util.c

index 83633aa7fcf1c40b2a905290b1a10a48998b4a88..3f99e14e6e8be3707fe2cb67b0a81c8ed4f6b4c8 100644 (file)
@@ -414,10 +414,6 @@ NTSTATUS connect_to_ipc_anonymous(struct net_context *c,
                                struct cli_state **cli_ctx,
                                const struct sockaddr_storage *server_ss,
                                const char *server_name);
                                struct cli_state **cli_ctx,
                                const struct sockaddr_storage *server_ss,
                                const char *server_name);
-NTSTATUS connect_to_ipc_krb5(struct net_context *c,
-                       struct cli_state **cli_ctx,
-                       const struct sockaddr_storage *server_ss,
-                       const char *server_name);
 NTSTATUS connect_dst_pipe(struct net_context *c, struct cli_state **cli_dst,
                          struct rpc_pipe_client **pp_pipe_hnd,
                          const struct ndr_syntax_id *interface);
 NTSTATUS connect_dst_pipe(struct net_context *c, struct cli_state **cli_dst,
                          struct rpc_pipe_client **pp_pipe_hnd,
                          const struct ndr_syntax_id *interface);
index a6edc3976deeeeaa56c626989e5f15c8f1781228..d0f2dd7241c6560411066dc366970c396357218f 100644 (file)
@@ -241,59 +241,6 @@ static char *get_user_and_realm(const char *username)
        return user_and_realm;
 }
 
        return user_and_realm;
 }
 
-/****************************************************************************
- Connect to \\server\ipc$ using KRB5.
-****************************************************************************/
-
-NTSTATUS connect_to_ipc_krb5(struct net_context *c,
-                       struct cli_state **cli_ctx,
-                       const struct sockaddr_storage *server_ss,
-                       const char *server_name)
-{
-       NTSTATUS nt_status;
-       char *user_and_realm = NULL;
-
-       /* FIXME: Should get existing kerberos ticket if possible. */
-       c->opt_password = net_prompt_pass(c, c->opt_user_name);
-       if (!c->opt_password) {
-               return NT_STATUS_NO_MEMORY;
-       }
-
-       user_and_realm = get_user_and_realm(c->opt_user_name);
-       if (!user_and_realm) {
-               return NT_STATUS_NO_MEMORY;
-       }
-
-       nt_status = cli_full_connection(cli_ctx, NULL, server_name,
-                                       server_ss, c->opt_port,
-                                       "IPC$", "IPC",
-                                       user_and_realm, c->opt_workgroup,
-                                       c->opt_password,
-                                       CLI_FULL_CONNECTION_USE_KERBEROS,
-                                       SMB_SIGNING_DEFAULT);
-
-       SAFE_FREE(user_and_realm);
-
-       if (!NT_STATUS_IS_OK(nt_status)) {
-               DEBUG(1,("Cannot connect to server using kerberos.  Error was %s\n", nt_errstr(nt_status)));
-               return nt_status;
-       }
-
-        if (c->smb_encrypt) {
-               nt_status = cli_cm_force_encryption(*cli_ctx,
-                                       user_and_realm,
-                                       c->opt_password,
-                                       c->opt_workgroup,
-                                        "IPC$");
-               if (!NT_STATUS_IS_OK(nt_status)) {
-                       cli_shutdown(*cli_ctx);
-                       *cli_ctx = NULL;
-               }
-       }
-
-       return nt_status;
-}
-
 /**
  * Connect a server and open a given pipe
  *
 /**
  * Connect a server and open a given pipe
  *