From: Stefan Metzmacher Date: Mon, 11 Nov 2019 12:35:16 +0000 (+0100) Subject: s3:net: remove unused net_use_machine_account() X-Git-Tag: ldb-2.2.0~318 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=84f04f90bd35c678e4336191968cbb48b0fb596b;p=thirdparty%2Fsamba.git s3:net: remove unused net_use_machine_account() Signed-off-by: Stefan Metzmacher Reviewed-by: Andreas Schneider --- diff --git a/source3/utils/net_proto.h b/source3/utils/net_proto.h index d5387f50e46..d04df553e01 100644 --- a/source3/utils/net_proto.h +++ b/source3/utils/net_proto.h @@ -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, diff --git a/source3/utils/net_util.c b/source3/utils/net_util.c index a84b4f5500e..74b9db2301e 100644 --- a/source3/utils/net_util.c +++ b/source3/utils/net_util.c @@ -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,