Get mod_auth_oracle to work on Freebsd

From: Iu hh (iuhh_at_hotmail.com)
Date: 06/27/05

  • Next message: Benjamin Thelen: "Re: ndis0 dhcp question"
    To: freebsd-questions@freebsd.org
    Date: Mon, 27 Jun 2005 11:05:42 +0100
    
    

    Hi guys,

    I'm desparate for some help with installing mod_auth_oracle on my Freebsd
    server. I'm trying to get Apache to authenticate against u/p database held
    in our Oracle database, as we are moving from single server to multiple
    servers, a distributed authentication is really important for us. btw I'm
    using Apache 2.0.54, Oracle client 10.1.0.3 and mod_auth_oracle 1.1.1.

    First of all I've installed all three oracle instant client ports, then I've
    tried to compile mod_auth_oracle from source as there's no freebsd port.
    I've made the following modifications to the Makefile:
    @@ -4,9 +4,9 @@
    ##

    builddir=.
    -top_srcdir=/etc/httpd
    -top_builddir=/etc/httpd
    -include /usr/lib/httpd/build/special.mk
    +top_srcdir=/usr/local/share/apache2
    +top_builddir=/usr/local/share/apache2
    +include /usr/local/share/apache2/build/special.mk

    # the used tools
    APXS=apxs
    @@ -17,7 +17,7 @@
    DEFS=-DOCI7
    INCLUDES=-I${ORACLE_HOME}/rdbms/demo
    else
    -INCLUDES=-I${ORACLE_HOME}/rdbms/demo -I${ORACLE_HOME}/rdbms/public
    +INCLUDES=-I${ORACLE_HOME}/rdbms/demo -I${ORACLE_HOME}/rdbms/public
    -I/usr/local/include/apache2
    -I/compat/linux/usr/include/oracle/10.1.0.3/client
    endif
    SH_LIBS=-L${ORACLE_HOME}/lib/ -lclntsh

    Then I added enviromental variable, compiled and installed mod_auth_oracle,
    all went OK.
    export ORACLE_HOME=/usr/compat/linux/usr/lib/oracle/10.1.0.3/client/
    gmake && gmake install

    Finally I've added the following line to httpd.conf:
    LoadModule auth_oracle_module libexec/apache2/mod_auth_oracle.so
    AddModule mod_auth_oracle.c
    PassEnv ORACLE_HOME TNS_ADMIN NLS_LANG

    However, when I tried to restart apache with the new module, I've got the
    following error:
    # apachectl -t
    Syntax error on line 283 of /usr/local/etc/apache2/httpd.conf:
    Cannot load /usr/local/libexec/apache2/mod_auth_oracle.so into server:
    Shared object "libclntsh.so.10.1" not found, required by
    "mod_auth_oracle.so"

    I tried to tweak the library path as follows:
    export
    LD_LIBRARY_PATH=/lib:/usr/lib:/usr/local/lib:/usr/compat/linux/lib:/usr/compat/linux/usr/lib/oracle/10.1.0.3/client/lib:/usr/compat/linux/usr/share/oracle/10.1.0.3/client:/usr/compat/linux/usr/include/oracle/10.1.0.3/client
    and tested apache again, got even worse results:
    # apachectl -t
    Bus error (core dumped)

    I suspect this is a result of mix and matching linux compatibility library
    and native fbsd library; however I've ran out of options to fix this
    problem. Here're some readable texts from the httpd.core, hope it's of any
    help...
    ...
    NIS_DEFAULTS
    unable to free arguments
    NIS+: callback timed out
    %s.%d.%d
    NIS+: failed to register callback dispatcher
    NIS+: failed to read local socket info
    NIS+: out of memory allocating callback
    /lib/ld-linux.so.2
    ...
    svc_unix.c - cannot getsockname or listen
    svcunix_create: out of memory
    svc_unix: makefd_xprt: out of memory
    DST not allowed in SUID/SGID programs
    empty dynamic string token substitution
    opening file=%s; opencount == %u
    closing file=%s; opencount == %u
    RTLD_NEXT used in code not dynamically loaded
    /lib/ld-linux.so.2
    ...
    ELF file version ident does not match current one
    ELF file version does not match current one
    ELF file's phentsize not the expected size
    only ET_DYN and ET_EXEC can be loaded
    cannot open shared object file
    symbol=%s; lookup in file=%s
    file=%s; needed by %s (relocation dependency)
    binding file %s to %s: %s symbol `%s'
    %s 0x%0*Zx 0x%0*Zx -> 0x%0*Zx 0x%0*Zx
    cannot make segment writable for relocation
    %s: Symbol `%s' has different size in shared object, consider re-linking
    %s: profiler found no PLTREL in object %s
    %s: profiler out of memory shadowing PLTREL of %s
    can't restore segment prot after reloc
    DST not allowed in SUID/SGID programs
    empty dynamics string token substitution
    cannot load auxiliary `%s' because ofempty dynamic string token substitution
    load auxiliary object=%s requested by file=%s
    load filtered object=%s requested by file=%s
    cannot allocate dependency list
    cannot allocate symbol search list
    error while loading shared libraries
    checking for version `%s' in file %s required by file %s
    no version information available (required by
    cannot allocate version reference table
    %s: file is no correct profile data file for `%s'
    Out of memory while initializing profiler
    FATAL: cannot determine library version
    unexpected PLT reloc type 0x??
    unexpected reloc type 0x??

    Is there anyway I can compile this module with Linux compabitility library
    depency to run on the native fbsd Apache? Thanks a lot for your help!

    Cheers,
    Hui

    _________________________________________________________________
    Be the first to hear what's new at MSN - sign up to our free newsletters!
    http://www.msn.co.uk/newsletters

    _______________________________________________
    freebsd-questions@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-questions
    To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"


  • Next message: Benjamin Thelen: "Re: ndis0 dhcp question"

    Relevant Pages

    • [UNIX] Denial of Service in Apache HTTP Server 2.x
      ... The following security advisory is sent to the securiteam mailing list, and can be found at the SecuriTeam web site: http://www.securiteam.com ... The Apache Software Foundation's HTTP Server Project is an effort to ... A memory leak in Apache server, allows a remote user to exhaust system ... Remote exploitation of a memory leak in the Apache HTTP Server causes the ...
      (Securiteam)
    • Re: FreeBSD 6.2-STABLE && apache 2.2.4 = bad performance. Help!
      ... I suspect your PHP appare leaking memory or otherwise ... That memory profile of your apache is surprising and resembles only a ... >> The fact that your server starts dogging out around 40 processes is ... with a load of 10.18 and 34 apache processes. ...
      (freebsd-questions)
    • Limiting daemons RSS
      ... I have a server with very little memory. ... I'd like to ensure that apache and exim never starve other programs ...
      (Debian-User)
    • mysql_connect under WAMP
      ... I am running Apache with PHP5 and everything seems to be working OK: example sites that I have built display successfully. ... I am now trying to connect to a mysql database (on a local server but not Localhost) and when I try to connect I get the message ... ... I therefore trawled through httpd.conf and php.ini to see which settings I could adjust. ... Indeed, I am a newcomer to WAMP, so I would be interested to know how PHP handles libraries. ...
      (alt.php)
    • Re: linux persistent c application with http protocol?
      ... run on a linux server like a daemon and manage variables printing out ... to process thousands of requests per second with a UDP server. ... I don't know why you think Apache is slow. ... You could store the counter in shared memory ...
      (comp.programming)