also do pfexec

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@15265 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
kohsuke committed 2009-02-12 20:59:25 +00:00
1 parent d171f58a03
commit e540cc39ab
1 file changed
+2 -2
@@ -225,8 +225,8 @@ public class ZFSInstaller extends AdministrativeMonitor implements Serializable
new String[]{"/usr/bin/pfexec", javaExe, "-jar", slaveJar},
listener.getLogger(), null, Collections.<String, String>emptyMap());
} else {
// try sudo with the given password
ProcessBuilder pb = new ProcessBuilder(javaExe,"-jar",slaveJar);
// try sudo with the given password. Also run in pfexec so that we can elevate the privileges
ProcessBuilder pb = new ProcessBuilder("/usr/bin/pfexec",javaExe,"-jar",slaveJar);
proc = EmbeddedSu.startWithSu(rootUsername, rootPassword, pb);
channel = new Channel("zfs migration thread", Computer.threadPoolForRemoting,
proc.getInputStream(), proc.getOutputStream(), listener.getLogger());