more-aklog-fixes-20050618

Fixup aklog so it will compile (at least on MacOS X).  Include basic
autoconf glue.
This commit is contained in:
Ken Hornstein 2005-06-19 02:06:21 +00:00
parent c4c1156698
commit bcdb5a184e
9 changed files with 97 additions and 2 deletions

View File

@ -324,7 +324,15 @@ sgistuff: cmd comerr kauth rxkad
echo Skipping sgistuff for ${SYS_NAME} ;; \
esac
login: cmd comerr kauth rxkad pam sia tsm41 sgistuff
aklog: comerr ptserver
set -x; \
if test "@BUILD_KRB5@" = "yes"; then \
${COMPILE_PART1} aklog ${COMPILE_PART2} ; \
else \
echo Skipping aklog for ${SYS_NAME} ; \
fi
login: cmd comerr kauth rxkad pam sia tsm41 sgistuff aklog
set -x; \
if test "@BUILD_LOGIN@" = "yes"; then \
${COMPILE_PART1} login ${COMPILE_PART2} ; \
@ -630,6 +638,7 @@ clean2:
-${COMPILE_PART1} sgistuff ${COMPILE_CLEAN}
-${COMPILE_PART1} tsm41 ${COMPILE_CLEAN}
-${COMPILE_PART1} sia ${COMPILE_CLEAN}
-${COMPILE_PART1} aklog ${COMPILE_CLEAN}
-${COMPILE_PART1} login ${COMPILE_CLEAN}
-${COMPILE_PART1} pam ${COMPILE_CLEAN}
-${COMPILE_PART1} afsweb ${COMPILE_CLEAN}
@ -684,6 +693,7 @@ distclean: clean
src/afsd/afs.ppc_darwin.plist \
src/afsmonitor/Makefile \
src/afsweb/Makefile \
src/aklog/Makefile \
src/audit/Makefile \
src/auth/test/Makefile \
src/auth/Makefile \

View File

@ -1094,6 +1094,7 @@ AC_SUBST(DARWIN_INFOFILE)
AC_SUBST(IRIX_BUILD_IP35)
OPENAFS_OSCONF
OPENAFS_KRB5CONF
TOP_SRCDIR="${srcdir}/src"
dnl

View File

@ -11,6 +11,7 @@ src/afs/Makefile \
src/afsd/Makefile \
src/afsmonitor/Makefile \
src/afsweb/Makefile \
src/aklog/Makefile \
src/audit/Makefile \
src/auth/test/Makefile \
src/auth/Makefile \

View File

@ -9,6 +9,7 @@
static char *rcsid = "$Id$";
#endif /* lint || SABER */
#include <afs/stds.h>
#include "aklog.h"
#ifndef WINDOWS

View File

@ -15,6 +15,7 @@ static char *rcsid_aklog_h = "$Id$";
#include <krb5.h>
#include <kerberosIV/krb.h>
#include "linked_list.h"
#include <afsconfig.h>
#ifdef __STDC__
#define ARGS(x) x

View File

@ -1608,3 +1608,15 @@ void aklog(argc, argv, a_params)
params.exitprog(status);
}
#ifndef HAVE_ADD_TO_ERROR_TABLE
#include <afs/error_table.h>
void add_error_table (const struct error_table *);
void
add_to_error_table(struct et_list *new_table)
{
add_error_table(new_table->table);
}
#endif /* HAVE_ADD_TO_ERROR_TABLE */

View File

@ -9,6 +9,7 @@
static char *rcsid = "$Id$";
#endif /* lint || SABER */
#include <afs/stds.h>
#include "aklog.h"
#include <stdio.h>
#include <sys/types.h>
@ -107,7 +108,7 @@ static int get_cred(context, name, inst, realm, c, creds)
increds.client = client_principal;
increds.times.endtime = 0;
/* Ask for DES since that is what V4 understands */
/* increds.keyblock.enctype = ENCTYPE_DES_CBC_CRC; */
increds.keyblock.enctype = ENCTYPE_DES_CBC_CRC;
r = krb5_get_credentials(context, 0, _krb425_ccache, &increds, creds);
if (r)

View File

@ -17,6 +17,7 @@ static char rcsid_send_to_kdc_c[] =
#if 0
#include <kerberosIV/mit-copyright.h>
#endif
#include <afs/stds.h>
#include <krb5.h>
#include <kerberosIV/krb.h>

67
src/cf/kerberos.m4 Normal file
View File

@ -0,0 +1,67 @@
dnl
dnl $Id$
dnl
dnl Kerberos autoconf glue
dnl
AC_DEFUN([OPENAFS_KRB5CONF],[
AC_ARG_VAR(KRB5CFLAGS, [C flags to compile Kerberos 5 programs])
AC_ARG_VAR(KRB5LIBS, [Libraries and flags to compile Kerberos 5 programs])
AC_ARG_VAR(KRB5_CONFIG, [Location of krb5-config script])
AC_ARG_WITH([krb5-conf],
AC_HELP_STRING([--with-krb5-config[=krb5-config-location]],
[Use a krb5-config script to configure Kerberos]),
[if test X$withval != Xno; then
conf_krb5=YES
if test X$withval = Xyes; then
AC_PATH_PROG(KRB5_CONFIG, krb5-config, not_found)
if test X$KRB5_CONFIG = Xnot_found; then
AC_MSG_ERROR([cannot find krb5-config script, you must configure Kerberos manually])
fi
else
KRB5_CONFIG=$withval
fi
KRB5CFLAGS=`$KRB5_CONFIG --cflags krb5`
retval=$?
if test $retval -ne 0; then
AC_MSG_ERROR([$KRB5_CONFIG failed with an error code of $retval])
fi
KRB5LIBS=`$KRB5_CONFIG --libs krb5`
retval=$?
if test $retval -ne 0; then
AC_MSG_ERROR([$KRB5_CONFIG failed with an error code of $retval])
fi
AC_MSG_RESULT([Adding $KRB5CFLAGS to KRB5CFLAGS])
AC_MSG_RESULT([Adding $KRB5LIBS to KRB5LIBS])
fi])
AC_ARG_WITH([krb5],
AC_HELP_STRING([--with-krb5],
[Support for Kerberos 5 (manual configuration)]),
[if test X$conf_krb5 = XYES; then
AC_MSG_ERROR([--with-krb5-config and --with-krb5 are mutually exclusive, choose only one])
fi
if test "X$KRB5CFLAGS" = X; then
AC_MSG_WARN([KRB5CFLAGS is not set])
fi
if test "X$KRB5LIBS" = X; then
AC_MSG_WARN([KRB5LIBS is not set])
fi
conf_krb5=YES])
BUILD_KRB5=no
if test X$conf_krb5 = XYES; then
AC_MSG_RESULT([Configuring support for Kerberos 5 utilities])
BUILD_KRB5=yes
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS KRB5CFLAGS"
save_LIBS="$LIBS"
LIBS="$LIBS $KRB5LIBS"
AC_CHECK_FUNCS([add_to_error_table])
CFLAGS="$save_CFLAGS"
LIBS="$save_LIBS"
fi
AC_SUBST(BUILD_KRB5)
])dnl