return 1;
}
- password = net_prompt_pass(c, _("the auth user"));
+ password = cli_credentials_get_password(c->creds);
if (password == NULL) {
d_fprintf(stderr,_("Failed to get the auth users password.\n"));
return 1;
retry:
if (!c->opt_password && need_password && !c->opt_machine_pass) {
- c->opt_password = net_prompt_pass(c, c->opt_user_name);
+ c->opt_password = cli_credentials_get_password(c->creds);
if (!c->opt_password) {
TALLOC_FREE(ads);
return ADS_ERROR(LDAP_NO_MEMORY);
int ret = -1;
const char *impersonate_princ_s = NULL;
const char *local_service = NULL;
+ const char *password = NULL;
int i;
for (i=0; i<argc; i++) {
}
}
- c->opt_password = net_prompt_pass(c, c->opt_user_name);
+ password = cli_credentials_get_password(c->creds);
status = kerberos_return_pac(c,
c->opt_user_name,
- c->opt_password,
+ password,
0,
NULL,
NULL,
{
int ret = -1;
NTSTATUS status;
+ const char *password = NULL;
if (c->display_usage) {
d_printf( "%s\n"
return -1;
}
- c->opt_password = net_prompt_pass(c, c->opt_user_name);
+ password = cli_credentials_get_password(c->creds);
ret = kerberos_kinit_password_ext(c->opt_user_name,
- c->opt_password,
+ password,
0,
NULL,
NULL,
const char *server,
const struct sockaddr_storage *pss,
unsigned flags, struct cli_state **pcli);
-const char *net_prompt_pass(struct net_context *c, const char *user);
int net_run_function(struct net_context *c, int argc, const char **argv,
const char *whoami, struct functable *table);
void net_display_usage_from_functable(struct functable *table);
/****************************************************************************
****************************************************************************/
-/* TODO FIXME: Pass cli_creds via net_context and get rid of this function. */
-const char *net_prompt_pass(struct net_context *c, const char *user)
-{
- struct cli_credentials *creds = samba_cmdline_get_creds();
-
- if (c->opt_password == NULL) {
- c->opt_password = cli_credentials_get_password(creds);
- }
-
- return c->opt_password;
-}
-
int net_run_function(struct net_context *c, int argc, const char **argv,
const char *whoami, struct functable *table)
{