My problem, Cyrus-SASL via sql plugin with oracle
Woon-San Ko
woon_san at yahoo.com
Tue Nov 21 00:57:18 EST 2006
Hi, all.
I found the causes of my problems.
One is that libsqlora8 need to be configured with '--with-threads=posix' option because cyrus
imapd runs in multithreaded way.
The other is that environment variables for OCI connection need to provided to the `master'
process.
The first problem is very clear.
However, the second problem is still in question.
When I tested some getenv() function in `master.c', I found that every environment variable such
`ORACLE_HOME' or `LD_LIBRARY_PATH' was missing, though I set those variables for the cyrus user.
Therefore, I added some test codes in the main() function of master.c using `putenv()' function to
add some environment variables ($ORA_HOME, $TNS_ADMIN, $LD_LIBRARY_PATH, etc.), then it finally
worked fine!
My question is why `master' process eliminates the environment variables for the cyrus user.
Is it intended for some reason?
Could anybody comment on my question?
Thanks in advance.
-Woonsan Ko
--- Woon-San Ko <woon_san at yahoo.com> wrote:
> Hi, all.
>
> I am going to explain my problem and want to hear some advices.
>
> I have been modifying plugins/sql.c to use oracle.
> So I changed sql.c, configure.in, and configure (by autoconf).
> I adopted libsqlora8 (http://www.poitschke.de/libsqlora8/) library to easily use OCI.
>
> When I tested with my stand alone test program using libsqlora8, it works very fine.
> But when I added some valid code into sql.c, it does not work.
>
> After tedious digging, I found that the OCIEnvCreate (in OCI) function failed returning -1.
> So, the sqlo_server_attach (in libsqlora8) function could not succeed.
>
> I am not advanced programmer in this field. I guessed the problem might be a security problem or
> an environmental problem.
> I tried to configure all environment variables for oracle for the cyrus user, by both shell
> environment settings and programmatic way (by adding some putenv() codes in
> cyrus-imapd/master/master.c, just for test.), but all failed.
>
> I could not catch any clue. (I'm using cyrus-imapd-2.2.13, cyrus-sasl-2.1.22, GNU/Linux 2.6.11
> and
> Oracle 10g.)
>
> Could anybody give me some advice?
>
> TIA.
>
> -Woonsan Ko
>
>
>
> ____________________________________________________________________________________
> Sponsored Link
>
> Mortgage rates near 39yr lows.
> $310k for $999/mo. Calculate new payment!
> www.LowerMyBills.com/lre
>
____________________________________________________________________________________
Sponsored Link
Online degrees - find the right program to advance your career.
www.nextag.com
More information about the Cyrus-sasl
mailing list