[PATCH 15/16] ntlm_auth4: Use new samba_getpass() function.

Andreas Schneider asn at samba.org
Tue Nov 27 04:23:55 MST 2012


Signed-off-by: Andreas Schneider <asn at samba.org>
---
 source4/utils/ntlm_auth.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/source4/utils/ntlm_auth.c b/source4/utils/ntlm_auth.c
index cc92c17..c363c9d 100644
--- a/source4/utils/ntlm_auth.c
+++ b/source4/utils/ntlm_auth.c
@@ -1137,7 +1137,13 @@ int main(int argc, const char **argv)
 	}
 
 	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_xstrdup(pwd);
+		}
 	}
 
 	{
-- 
1.8.0




More information about the samba-technical mailing list