Merge pull request #9435 from wanyaoqi/bugfix/wyq/fix-windows-set-passwd

fix(host): fix set windows password with escape charater
This commit is contained in:
yunion-ci-robot
2020-12-15 20:51:20 +08:00
committed by GitHub
+2
View File
@@ -408,6 +408,8 @@ func (w *SWindowsRootFs) deployPublicKeyByGuest(uname, passwd string) bool {
logPath := w.guestDebugLogPath
chksum := stringutils2.GetMD5Hash(passwd + logPath[(len(logPath)-10):])
// symbol ^ is escape character is batch file.
passwd = strings.ReplaceAll(passwd, "^", "^^")
chgpwdScript := strings.Join([]string{
w.MakeGuestDebugCmd("change password step 1"),
strings.Join([]string{