[sudo-users] kerb5 + sudo build problem
Todd C. Miller
Todd.Miller at courtesan.com
Mon Apr 18 09:21:19 EDT 2011
On Sun, 17 Apr 2011 23:26:39 MDT, Eric Schoeller wrote:
> /bin/sh ../../libtool --mode=compile gcc -c -I../../include -I../.. -I.
> -I../.. -g -O2 -D_GNU_SOURCE
> -D_PATH_SUDOERS=\"/usr/local/sudo/etc/sudoers\" -DSUDOERS_UID=0
> -DSUDOERS_GID=0 -DSUDOERS_MODE=0440 ./auth/kerb5.c
> libtool: compile: gcc -c -I../../include -I../.. -I. -I../.. -g -O2
> -D_GNU_SOURCE -D_PATH_SUDOERS=\"/usr/local/sudo/etc/sudoers\"
> -DSUDOERS_UID=0 -DSUDOERS_GID=0 -DSUDOERS_MODE=0440 ./auth/kerb5.c
> -fPIC -DPIC -o .libs/kerb5.o
> ./auth/kerb5.c:75: error: static declaration of
> 'krb5_get_init_creds_opt_alloc' follows non-static declaration
> /usr/include/krb5/krb5.h:2238: note: previous declaration of
> 'krb5_get_init_creds_opt_alloc' was here
> ./auth/kerb5.c:84: error: conflicting types for
> 'krb5_get_init_creds_opt_free'
> /usr/include/krb5/krb5.h:2242: note: previous declaration of
> 'krb5_get_init_creds_opt_free' was here
> make[1]: *** [kerb5.lo] Error 1
> make[1]: Leaving directory `/src/sudo/sudo-1.8.1p1/plugins/sudoers'
> make: *** [all] Error 2
The configure test for determining whether or not
krb5_get_init_creds_opt_alloc is present was not being run when
krb5-config was present. Below is a diff that should fix that.
- todd
--- configure.orig Fri Apr 15 14:41:59 2011
+++ configure Mon Apr 18 09:20:06 2011
@@ -17587,9 +17587,7 @@
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
-fi
-if test ${with_kerb5-'no'} != "no" -a -z "$KRB5CONFIG"; then
+ else
$as_echo "#define HAVE_KERB5 1" >>confdefs.h
if test "$with_kerb5" = "yes"; then
@@ -17729,6 +17727,7 @@
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
AUTH_OBJS="$AUTH_OBJS kerb5.lo"
+ fi
_LIBS="$LIBS"
LIBS="${LIBS} ${SUDOERS_LIBS}"
for ac_func in krb5_verify_user krb5_init_secure_context
--- configure.in.orig Fri Apr 15 14:41:51 2011
+++ configure.in Mon Apr 18 09:20:06 2011
@@ -2455,9 +2455,7 @@
AC_MSG_RESULT(no)
]
)
- fi
-fi
-if test ${with_kerb5-'no'} != "no" -a -z "$KRB5CONFIG"; then
+ else
AC_DEFINE(HAVE_KERB5)
dnl
dnl Use the specified directory, if any, else search for correct inc dir
@@ -2495,6 +2493,7 @@
AC_CHECK_LIB(krb5support, main, [SUDOERS_LIBS="${SUDOERS_LIBS} -lkrb5support"])
])
AUTH_OBJS="$AUTH_OBJS kerb5.lo"
+ fi
_LIBS="$LIBS"
LIBS="${LIBS} ${SUDOERS_LIBS}"
AC_CHECK_FUNCS(krb5_verify_user krb5_init_secure_context)
More information about the sudo-users
mailing list