Skip to content

Commit c0c8bdd

Browse files
author
Rolf Braun
committed
bring up to date for Mac OS X 10.2
1 parent 0a83585 commit c0c8bdd

File tree

6 files changed

+55
-10
lines changed

6 files changed

+55
-10
lines changed

ChangeLog

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
2003-06-11 Rolf Braun <[email protected]>
2+
* config/kerberos_v4.m4:
3+
fix fallback to -lkrb4 when --enable-krb4 is specified
4+
* config/ltconfig:
5+
* config/ltmain.sh:
6+
make the darwin libtool work on OS X v10.2
7+
(bash/zsh shell syntax, and don't link bundles with extra args)
8+
* dlcompat-20010505/dlopen.c: back out bogus delimiter change
9+
* doc/macosx.html: update for 10.2 and add known problems section
10+
* mac/osx_cfm_glue/cfmglue.c: fix sasl_done followed by client_init
11+
112
2003-06-11 Rob Siemborski <[email protected]>
213
* man/sasl_client_new.3, man/sasl_server_new.3:
314
Security flags don't belong here, connection flags do.

config/kerberos_v4.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ AC_DEFUN(SASL_KERBEROS_V4_CHK, [
113113
[COM_ERR=""; SASL_KRB_LIB="-lkrb"; krb4lib="yes"],
114114
krb4lib=no, $LIB_DES)])], krb4="no")
115115
116-
if test "$krb4" = "yes" -a "$krb4lib" = "no"; then
116+
if test "$krb4" != "no" -a "$krb4lib" = "no"; then
117117
AC_CHECK_LIB(krb4, krb_mk_priv,
118118
[COM_ERR=""; SASL_KRB_LIB="-lkrb4"; krb4=yes],
119119
krb4=no, $LIB_DES)

config/ltconfig

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1372,7 +1372,7 @@ else
13721372
hardcode_shlibpath_var=no
13731373
;;
13741374

1375-
darwin* | rhapsody*)
1375+
darwin[15]* | rhapsody*)
13761376
allow_undefined_flag='-undefined error'
13771377
archive_cmds='$CC $(test x$module = xyes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs $linkopts -install_name $rpath/$soname $(test -n "$verstring" -a x$verstring != x0.0 && echo $verstring)'
13781378
# We need to add '_' to the symbols in $export_symbols first
@@ -1382,6 +1382,17 @@ else
13821382
whole_archive_flag_spec='-all_load $convenience'
13831383
;;
13841384

1385+
# Mac OS X v10.2 uses bash for /bin/sh instead of zsh, and the quoting syntax is incompatible
1386+
darwin*)
1387+
allow_undefined_flag='-undefined error'
1388+
archive_cmds='$CC $(test x$module = xyes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs $linkopts $(test x$module != xyes && echo -install_name $rpath/$soname $tmp_verstring)'
1389+
# We need to add '_' to the symbols in $export_symbols first
1390+
#archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols $lib'
1391+
hardcode_direct=yes
1392+
hardcode_shlibpath_var=no
1393+
whole_archive_flag_spec='-all_load $convenience'
1394+
;;
1395+
13851396
hpux9* | hpux10* | hpux11*)
13861397
case "$host_os" in
13871398
hpux9*) archive_cmds='$rm $objdir/$soname~$LD -b +b $install_libdir -o $objdir/$soname $libobjs $deplibs $linkopts~test $objdir/$soname = $lib || mv $objdir/$soname $lib' ;;

config/ltmain.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2181,6 +2181,11 @@ EOF
21812181
if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
21822182
eval cmds=\"$archive_expsym_cmds\"
21832183
else
2184+
if test "x$verstring" = "x0.0"; then
2185+
tmp_verstring=
2186+
else
2187+
tmp_verstring="$verstring"
2188+
fi
21842189
eval cmds=\"$archive_cmds\"
21852190
fi
21862191
IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'

dlcompat-20010505/dlopen.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,9 +135,8 @@ struct stat *stat_buf)
135135
/* extract path list element */
136136
p = element;
137137
q = pathbuf;
138-
while(*p && *p != ':' && q < pathbuf_end) {
138+
while(*p && *p != ':' && q < pathbuf_end)
139139
*q++ = *p++;
140-
}
141140
if(q == pathbuf){ /* empty element */
142141
if(*p){
143142
element = p+1;

doc/macosx.html

Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<html><head>
22
<title>Building and Using Cyrus SASL on Mac OS X</title>
3-
<!-- $Id: macosx.html,v 1.4 2002/12/25 00:25:14 leg Exp $ -->
3+
<!-- $Id: macosx.html,v 1.5 2003/06/12 00:32:50 rbraun Exp $ -->
44
</head>
55
<body>
66
<h1>Cyrus SASL v2 on Mac OS X (and 9)</h1><p>
@@ -59,20 +59,28 @@ <h2>Compiling and Using the Unix library</h2>
5959

6060
The Unix library is mostly ready to build on Mac OS X, but it does
6161
depend on the <tt>dlcompat</tt> package in order to load its
62-
plugins. <tt>dlcompat-20010505</tt> is the latest version and is known
62+
plugins. <tt>dlcompat-20010505</tt> is a relatively simple version known
6363
to work with SASL; it is provided with the distribution in a
6464
tarball. You should <tt>make</tt> and <tt>make install</tt> the
6565
<tt>dlcompat</tt> library (which probably goes into
6666
<tt>/usr/local/lib/libdl.dylib</tt>) before attempting to
6767
<tt>./configure</tt> the SASL distribution itself. SASL will then
6868
pretend it's a real Unix <tt>libdl</tt>, and link against it.<p>
6969

70-
If you are using MIT Kerberos for Macintosh 4.0, which is fully
70+
Since there are, at this point, newer and far more complex versions of
71+
dlcompat, you may prefer to use those instead if other software
72+
requires their functionality. The dlcompat homepage is located
73+
<a href="http://www.opendarwin.org/projects/dlcompat/">on the
74+
OpenDarwin site.</a><p>
75+
76+
If you are using MIT Kerberos for Macintosh 4.0 or later, which is fully
7177
supported by the SASL library, you should <tt>./configure</tt> with
7278
the added option <tt>--enable-krb4=/usr</tt> so that it finds the
7379
correct location for the header files. KfM will be automatically
7480
detected by the configure script, and the correct libraries linked
75-
in.<p>
81+
in. <i>Please read the "Known Problems" section at the end of this
82+
document for information on working around a problem with OpenSSL's
83+
DES headers.</i><p>
7684

7785
You must be root to make install, since <tt>/usr/local</tt> is only
7886
modifiable by root. You need not enable the root account using
@@ -96,7 +104,9 @@ <h2>Changes to the Unix library to make it work on OS X</h2><p>
96104
<ul>
97105
<li>The random code supports the preferred way to generate random
98106
numbers in Darwin. (In SASL v2, it does this on all unix-like
99-
platforms that lack jrand48).
107+
platforms that lack jrand48). <i>Note that Mac OS X "Jaguar", version 10.2,
108+
now has the standard jrand48 function, and that SASL will use this instead
109+
of the previous workaround.</i>
100110

101111
<li>Symbols which are dlopened have an underscore prefixed. (This
102112
behavior is detected by configure in SASL v2.)
@@ -113,7 +123,7 @@ <h2>Changes to the Unix library to make it work on OS X</h2><p>
113123
way). Note that the MD5 symbols have local names on all platforms with
114124
SASL v2; this was only different in SASL v1.
115125

116-
<li>MIT Kerberos for Macintosh 4.0 is fully supported. This was
126+
<li>MIT Kerberos for Macintosh 4.0 and later are fully supported. This was
117127
accomplished by using <tt>krb_get_err_text</tt> if available and
118128
checking for additional names for the krb4 libraries.
119129

@@ -172,3 +182,12 @@ <h2>Changes to the Mac OS 9 projects to support Carbon</h2><p>
172182

173183
</ul><p>
174184

185+
<h2>Known Problems</h2><p>
186+
187+
<ul>
188+
<li>The Kerberos v4 headers bundled with Mac OS X (and Kerberos for Macintosh) are not compatible with OS X's OpenSSL headers. The easiest solution, for now, is to build without using OpenSSL's <tt>libcrypto</tt>. To do this, specify the <tt>--without-openssl</tt> option to <tt>configure</tt>. After running <tt>configure</tt>, you will need to instruct the build system not to use OpenSSL's headers, either. Edit the <tt>config.h</tt> file, and look for the line:<p>
189+
<tt>#define WITH_SSL_DES 1</tt><p>
190+
Comment this line out (for example, by adding a double slash <tt>//</tt> to the beginning of it).<p>
191+
<li>Versions of Cyrus SASL prior to 2.1.14 with support for Carbon CFM applications on Mac OS X have a known bug involving the CFM glue code (in <tt>mac/osx_cfm_glue</tt>). If <tt>sasl_done</tt> is called to unload the SASL library, and then one of the initialization functions (such as <tt>sasl_client_init</tt>) is called to reinitialize it from the same process, the application will crash. A fix for one obvious cause of this problem is included in 2.1.14; however, as of this writing, it has not been tested. It is possible that other bugs in Cyrus SASL, or deficiencies in Apple's libraries, will make this fix insufficient to resolve this issue.
192+
</ul><p>
193+

0 commit comments

Comments
 (0)