February 4, 2012

Sun Ray on Linux

Sun Ray 3.1 on Linux depends on openldap libraries that are linked against the OLD SASL Libs. The ones that include CRAM-MD5 (or more specifically, hmac_md5). In order to do that, I downloaded the cyrus-sasl-1.5.28 src.

A standard compile fails with these error messages:

db_berkeley.c: In function `berkeleydb_open':
db_berkeley.c:94: warning: passing arg 2 of pointer to function from incompatible pointer type
db_berkeley.c:94: warning: passing arg 4 of pointer to function makes pointer from integer without a cast
db_berkeley.c:94: error: too few arguments to function
make[2]: *** [db_berkeley.lo] Error 1
make[2]: Leaving directory `/tmp/cyrus-sasl-1.5.28/lib'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/tmp/cyrus-sasl-1.5.28'
make: *** [all-recursive-am] Error 2

Howard Chu explains that Cyrus SASLv1 libraries were never up-reved to include Berkeley 4.1 support. So one has to manually patch it.
Very simple.

a) Open the file libs/db_berkeley.c and at line 94, change


ret = (*mbdb)->open(*mbdb, path, NULL, DB_HASH, flags, 0660);
to

ret = (*mbdb)->open(*mbdb, NULL, path, NULL, DB_HASH, flags, 0660);

b) Open the file utils/sasldblistusers.c and at line 184, change

ret = (*mbdb)->open(*mbdb, path, NULL, DB_HASH, DB_CREATE, 0664);

to

ret = (*mbdb)->open(*mbdb, NULL, path, NULL, DB_HASH, DB_CREATE, 0664);

and compile.

Comments

  1. Chris A says:

    I also had to gut a lot of the code in sample/ as it would not compile either. Since I’m not using the sample, I just commented out the code which would not compile.

Speak Your Mind

*