s3:net: remove unused net_use_machine_account()
authorStefan Metzmacher <metze@samba.org>
Mon, 11 Nov 2019 12:35:16 +0000 (13:35 +0100)
committerAndreas Schneider <asn@cryptomilk.org>
Thu, 28 May 2020 06:43:37 +0000 (06:43 +0000)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
source3/utils/net_proto.h
source3/utils/net_util.c

index d5387f50e46565d87151b67d6a0b62f736230036..d04df553e01b7ec4d240f31830b428a6f0d3e240 100644 (file)
@@ -403,7 +403,6 @@ NTSTATUS connect_dst_pipe(struct net_context *c, struct cli_state **cli_dst,
                          struct rpc_pipe_client **pp_pipe_hnd,
                          const struct ndr_interface_table *table);
 int net_use_krb_machine_account(struct net_context *c);
-int net_use_machine_account(struct net_context *c);
 bool net_find_server(struct net_context *c,
                        const char *domain,
                        unsigned flags,
index a84b4f5500e61e1af0cd2adf23907ba42b1e37ab..74b9db2301e0b74a241896e37410fd46416d5566 100644 (file)
@@ -282,28 +282,6 @@ int net_use_krb_machine_account(struct net_context *c)
        return 0;
 }
 
-/****************************************************************************
- Use the machine account name and password for this session.
-****************************************************************************/
-
-int net_use_machine_account(struct net_context *c)
-{
-       char *user_name = NULL;
-
-       if (!secrets_init()) {
-               d_fprintf(stderr,_("ERROR: Unable to open secrets database\n"));
-               exit(1);
-       }
-
-       c->opt_password = secrets_fetch_machine_password(
-                               c->opt_target_workgroup, NULL, NULL);
-       if (asprintf(&user_name, "%s$", lp_netbios_name()) == -1) {
-               return -1;
-       }
-       c->opt_user_name = user_name;
-       return 0;
-}
-
 bool net_find_server(struct net_context *c,
                        const char *domain,
                        unsigned flags,