I got quite a few rejects when I went to test this.  I fixed them and
I modified the native-src auth build slightly in the hope that
handling the shared libraries as they are handled by the other modules
might resolve the ld issues.  This seems to have worked for me at
least.

It's not very large so I've attached an updated patch to make life
easier for the committers.

Regards,
 Mark.


On 01/03/06, Stepan Mishura <[EMAIL PROTECTED]> wrote:
> Hi Tim,
>
> I've attached a patch to run tests for login modules with 'hyauth'
> libraries. The tests pass with new libraries on Windows and Linux builds.
>
> I've updated native-src/linux.IA32/auth/makefile to add
> 'vmi' library to be linked because loading 'hyauth' failed with the next
> diagnostics:
> java.lang.UnsatisfiedLinkError: hyauth
> (<HY_PATH>/deploy/jre/bin/libhyauth.so: undefined symbol:
> VMI_GetVMIFromJNIEnv
>
> I'm not confident whether it is the right way to do this or not. So please
> correct me if I'm wrong.
>
> Also I found that on Linux it is required to specify explicitly:
> LD_LIBRARY_PATH=<HY_PATH>/deploy/jre/bin
> and
> JAVA_HOME==<HY_PATH>/deploy/jre
>
> Otherwise VM fails to start. For example, unit test for LUNI module failed
> because ant script file for them contains the following line:
>             <env key="JAVA_HOME" value=""/>
>
> On Windows it is OK to unset both variables.
>
> >
> > was the small fix just the loadLibrary call, or more?
> >
>
> It is just a typo in NTUserPrincipal.java (see attachment)
>
>
> Thanks,
> Stepan
>
>
> On 2/28/06, Tim Ellison <[EMAIL PROTECTED]> wrote:
> > sure thanks Stepan -- was the small fix just the loadLibrary call, or
> more?
> >
> > Talk to you tomorrow,
> > Tim
> >
> > Stepan Mishura wrote:
> > > Hi Tim,
> > >
> > > I reviewed source files: they look OK for me. Also I successfully (after
> > > small fix in java code:-)) run the test for login module on Windows with
> > > 'hyauth' library. Currently I'm trying to build Harmony and run the
> similar
> > > test on Linux. Hope to finish it tomorrow. Does it works for you?
> > >
> > > Thanks,
> > > Stepan.
> > >
> > >
> > > On 2/28/06, Tim Ellison < [EMAIL PROTECTED]> wrote:
> > >> Stepan,
> > >>
> > >> Have you completed your review?  If things look ok I'll change the
> > >> loadlibray calls to use 'hyauth'.
> > >>
> > >> (As I mentioned before, this is simply to bring the code in line with
> > >> the other natives as a stepping-stone to the final native code layout
> > >> within each module.)
> > >>
> > >> Thanks
> > >> Tim
> > >>
> > >> Stepan Mishura wrote:
> > >>> I've just checked out your update (have problems with network) and
> going
> > >> to
> > >>> review it. I'll let you know if I have questions or comments to your
> > >> update.
> > >>> BTW, we developed small tests for login modules that use these
> libraries
> > >>> see:
> > >>> 1)
> > >>>
> > >>
> modules\security\test\windows\unit\org\apache\harmony\security\x\security\auth\module\NTLoginModuleTest.java
> > >>> 2)
> > >>>
> > >>
> modules\security\test\linux\unit\org\apache\harmony\security\x\security\auth\module\UnixLoginModuleTest.java
> > >>> Thanks,
> > >>> Stepan Mishura
> > >>> Intel Middleware Products Division
> > >>>
> > >>>
> > >>>
> > >>> On 2/22/06, Tim Ellison <[EMAIL PROTECTED]> wrote:
> > >>>> FYI: I have added the C versions of the auth natives into the build.
> > >>>> They are building as hyayth.dll | libhyauth.so into jre/bin.
> > >>>>
> > >>>> However, I *haven't* removed the jaaswin.dll | libjaasnix.so code
> (and
> > >>>> these are still being loaded by NTSystem.java | UnixSystem.java)
> until
> > >>>> I've tested the new libraries.
> > >>>>
> > >>>> Regards,
> > >>>> Tim
> > >>>>
> > >>>> Tim Ellison wrote:
> > >>>>> sure -- this is the C version of the jaaswin code (including some Hy
> > >>>>> portlib-ification), with building code in the makefile format that
> the
> > >>>>> other natives use.  The Linux version still needs doing, so I wanted
> > >> to
> > >>>>> stash it in SVN for discussion with Mikhail et al before linking it
> > >> into
> > >>>>> the actual build.
> > >>>>>
> > >>>>> Thanks
> > >>>>> Tim
> > >>>>>
> > >>>>> Leo Simons wrote:
> > >>>>>> On Thu, Feb 16, 2006 at 11:00:26PM -0000, [EMAIL PROTECTED]
> wrote:
> > >>>>>>> Author: tellison
> > >>>>>>> Date: Thu Feb 16 15:00:22 2006
> > >>>>>>> New Revision: 378390
> > >>>>>>>
> > >>>>>>> URL:
> http://svn.apache.org/viewcvs?rev=378390&view=rev
> > >>>>>>> Log:
> > >>>>>>> Just stashing this code in svn,
> > >>>>>>> not included in the build.
> > >>>>>> When you put new things in SVN, please either make sure to have
> some
> > >>>> notes next
> > >>>>>> to them describing what it is for / what it does / what you will
> use
> > >> it
> > >>>> for or,
> > >>>>>> failing that, write a meaningful commit message that has this info.
> > >>>>>>
> > >>>>>> The subversion project has a great HACKING.html that describes the
> > >> how
> > >>>> and the why
> > >>>>>> and the like for this kind of thing.
> > >>>>>>
> > >>>>>> Thanks!
> > >>>>>>
> > >>>>>> Leo
> > >>>>>>
> > >>>> --
> > >>>>
> > >>>> Tim Ellison ([EMAIL PROTECTED])
> > >>>> IBM Java technology centre, UK.
> > >>>>
> > >> --
> > >>
> > >> Tim Ellison ([EMAIL PROTECTED])
> > >> IBM Java technology centre, UK.
> > >>
> > >
> > >
> > >
> > > --
> > > Thanks,
> > > Stepan Mishura
> > > Intel Middleware Products Division
> > >
> >
> > --
> >
> > Tim Ellison ([EMAIL PROTECTED])
> > IBM Java technology centre, UK.
> >
>
>
>
> --
>
> Thanks,
> Stepan Mishura
> Intel Middleware Products Division
>
>


--
Mark Hindess <[EMAIL PROTECTED]>
IBM Java Technology Centre, UK.
Index: 
modules/security/src/linux/javasrc/org/apache/harmony/security/x/security/auth/module/UnixSystem.java
===================================================================
--- 
modules/security/src/linux/javasrc/org/apache/harmony/security/x/security/auth/module/UnixSystem.java
       (revision 382129)
+++ 
modules/security/src/linux/javasrc/org/apache/harmony/security/x/security/auth/module/UnixSystem.java
       (working copy)
@@ -64,7 +64,7 @@
      */
     public UnixSystem() {
         if (!loadLibDone) {
-            System.loadLibrary("jaasnix");
+            System.loadLibrary("hyauth");
             loadLibDone = true;
         }
         load();
Index: 
modules/security/src/windows/javasrc/org/apache/harmony/security/x/security/auth/NTUserPrincipal.java
===================================================================
--- 
modules/security/src/windows/javasrc/org/apache/harmony/security/x/security/auth/NTUserPrincipal.java
       (revision 382129)
+++ 
modules/security/src/windows/javasrc/org/apache/harmony/security/x/security/auth/NTUserPrincipal.java
       (working copy)
@@ -65,7 +65,7 @@
         if (obj == this) {
             return true;
         }
-        if (obj instanceof NTSid) {
+        if (obj instanceof NTUserPrincipal) {
             return name.equals(((NTUserPrincipal) obj).name);
         }
         return false;
Index: 
modules/security/src/windows/javasrc/org/apache/harmony/security/x/security/auth/module/NTSystem.java
===================================================================
--- 
modules/security/src/windows/javasrc/org/apache/harmony/security/x/security/auth/module/NTSystem.java
       (revision 382129)
+++ 
modules/security/src/windows/javasrc/org/apache/harmony/security/x/security/auth/module/NTSystem.java
       (working copy)
@@ -59,7 +59,7 @@
      */
     public NTSystem() {
         if (!loadLibDone) {
-            System.loadLibrary("jaaswin");
+            System.loadLibrary("hyauth");
             initNatives();
             loadLibDone = true;
         }
Index: modules/security/make/build.xml
===================================================================
--- modules/security/make/build.xml     (revision 382129)
+++ modules/security/make/build.xml     (working copy)
@@ -512,6 +512,9 @@
             <formatter type="xml" />
 <!--            <batchtest todir="${build.path}/tests_report"> -->
                 <batchtest todir="${tests.output}">
+                <fileset dir="${src.tst.common.ps}/unit">
+                    <include name="**/*Test*.java"/>
+                </fileset>
                 <fileset dir="${src.tst.common}/unit">
                     <include name="**/*Test*.java"/>
 
Index: native-src/linux.IA32/auth/makefile
===================================================================
--- native-src/linux.IA32/auth/makefile (revision 382129)
+++ native-src/linux.IA32/auth/makefile (working copy)
@@ -20,6 +20,10 @@
 
 CFLAGS += -fpic 
 BUILDFILES = $(SHAREDSUB)auth_copyright.o authnix.o
+MDLLIBFILES = \
+        ../libhysig.so ../lib/libhyzip.a ../libhyzlib.so ../lib/libhycommon.a \
+        ../lib/libhypool.a ../lib/libhyfdlibm.a ../libhythr.so ../libvmi.so
+
 DLLNAME = ../libhyauth.so
 
 include ../rules.mk
Index: make/build-java.xml
===================================================================
--- make/build-java.xml (revision 382129)
+++ make/build-java.xml (working copy)
@@ -180,6 +180,7 @@
             <src path="nio_char/src/main/java" />
             <src path="security/src/common/javasrc" />
             <src path="security/src/windows/javasrc" />
+            <src path="security/src/linux/javasrc" />
 
             <src path="x-net/src/main/java/" />
 

Reply via email to