From 7f4af3d1fb0827714c8637ecc780ef9d88604bc4 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Fri, 23 Nov 2012 14:29:38 +0100 Subject: [PATCH] ntlm_auth: Use new samba_getpass() function. Reviewed-by: Jelmer Vernooij --- source3/utils/ntlm_auth.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/source3/utils/ntlm_auth.c b/source3/utils/ntlm_auth.c index 2bf9747b2fb..6b45354b512 100644 --- a/source3/utils/ntlm_auth.c +++ b/source3/utils/ntlm_auth.c @@ -2899,7 +2899,13 @@ enum { } if (!opt_password) { - opt_password = getpass("password: "); + char pwd[256] = {0}; + int rc; + + rc = samba_getpass("Password: ", pwd, sizeof(pwd), false, false); + if (rc == 0) { + opt_password = SMB_STRDUP(pwd); + } } if (diagnostics) { -- 2.34.1