ntlm_auth: Use new samba_getpass() function.
authorAndreas Schneider <asn@samba.org>
Fri, 23 Nov 2012 13:29:38 +0000 (14:29 +0100)
committerAndreas Schneider <asn@samba.org>
Mon, 3 Dec 2012 13:35:09 +0000 (14:35 +0100)
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
source3/utils/ntlm_auth.c

index 2bf9747..6b45354 100644 (file)
@@ -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) {