[Pljava-dev] cannot set the classpath to a specific jar to get anexternal connection

From: thomas at tada(dot)se (Thomas Hallgren)
To:
Subject: [Pljava-dev] cannot set the classpath to a specific jar to get anexternal connection
Date: 2010-06-03 14:32:41
Message-ID: 4C07BD09.1070302@tada.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pljava-dev

PL/Java is implemented as a trusted procedure language. It will
therefore prevent all access to the filesystem. You can use language
"javaU" if you want untrusted. More details here:
http://wiki.tada.se/index.php/Security.

Regards,
Thomas Hallgren

On 2010-06-03 15:43, Luca Ferrari wrote:
> On Thursday 03 June 2010 03:39:14 pm Luca Ferrari's cat walking on the
> keyboard wrote:
>
>> java.lang.NoClassDefFoundError: Could not initialize class
>> sun.security.provider.NativePRNG
>>
>
> I've noted that when the function is called the first time the logs are
> differents and provide the following stacktrace:
>
> Caused by: java.lang.SecurityException: read on /dev/random
> at
> org.postgresql.pljava.internal.Backend$1.assertPermission(Backend.java:176)
> at
> org.postgresql.pljava.internal.Backend$PLJavaSecurityManager.nonRecursiveCheck(Backend.java:111)
> at
> org.postgresql.pljava.internal.Backend$PLJavaSecurityManager.checkPermission(Backend.java:89)
> at java.lang.SecurityManager.checkRead(SecurityManager.java:871)
> at java.io.File.exists(File.java:731)
> at sun.security.provider.NativePRNG$1.run(NativePRNG.java:60)
> at java.security.AccessController.doPrivileged(Native Method)
> at sun.security.provider.NativePRNG.initIO(NativePRNG.java:57)
> at sun.security.provider.NativePRNG.<clinit>(NativePRNG.java:54)
> ... 31 more
> 2010-06-03 15:39:43 CEST ERROR: java.lang.ExceptionInInitializerError
>
>
> so it seems a problem of reading /dev/random, even if the user has the
> permissions:
>
> $ ls -l /dev/random
> crw-rw-rw- 1 root root 1, 8 2010-06-03 15:31 /dev/random
>
>
> Any idea?
>
> Thanks,
> Luca
> _______________________________________________
> Pljava-dev mailing list
> Pljava-dev at pgfoundry.org
> http://pgfoundry.org/mailman/listinfo/pljava-dev
>

In response to

Responses

Browse pljava-dev by date

  From Date Subject
Next Message Luca Ferrari 2010-06-04 08:42:18 [Pljava-dev] cannot set the classpath to a specific jar to get anexternal connection
Previous Message Luca Ferrari 2010-06-03 13:43:21 [Pljava-dev] cannot set the classpath to a specific jar to get anexternal connection