This is a security audit change of the main source.
[abartlet/samba.git/.git] / source3 / rpc_client / ntclienttrust.c
index 38cbedae7883bf4b822f411db145f280e8132fec..0486017181747b0c46f0fcc04c89cf59af43036b 100644 (file)
@@ -56,7 +56,7 @@ BOOL trust_account_check(struct in_addr dest_ip, char *dest_host,
        fstrcpy(mach_pwd, myhostname);
        strlower(mach_pwd);
 
-       sprintf(tmp, "Enter Workstation Trust Account password for [%s].\nDefault is [%s].\nPassword:",
+       slprintf(tmp, sizeof(tmp) - 1,"Enter Workstation Trust Account password for [%s].\nDefault is [%s].\nPassword:",
                                mach_acct, mach_pwd);
 
        start_mach_pwd = (char*)getpass(tmp);
@@ -66,7 +66,7 @@ BOOL trust_account_check(struct in_addr dest_ip, char *dest_host,
                fstrcpy(mach_pwd, start_mach_pwd);
        }
 
-       sprintf(tmp, "Enter new Workstation Trust Account password for [%s]\nPress Return to leave at old value.\nNew Password:",
+       slprintf(tmp, sizeof(tmp)-1, "Enter new Workstation Trust Account password for [%s]\nPress Return to leave at old value.\nNew Password:",
                                mach_acct);
 
        change_mach_pwd = (char*)getpass(tmp);