Skip Menu |
 

Date: Wed, 11 Jan 2012 21:02:33 -0500
From: Richard Basch <basch@alum.mit.edu>
Subject: Another Solaris 8 incompatibility (krb5-1.9.1)
To: krbdev@mit.edu, krb5-bugs@mit.edu
In addition to the prior bug I reported with ksu (setenv), there is another
compilation issue with Solaris 8.
This one occurs if you attempt to compile with --with-ldap.

Isblank() is not defined, but the code assumes the function exists and
merely is lacking a prototype. This fix is more of a workaround to use the
isspace() function if isblank() does not exist. Unfortunately, isspace()
will match additional characters such as \r and \n, whereas isblank() should
only match \t and 0x20 (space).

I still have some testing to do, but at least things are progressing
further.

-Richard


Show quoted text
-----Original Message-----
From: Richard Basch [mailto:probe@k9.internal.bright-prospects.com]
Sent: Wednesday, January 11, 2012 8:57 PM
To: probe@k9.internal.bright-prospects.com
Subject:

--- src/configure.in.orig 2010-11-01 16:36:17.000000000 -0400
+++ src/configure.in 2012-01-11 20:35:47.000000000 -0500
@@ -214,7 +214,7 @@
AC_PROG_LEX
AC_C_CONST
AC_HEADER_DIRENT
-AC_CHECK_FUNCS(strdup setvbuf inet_ntoa inet_aton seteuid setresuid
setreuid setegid setresgid setregid setsid flock fchmod chmod strftime
strptime geteuid setenv unsetenv getenv gmtime_r localtime_r bswap16 bswap64
mkstemp getusershell access getcwd srand48 srand srandom stat strchr
strerror strerror_r)
+AC_CHECK_FUNCS(strdup setvbuf inet_ntoa inet_aton seteuid setresuid
setreuid setegid setresgid setregid setsid flock fchmod chmod strftime
strptime geteuid setenv unsetenv getenv gmtime_r localtime_r bswap16 bswap64
mkstemp getusershell access getcwd srand48 srand srandom stat strchr
strerror strerror_r isblank)

AC_CHECK_FUNC(mkstemp,
[MKSTEMP_ST_OBJ=
--- src/plugins/kdb/ldap/libkdb_ldap/kdb_ldap.c.orig 2010-07-15
00:18:00.000000000 -0400
+++ src/plugins/kdb/ldap/libkdb_ldap/kdb_ldap.c 2012-01-11
20:15:30.000000000 -0500
@@ -40,9 +40,13 @@
#include <kdb5.h>
#include <kadm5/admin.h>

+#if defined(isblank) || defined(HAVE_ISBLANK)
#if defined(NEED_ISBLANK_PROTO) && !defined(isblank)
extern int isblank();
#endif
+#else /* isblank missing */
+#define isblank isspace
+#endif

krb5_error_code
krb5_ldap_get_db_opt(char *input, char **opt, char **val)
Date: Thu, 12 Jan 2012 09:39:09 -0500
From: Richard Basch <basch@alum.mit.edu>
Subject: FW:
To: krbdev@mit.edu, krb5-bugs@mit.edu
CC: richard.basch@gs.com
My prior patch was flawed in the #ifdef logic... As I mentioned in my prior
email, compiling with --with-ldap on Solaris 8 fails because isblank() is a
relatively recent addition to libc (present in Solaris 10).

The attached patch is a bit closer to what is required, though to be
completely accurate, isblank() should be properly emulated since isspace()
will also match \r and \n in addition to \t and \040 (space).

-Richard


Show quoted text
-----Original Message-----
From: Richard Basch [mailto:probe@k9.internal.bright-prospects.com]
Sent: Thursday, January 12, 2012 9:36 AM
To: probe@k9.internal.bright-prospects.com
Subject:

--- krb5-1.9.1/src/plugins/kdb/ldap/libkdb_ldap/kdb_ldap.c.orig 2010-07-15
00:18:00.000000000 -0400
+++ krb5-1.9.1/src/plugins/kdb/ldap/libkdb_ldap/kdb_ldap.c 2012-01-12
09:23:26.000000000 -0500
@@ -40,9 +40,13 @@
#include <kdb5.h>
#include <kadm5/admin.h>

-#if defined(NEED_ISBLANK_PROTO) && !defined(isblank)
+#if !defined(isblank) && defined(HAVE_ISBLANK)
+#if defined(NEED_ISBLANK_PROTO)
extern int isblank();
#endif
+#else /* isblank missing */
+#define isblank isspace
+#endif

krb5_error_code
krb5_ldap_get_db_opt(char *input, char **opt, char **val)
--- krb5-1.9.1/src/configure.in.orig 2010-11-01 16:36:17.000000000 -0400
+++ krb5-1.9.1/src/configure.in 2012-01-11 20:35:47.000000000 -0500
@@ -214,7 +214,7 @@
AC_PROG_LEX
AC_C_CONST
AC_HEADER_DIRENT
-AC_CHECK_FUNCS(strdup setvbuf inet_ntoa inet_aton seteuid setresuid
setreuid setegid setresgid setregid setsid flock fchmod chmod strftime
strptime geteuid setenv unsetenv getenv gmtime_r localtime_r bswap16 bswap64
mkstemp getusershell access getcwd srand48 srand srandom stat strchr
strerror strerror_r)
+AC_CHECK_FUNCS(strdup setvbuf inet_ntoa inet_aton seteuid setresuid
setreuid setegid setresgid setregid setsid flock fchmod chmod strftime
strptime geteuid setenv unsetenv getenv gmtime_r localtime_r bswap16 bswap64
mkstemp getusershell access getcwd srand48 srand srandom stat strchr
strerror strerror_r isblank)

AC_CHECK_FUNC(mkstemp,
[MKSTEMP_ST_OBJ=
Date: Sat, 14 Jan 2012 12:24:31 -0500
From: Richard Basch <basch@alum.mit.edu>
Subject: RE: [krbdev.mit.edu #7074] AutoReply: Another Solaris 8 incompatibility (krb5-1.9.1)
To: rt@krbdev.mit.edu
RT-Send-Cc:
Download (untitled) / with headers
text/plain 2.8KiB
This is a slightly revised patch...

--- krb5-1.9.1/src/plugins/kdb/ldap/libkdb_ldap/kdb_ldap.c.orig 2010-07-15
00:18:00.000000000 -0400
+++ krb5-1.9.1/src/plugins/kdb/ldap/libkdb_ldap/kdb_ldap.c 2012-01-14
12:23:13.000000000 -0500
@@ -40,9 +40,15 @@
#include <kdb5.h>
#include <kadm5/admin.h>

-#if defined(NEED_ISBLANK_PROTO) && !defined(isblank)
+#if !defined(isblank) && defined(HAVE_ISBLANK)
+#if defined(NEED_ISBLANK_PROTO)
extern int isblank();
#endif
+#else /* isblank missing */
+#if !defined(isblank)
+#define isblank isspace
+#endif
+#endif

krb5_error_code
krb5_ldap_get_db_opt(char *input, char **opt, char **val)
--- krb5-1.9.1/src/configure.in.orig 2010-11-01 16:36:17.000000000 -0400
+++ krb5-1.9.1/src/configure.in 2012-01-11 20:35:47.000000000 -0500
@@ -214,7 +214,7 @@
AC_PROG_LEX
AC_C_CONST
AC_HEADER_DIRENT
-AC_CHECK_FUNCS(strdup setvbuf inet_ntoa inet_aton seteuid setresuid
setreuid setegid setresgid setregid setsid flock fchmod chmod strftime
strptime geteuid setenv unsetenv getenv gmtime_r localtime_r bswap16 bswap64
mkstemp getusershell access getcwd srand48 srand srandom stat strchr
strerror strerror_r)
+AC_CHECK_FUNCS(strdup setvbuf inet_ntoa inet_aton seteuid setresuid
setreuid setegid setresgid setregid setsid flock fchmod chmod strftime
strptime geteuid setenv unsetenv getenv gmtime_r localtime_r bswap16 bswap64
mkstemp getusershell access getcwd srand48 srand srandom stat strchr
strerror strerror_r isblank)

AC_CHECK_FUNC(mkstemp,
[MKSTEMP_ST_OBJ=

Show quoted text
-----Original Message-----
From: krb5 [mailto:rt@krbdev.mit.edu]
Sent: Friday, January 13, 2012 6:43 PM
To: basch@alum.mit.edu
Subject: [krbdev.mit.edu #7074] AutoReply: Another Solaris 8 incompatibility
(krb5-1.9.1)


Greetings,

This message has been automatically generated in response to the
creation of a trouble ticket regarding:
"Another Solaris 8 incompatibility (krb5-1.9.1)",
a summary of which appears below.

There is no need to reply to this message right now. Your ticket has been
assigned an ID of [krbdev.mit.edu #7074].

Please include the string:

[krbdev.mit.edu #7074]

in the subject line of all future correspondence about this issue. To do so,

you may reply to this message.

Thank you,


-------------------------------------------------------------------------
In addition to the prior bug I reported with ksu (setenv), there is another
compilation issue with Solaris 8.
This one occurs if you attempt to compile with --with-ldap.

Isblank() is not defined, but the code assumes the function exists and
merely is lacking a prototype. This fix is more of a workaround to use the
isspace() function if isblank() does not exist. Unfortunately, isspace()
will match additional characters such as \r and \n, whereas isblank() should
only match \t and 0x20 (space).

I still have some testing to do, but at least things are progressing
further.

-Richard
From: tlyu@mit.edu
Subject: SVN Commit

Patch from Richard Basch to work around Solaris 8 lacking isblank().

https://github.com/krb5/krb5/commit/4d75811f329fdf893bd7bd5aff84dcfd37cdab89
Commit By: tlyu
Revision: 25716
Changed Files:
U trunk/src/configure.in
U trunk/src/plugins/kdb/ldap/libkdb_ldap/kdb_ldap.c
From: tlyu@mit.edu
Subject: SVN Commit

Pull up r25716 from trunk

------------------------------------------------------------------------
r25716 | tlyu | 2012-02-27 13:31:50 -0500 (Mon, 27 Feb 2012) | 6 lines

ticket: 7074
target_version: 1.10.1
tags: pullup

Patch from Richard Basch to work around Solaris 8 lacking isblank().

https://github.com/krb5/krb5/commit/ccee9c1072e1f708ae15706d2b47bb0b4ef092e1
Commit By: tlyu
Revision: 25738
Changed Files:
U branches/krb5-1-10/src/configure.in
U branches/krb5-1-10/src/plugins/kdb/ldap/libkdb_ldap/kdb_ldap.c