Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,14 @@ case class ScriptTransformation(
val cmd = List("/bin/bash", "-c", script)
val builder = new ProcessBuilder(cmd.asJava)

// for compatibility with hive
// if the script is a python/bash/... file, we should make it executable
if (new File(script).exists) {
new File(script).setExecutable(true)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't this create a huge security hole? Especially because we are not resetting this to its old state.

val env = builder.environment()
env.put("PATH", env.get("PATH") + ":.")
}

val proc = builder.start()
val inputStream = proc.getInputStream
val outputStream = proc.getOutputStream
Expand Down