mirror of
https://github.com/samba-team/samba.git
synced 2025-01-24 02:04:21 +03:00
s3:net: remove unused net_use_machine_account()
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
This commit is contained in:
parent
6e6e0bc638
commit
84f04f90bd
@ -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,
|
||||
|
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user