tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Fargusson.Alan" <Alan.Fargus...@ftb.ca.gov>
Subject RE: TOMCAT ISSUE: System.Exit
Date Thu, 24 May 2007 19:44:56 GMT
Is System.exit implemented in Tomcat?  I thought System.exit is implemented in the JVM.

-----Original Message-----
From: Johnny Kewl [mailto:john@kewlstuff.co.za]
Sent: Thursday, May 24, 2007 11:47 AM
To: Tomcat Users List; p@pidster.com
Subject: Re: TOMCAT ISSUE: System.Exit


Ok... beginning to think I'm the only one reading here... yes it is a 
kludge, and I doubt very much whether changing anything in catalina.policy 
will do anything in this case... because the security manager is probably 
incorporated in the web-app class loader... and yes this and the 
documentation makes sense when protecting Tomcat from a rouge web-app.... 
but thats not what I'm trying to do... I'm trying to protect an embedded 
application FROM TOMCAT itself.
The code I have shown you is TOMCATS CODE... not the embedded application 
code which is using tomcat as a library... or a Web-App's code.

Ok... think we got crossed lines somewhere... but just to recap... Tomcats 
System.Exit code kills the client calling tomcat... its rude ;)
I suppose I could write a class loader in the client... tell it to stop 
System.Exits in a custom security manager... and then load up tomcat using 
that classloader... little bit too much work dont you think?
All I think is happening is that those System.Exits make a lot of sense from 
a server perspective... but not from an embedded perspective... its not a 
disaster, it doenst make tomcat bad (its great), its just something to think 
about....


----- Original Message ----- 
From: "Pid" <p@pidster.com>
To: "Tomcat Users List" <users@tomcat.apache.org>
Sent: Thursday, May 24, 2007 8:04 PM
Subject: Re: TOMCAT ISSUE: System.Exit


> Johnny Kewl wrote:
>> Ha ha... I think this is a kludge,
>
> Using a SecurityManager is a kludge?
>
> but ok, I have "read"... so help
>> me... I want to stop Tomcat calling System.Exit(1)... what do I need to 
>> do to the catalina.policy file to do this?
>> I imagine that instead of the embedded app shutting down the user will 
>> now get a security exception, which to me is wrong... but hey, I'll try 
>> it.
>
> The 'System.exit()' example is the usual one, as you will remember from 
> when you read the documentation:
>
> http://tomcat.apache.org/tomcat-5.0-doc/security-manager-howto.html
>
> p
>
>
>> ----- Original Message ----- From: "Peter Crowther" 
>> <Peter.Crowther@melandra.com>
>> To: "Tomcat Users List" <users@tomcat.apache.org>
>> Sent: Thursday, May 24, 2007 6:21 PM
>> Subject: RE: TOMCAT ISSUE: System.Exit
>>
>>
>>> From: Johnny Kewl [mailto:john@kewlstuff.co.za]
>>> Imagine I make a library for you... and your user application
>>> does something
>>> wrong... and then my library calls System.Exit and shuts down
>>> the JVM... how
>>> you going to fix that with a security manager??
>>
>> The security manager can prevent the call from succeeding.  Read, don't
>> just assume it can't work.
>> http://java.sun.com/j2se/1.5.0/docs/api/java/lang/System.html#exit(int)
>> will give you hint on the fact that exit can be prevented by a security
>> manager, for example.
>>
>> - Peter
>>
>> ---------------------------------------------------------------------
>> To start a new topic, e-mail: users@tomcat.apache.org
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>>
>> ---------------------------------------------------------------------
>> To start a new topic, e-mail: users@tomcat.apache.org
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>
> 


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message