pg.ddx.io  pgsql-pkg-debian@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Chapman Flack <chap@anastigmatix.net>
To: Christoph Berg <myon@debian.org>
To: pgsql-pkg-debian@postgresql.org
To: pgsql-pkg-yum@postgresql.org
Subject: Re: PL/Java 1.5.2 - fixes one regression in date conversion in 1.5.1
Date: Wed, 7 Nov 2018 13:23:42 -0500
Message-ID: <5BE32DAE.7090508@anastigmatix.net> (raw)
In-Reply-To: <20181106145659.GC13511@msg.df7cb.de>
References: <5BE08D74.2060207@anastigmatix.net>
	<20181106074931.GB3898@msg.df7cb.de>
	<5BE18B2F.9030805@anastigmatix.net>
	<20181106145659.GC13511@msg.df7cb.de>

On 11/06/18 09:56, Christoph Berg wrote:

> There's still a problem, though. Jessie, 9.3, OpenJDK 7:
> 
> ERROR:  java.lang.SecurityException: read on /usr/share/javazi/Europe/Prague
> STATEMENT:  SELECT sqlj.install_jar('file:/usr/share/postgresql/9.3/pljava/pljava-examples-1.5.2.jar', 'examples', true)

Hmm. Does that happen only on Jessie? Is there a debianism where zoneinfo
files for Java are distributed in this other location instead of under
$JAVA_HOME ?

At present, the security manager for "trusted" PL/Java doesn't offer any
easy way to configure additional filesystem locations that are ok to read
from. I'm working on that for a future version, but that doesn't help here.

I suspect it could be made to work by adding
trust=org.postgresql.pljava.annotation.Function.Trust.UNSANDBOXED
in the @Function annotation on the issue199() method in
pljava-examples/src/main/java/org/postgresql/pljava/example/annotation/PreJSR310.java

However, it is only a regression test, and it is probably simpler just to
build with a patch to not run it (say, by removing the @SQLAction annotation
at the top of that file). That's preferable to adding UNSANDBOXED willy
nilly to things in the examples jar that people may casually install.

This is good for me to know about, as I was thinking of changing PL/Java's
behavior in a future release to set Java's timezone to match the PG
session's by default. Now I know not to do that until there is a way to
accommodate zoneinfo from atypical locations.

-Chap




view thread (20+ messages)  latest in thread

Message-ID: <5BE32DAE.7090508@anastigmatix.net>
Permalink:  ../5BE32DAE.7090508@anastigmatix.net/
Also on:    postgresql.org/message-id/5BE32DAE.7090508@anastigmatix.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-pkg-debian@postgresql.org
  Cc: chap@anastigmatix.net, myon@debian.org, pgsql-pkg-yum@postgresql.org
  Subject: Re: PL/Java 1.5.2 - fixes one regression in date conversion in 1.5.1
  In-Reply-To: <5BE32DAE.7090508@anastigmatix.net>
  References: <5BE08D74.2060207@anastigmatix.net> <20181106074931.GB3898@msg.df7cb.de> <5BE18B2F.9030805@anastigmatix.net> <20181106145659.GC13511@msg.df7cb.de> <5BE32DAE.7090508@anastigmatix.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox