agora inbox for pljava-dev@postgresql.org  
help / color / mirror / Atom feed
Subject: [Pljava-dev] Re: Subject: Re: Loading of native libraries in PLJAVA
Date: Fri, 11 Mar 2005 13:38:55 +0100
Message-ID: <4231915F.10703@mailblocks.com> (raw)
In-Reply-To: <3214799999CED64882731155DB0AAD922CEA6E@MLSW00103>
References: <3214799999CED64882731155DB0AAD922CEA6E@MLSW00103>

Nageshwar Rao wrote:

>Hi,
>You can find JNI interface in
>http://www.teamlinux.org.uk/saxm/projects/icmp/, there is PingClient java
>file, which calls a JNI ping utility. 
>
>Steps to replicate the error:-
>
>	Basically we need to create a jar file of PingUtility and install
>the jar file in PLJava and set the classpath then insert record in the
>referenced table to invoke the trigger and the trigger should call the ping
>utility via JNI.
>  
>
I have no linker problems loading and running libping from within 
PL/Java so there must be an error in your setup. I run into another 
perhaps bigger problem though. ping.c creates a RAW socket. Only root is 
allowed to do that. PostgreSQL refuses to run as root (rightly so, that 
would be a major security hole).

Here's a quote from the teamlinux page: "Unfortunately, it requires root 
(at least, on a Linux box) - as ping.c creates a raw packet, which can 
only be done by the super-user."

Perhaps you should consider skip using libping altogether and go for 
J2SE 5.0 instead and then use java.net.InetAddress.isReachable()?

Regards,
Thomas Hallgren





view thread (3+ messages)

Message-ID: <4231915F.10703@mailblocks.com>
Permalink:  ../4231915F.10703@mailblocks.com/
Also on:    postgresql.org/message-id/4231915F.10703@mailblocks.com

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 using the --to and --cc options:
  reply via email

  To: pljava-dev@postgresql.org
  Subject: Re: [Pljava-dev] Re: Subject: Re: Loading of native libraries in PLJAVA
  In-Reply-To: <4231915F.10703@mailblocks.com>

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

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