java.lang.SecurityManager
Peter Nagy
kaffe@kaffe.org
Fri, 4 Apr 1997 14:24:37 +0200 (MET DST)
This message is in MIME format. The first part should be readable text,
while the remaining parts are likely unreadable without MIME-aware tools.
Send mail to mime@docserver.cac.washington.edu for more info.
---1247999929-483462437-860156677=:636
Content-Type: TEXT/PLAIN; charset=US-ASCII
Szia mindenkinek!
Last day I wanted use the sun.applet.AppletViewer, but I got some serious
trouble: there is just a skeleton of SecurityManager in 0.8.3 So I drunk
some coffe and created a patch. With this some simple applets can run, and
it seems like the security checks are right (no applet can use
System.exit() for example) I've never seen the kaffe source before, so
maybe there are some design mistakes in it, if so, pleez tell me. Tested
it on i586-unknown-linux, with interpreter and jit.
tegla
PS: hope this is the right place to send patches....
---1247999929-483462437-860156677=:636
Content-Type: TEXT/PLAIN; charset=US-ASCII; name="sec2.diff"
Content-Transfer-Encoding: BASE64
Content-ID: <Pine.LNX.3.91.970404142437.636B@katalin.csoma.elte.hu>
Content-Description: diff -urP
ZGlmZiAtdXJQIGthZmZlLTAuOC4zL2thZmZlL2thZmZldm0vTWFrZWZpbGUu
aW4ga2FmZmUtMC44LjMudGVnbGEva2FmZmUva2FmZmV2bS9NYWtlZmlsZS5p
bg0KLS0tIGthZmZlLTAuOC4zL2thZmZlL2thZmZldm0vTWFrZWZpbGUuaW4J
VGh1IE1hciAgNiAyMzoyMDoyOCAxOTk3DQorKysga2FmZmUtMC44LjMudGVn
bGEva2FmZmUva2FmZmV2bS9NYWtlZmlsZS5pbglGcmkgQXByICA0IDExOjMw
OjUzIDE5OTcNCkBAIC01OSw3ICs1OSw4IEBADQogCQl1dGlsJChPQkpFWFQp
IFwNCiAJCXZlcmlmeSQoT0JKRVhUKSBcDQogCQlleGNlcHRpb24kKE9CSkVY
VCkgXA0KLQkJbWQkKE9CSkVYVCkNCisJCW1kJChPQkpFWFQpIFwNCisJCXN0
YWNrVHJhY2UkKE9CSkVYVCkNCiANCiBhbGw6CQlta2thZmZldm0NCiANCmRp
ZmYgL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