[ic] AllowGlobal

Ed LaFrance edl@newmediaems.com
Thu, 08 Mar 2001 08:46:23 -0800

At 09:27 PM 03/07/2001 -0500, you wrote:
>Can someone give me an example of using AllowGlobal?  All I can find are
>little tidbits of information on it.  Apparently it should be placed in
>the interchange.cfg file and I found this:
>7.4. AllowGlobal *global*
>Specifies catalog identifiers that may define subroutines and UserTag
>entries that can operate with the full
>permissions of the server. DON'T USE THIS UNLESS THE CATALOG USER IS
>TRUSTED IMPLICITLY. Default is blank.
>AllowGlobal simple
>I have tried adding this line
>AllowGlobal simple
>to my interchange.cfg
>but when I try to execute embedded perl code that causes this error:
>failed safe check: require trapped by operation mask at (eval 106) line 2,
>FIG> line 282.
>the error continues to occur even with that line added to my
>interchange.cfg file.
>The reason I want to know more about it is because I think it will solve
>the problems I seem to be having with executing Perl modules (specifically
>JVM) in my embedded Perl code.  It is extremely frustrating because I am
>able to use this JVM module in regular Perl code, but when I try to
>execute it in the embedded Perl code, it fails.
>Also the most basic JVM code I could produce that works is:
>use Jvm;
>new Jvm();
>print "\nComplete!\n";
>sub ts_obj {
>     print "Testing Object ...\n";
>     my $out = Jvm::getProperty("java.lang.System", "out",
>     new Jvm();
>     $out->println("(Ljava/lang/String;)V", "Hello world!");
>Can anyone suggest how I should write that in embedded perl (if I am ever
>able to access that module)?  I would think I should just put this code
>into the interchange.cfg file (make it a global sub) and call that sub
>from my embedded perl code.  Is that correct?

Check the docs on the SafeUntrap directive for interchange.cfg; that may be 
coming into play here.  Also, you may need to do this type of thing as a 
catalog-level (or server-level} Usertag, or maybe a GlobalSub (which, 
according to the docs, is the least restricted way).


Ed L.