From owner-freebsd-java Tue Aug 27 23: 4: 6 2002 Delivered-To: freebsd-java@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F060837B400; Tue, 27 Aug 2002 23:04:03 -0700 (PDT) Received: from guinness.syncrontech.com (guinness.syncrontech.com [62.71.8.19]) by mx1.FreeBSD.org (Postfix) with ESMTP id E88B943E4A; Tue, 27 Aug 2002 23:04:01 -0700 (PDT) (envelope-from ari.suutari@syncrontech.com) Received: from linux (coffee.syncrontech.com [62.71.8.37]) by guinness.syncrontech.com (8.12.3/8.12.3) with ESMTP id g7S63beA017963; Wed, 28 Aug 2002 09:03:37 +0300 (EEST) (envelope-from ari.suutari@syncrontech.com) Content-Type: text/plain; charset="iso-8859-1" From: Ari Suutari Organization: Syncron Tech Oy To: dan_256@yahoo.com, Greg Lewis , Ernst de Haan Subject: Re: Jboss3ctl update (I think I know the problem) Date: Wed, 28 Aug 2002 09:04:31 +0300 User-Agent: KMail/1.4.2 Cc: dan_256@yahoo.com, K.J.Koster@kpn.com, freebsd-java@FreeBSD.ORG References: <20020828013922.50148.qmail@web13402.mail.yahoo.com> In-Reply-To: <20020828013922.50148.qmail@web13402.mail.yahoo.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200208280904.31561.ari.suutari@syncrontech.com> Sender: owner-freebsd-java@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Hi, On Wednesday 28 August 2002 04:39, Dan Hulme wrote: > Basically, that's it. The .java_wrapper script is not exactly the prob= lem, > but the ENV. As I stated in my original post > (http://www.geocrawler.com/archives/3/162/2002/6/0/9029840/), the probl= em > is two-fold. In my understanding, the entire ENV will be ignored any t= ime > you are SUIDing. Even if I am wrong about that, the LD_LIBRARY_PATH, w= hich > the .java_wrapper usually sets to link in some libs for java will be > ignored according to "man ldconfig" when SUIDing. =09Only LD_LIBRARY_PATH, LD_DEBUG and LD_PRELOAD is ignored.=20 =09From rtld.c: trust =3D geteuid() =3D=3D getuid() && getegid() =3D=3D getgid(); ld_bind_now =3D getenv("LD_BIND_NOW"); if (trust) { ld_debug =3D getenv("LD_DEBUG"); ld_library_path =3D getenv("LD_LIBRARY_PATH"); ld_preload =3D getenv("LD_PRELOAD"); } =09 =09So, really just calling setuid(geteuid()) makes things work. =09No special kludgery is necessary. =09=09Ari S. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-java" in the body of the message