public class netscape.applet.AppletSecurity extends java.lang.SecurityManager {
...
int networkMode;
static final int NETWORK_NONE = 1;
static final int NETWORK_HOST = 2;
static final int NETWORK_UNRESTRICTED = 3;
...
Method void reset()
0 ldc #15 <String "appletviewer.security.mode">
....
22 aload_0
23 iconst_3
24 putfield #84 <Field netscape.applet.AppletSecurity.networkMode I>
27 return
28 aload_1
29 ldc #29 <String "none">
31 invokevirtual #108 <Method java.lang.String.equals(Ljava/lang/Object;)Z>
34 ifeq 43
37 aload_0
38 iconst_1
39 putfield #84 <Field netscape.applet.AppletSecurity.networkMode I>
42 return
43 aload_0
44 iconst_2
45 putfield #84 <Field netscape.applet.AppletSecurity.networkMode I>
48 return
All the patch does is to replace statements 38 and 44 with iconst_3
(opcode 0x06) -
thus making sure NETWORK_UNRESTRICTED is written in
AppletSecurity.networkMode. Note that reset()
is called in the constructor of the security manager.
That's all there is to it.