ports/58952: [PATCH] Unbreake security/pam_krb5 with heimdal and gcc 3.3
Andrey Beresovsky
and at rsu.ru
Wed Nov 5 07:30:27 UTC 2003
>Number: 58952
>Category: ports
>Synopsis: [PATCH] Unbreake security/pam_krb5 with heimdal and gcc 3.3
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Tue Nov 04 23:30:25 PST 2003
>Closed-Date:
>Last-Modified:
>Originator: Andrey Beresovsky
>Release: FreeBSD 5.1-CURRENT i386
>Organization:
Rostov State University
>Environment:
System: FreeBSD 5.1-CURRENT #0: Wed Oct 29 15:30:40 MSK 2003
>Description:
The port is broken on CURRENT and STABLE with heimdal. Attached patches will unbreak it.
patch for Makefile:
- USE_AUTOCONF required by patch-aclocal.m4
- fixes dependencies: currently heimdal from ports installs libkrb5.19
patch-aclocal.m4:
- wrong test for argument type which leads to compiler warnings on CURRENT; simple
fix - PAM implementations on FreeBSD (OpenPAM from CURRENT and LinuxPAM from STABLE
and early 5.0) use const parameter
- configure script incorrectly indentifies heimdal kerberos implementation as mit
which leads to build fail
patch-pam_krb5.h:
- compile with gcc 3.3
Tested on CURRENT and STABLE with heimdal and mit kerberos implementations from
ports. Builds and works fine.
>How-To-Repeat:
>Fix:
patch for Makefile:
--- Makefile.orig Mon Nov 3 14:07:46 2003
+++ Makefile Mon Nov 3 14:07:51 2003
@@ -17,6 +17,7 @@
USE_BZIP2= yes
USE_PERL5= yes
+USE_AUTOCONF= yes
GNU_CONFIGURE= yes
.if defined(PACKAGE_BUILDING)
@@ -24,7 +25,7 @@
.endif
.if defined(KRB5_IMPL) && ${KRB5_IMPL} == heimdal
-LIB_DEPENDS= krb5.18:${PORTSDIR}/security/heimdal
+LIB_DEPENDS= krb5.19:${PORTSDIR}/security/heimdal
.if defined(HEIMDAL_HOME)
KRB5_DIR?= ${HEIMDAL_HOME}
.endif
patch-aclocal.m4:
--- aclocal.m4.orig Fri Sep 7 21:27:55 2001
+++ aclocal.m4 Wed Nov 5 00:04:35 2003
@@ -61,8 +61,7 @@
dnl Do we use const void *, or just void *?
AC_MSG_CHECKING(whether PAM prototypes use const pointers)
- AC_EGREP_HEADER([const void \*\*item],security/pam_appl.h,
- [AC_DEFINE(HAVE_PAM_CONST_PROTO) AC_MSG_RESULT(yes)],AC_MSG_RESULT(no))
+ AC_DEFINE(HAVE_PAM_CONST_PROTO)
dnl Check to see if this is Linux-PAM. If it doesn't, assume that it
dnl is Solaris-like.
@@ -186,10 +185,11 @@
ac_save__CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$KRB5CFLAGS $CPPFLAGS"
- dnl Do we have krb5_free_data_contents, or krb5_xfree? (MIT v. Heimdal)
- AC_EGREP_HEADER(krb5_free_data_contents,krb5.h,
- [COMPAT_SRCS=compat_mit.c COMPAT_OBJS=compat_mit.o],
- [COMPAT_SRCS=compat_heimdal.c COMPAT_OBJS=compat_heimdal.o])
+ if test "$KRB5IMPL" = "mit"; then
+ COMPAT_SRCS=compat_mit.c COMPAT_OBJS=compat_mit.o
+ else
+ COMPAT_SRCS=compat_heimdal.c COMPAT_OBJS=compat_heimdal.o
+ fi
AC_CHECK_HEADER(krb5.h, :,
AC_MSG_ERROR(krb5.h not found! Please use --with-krb5 to specify an alternate basedir))
patch-pam_krb5.h:
--- pam_krb5.h.orig Sun Nov 2 17:38:14 2003
+++ pam_krb5.h Sun Nov 2 17:38:44 2003
@@ -101,9 +101,9 @@
#define DBG(x) do { \
- if (state->opt.flags & OPT_DEBUG) pam_krb5_debug##x; \
+ if (state->opt.flags & OPT_DEBUG) pam_krb5_debug x; \
} while (0)
-#define LOG(x) pam_krb5_log##x
+#define LOG(x) pam_krb5_log x
/* MIT / Heimdal compatibility shims and support */
const char *compat_princ_component(krb5_context, krb5_principal, int);
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list