提交 d0531f57 编写于 作者: K kohsuke

send password 3 times so that the wrong password will cause sudo to exit

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@17024 71c3de6d-444a-0410-be80-ed276b4c234a
上级 97e1f539
......@@ -76,7 +76,10 @@ public abstract class SU {
Process p = pb.start();
// TODO: use -p to detect prompt
// TODO: detect if the password didn't work
new PrintStream(p.getOutputStream()).println(rootPassword);
PrintStream ps = new PrintStream(p.getOutputStream());
ps.println(rootPassword);
ps.println(rootPassword);
ps.println(rootPassword);
return p;
}
}.execute(closure,listener, rootPassword);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册