svn rev #23907: branches/iakerb/src/ config/ include/krb5/ kdc/ lib/krb5/krb/ ...
ghudson@MIT.EDU
ghudson at MIT.EDU
Tue Apr 20 03:41:10 EDT 2010
http://src.mit.edu/fisheye/changelog/krb5/?cs=23907
Commit By: ghudson
Log Message:
Merge trunk changes from r23900 to r23906.
Changed Files:
U branches/iakerb/src/aclocal.m4
U branches/iakerb/src/config/post.in
U branches/iakerb/src/config/pre.in
U branches/iakerb/src/config/shlib.conf
U branches/iakerb/src/include/krb5/krb5.hin
U branches/iakerb/src/kdc/do_tgs_req.c
U branches/iakerb/src/lib/krb5/krb/get_creds.c
U branches/iakerb/src/lib/krb5/krb/get_in_tkt.c
U branches/iakerb/src/lib/krb5/krb/init_creds_ctx.h
U branches/iakerb/src/tests/dejagnu/Makefile.in
U branches/iakerb/src/util/k5test.py
Modified: branches/iakerb/src/aclocal.m4
===================================================================
--- branches/iakerb/src/aclocal.m4 2010-04-20 07:38:12 UTC (rev 23906)
+++ branches/iakerb/src/aclocal.m4 2010-04-20 07:41:09 UTC (rev 23907)
@@ -1131,7 +1131,9 @@
AC_DEFUN(KRB5_RUN_FLAGS,
[AC_REQUIRE([KRB5_LIB_AUX])dnl
KRB5_RUN_ENV="$RUN_ENV"
-AC_SUBST(KRB5_RUN_ENV)])
+KRB5_RUN_VARS="$RUN_VARS"
+AC_SUBST(KRB5_RUN_ENV)
+AC_SUBST(KRB5_RUN_VARS)])
dnl
dnl KRB5_LIB_AUX
Modified: branches/iakerb/src/config/post.in
===================================================================
--- branches/iakerb/src/config/post.in 2010-04-20 07:38:12 UTC (rev 23906)
+++ branches/iakerb/src/config/post.in 2010-04-20 07:41:09 UTC (rev 23907)
@@ -136,14 +136,12 @@
check-pytests:: check-pytests- at HAVE_PYTHON@
-check-pytests-yes:
+check-pytests-yes: runenv.py
@pytests="$(PYTESTS)"; \
for t in $$pytests; do \
- echo "$(KRB5_RUN_ENV)" \
- PYTHONPATH=$(top_srcdir)/util VALGRIND="$(VALGRIND)" \
+ echo PYTHONPATH=`pwd`:$(top_srcdir)/util VALGRIND="$(VALGRIND)" \
$(PYTHON) $(srcdir)/$$t $(PYTESTFLAGS); \
- $(KRB5_RUN_ENV) \
- PYTHONPATH=$(top_srcdir)/util VALGRIND="$(VALGRIND)" \
+ PYTHONPATH=`pwd`:$(top_srcdir)/util VALGRIND="$(VALGRIND)" \
$(PYTHON) $(srcdir)/$$t $(PYTESTFLAGS) || exit 1; \
done
@@ -152,11 +150,22 @@
echo "+++ Skipping because Python not available: $(PYTESTS)"; \
fi
+pyrunenv.vals: Makefile
+ $(KRB5_RUN_ENV) \
+ for i in $(KRB5_RUN_VARS); do \
+ eval echo 'env['\\\'$$i\\\''] = '\\\'\$$$$i\\\'; \
+ done > $@
+
+runenv.py: pyrunenv.vals
+ echo 'env = {}' > $@
+ cat pyrunenv.vals >> $@
+
clean:: clean-$(WHAT)
clean-unix::
$(RM) $(OBJS) $(DEPTARGETS_CLEAN) $(EXTRA_FILES) et-[ch]-*.et et-[ch]-*.[ch]
-$(RM) -r $(top_srcdir)/autom4te.cache
+ $(RM) runenv.py pyrunenv.vals
clean-windows::
$(RM) *.$(OBJEXT)
Modified: branches/iakerb/src/config/pre.in
===================================================================
--- branches/iakerb/src/config/pre.in 2010-04-20 07:38:12 UTC (rev 23906)
+++ branches/iakerb/src/config/pre.in 2010-04-20 07:41:09 UTC (rev 23907)
@@ -398,6 +398,7 @@
# So test programs can find their libraries without "make install", etc.
KRB5_RUN_ENV=@KRB5_RUN_ENV@
+KRB5_RUN_VARS=@KRB5_RUN_VARS@
#
# variables for --with-tcl=
Modified: branches/iakerb/src/config/shlib.conf
===================================================================
--- branches/iakerb/src/config/shlib.conf 2010-04-20 07:38:12 UTC (rev 23906)
+++ branches/iakerb/src/config/shlib.conf 2010-04-20 07:41:09 UTC (rev 23907)
@@ -98,6 +98,7 @@
# of searching for shared libs, since RPATHs take precedence over
# LD_LIBRARY_PATH.
RUN_ENV='LD_LIBRARY_PATH=`echo $(PROG_LIBPATH) | sed -e "s/-L//g" -e "s/ /:/g"`$${LD_LIBRARY_PATH+:$$LD_LIBRARY_PATH}; export LD_LIBRARY_PATH; _RLD_ROOT=$(FAKEDEST):$${_RLD_ROOT+$$_RLD_ROOT}$${_RLD_ROOT-/}; export _RLD_ROOT;'
+ RUN_VARS='LD_LIBRARY_PATH _RLD_ROOT'
;;
# HPUX *seems* to work under 10.20.
@@ -141,6 +142,7 @@
CXX_LINK_SHARED='$(CXX) $(PROG_LIBPATH) -Wl,+s $(PROG_RPATH_FLAGS) $(CXXFLAGS) $(LDFLAGS)'
CXX_LINK_STATIC='$(CXX) $(PROG_LIBPATH) $(CXXFLAGS) $(LDFLAGS)'
RUN_ENV='SHLIB_PATH=`echo $(PROG_LIBPATH) | sed -e "s/-L//g" -e "s/ /:/g"`; export SHLIB_PATH;'
+ RUN_VARS='SHLIB_PATH'
SHLIB_EXPORT_FILE_DEP=hpux10.exports
# Do *not* set use_linker_init_option=yes here, because in the
# case where the library is specified at program link time, the
@@ -188,6 +190,7 @@
for i in N32 64 ''; do
RUN_ENV="${RUN_ENV+ $RUN_ENV}LD_LIBRARY${i}_PATH=$add\$\${LD_LIBRARY${i}_PATH+:\$\$LD_LIBRARY${i}_PATH}; export LD_LIBRARY${i}_PATH;"
RUN_ENV="${RUN_ENV} _RLD${i}_ROOT=\$(FAKEDEST):\$\${_RLD${i}_ROOT+\$\${_RLD${i}_ROOT}}\$\${_RLD${i}_ROOT-/}; export _RLD${i}_ROOT;"
+ RUN_VARS="$RUN_VARS LD_LIBRARY${i}_PATH _RLD${i}_ROOT"
done
;;
@@ -236,6 +239,7 @@
for i in N32 64 ''; do
RUN_ENV="${RUN_ENV+ $RUN_ENV}LD_LIBRARY${i}_PATH=$add\$\${LD_LIBRARY${i}_PATH+:\$\$LD_LIBRARY${i}_PATH}; export LD_LIBRARY${i}_PATH;"
RUN_ENV="${RUN_ENV} _RLD${i}_ROOT=\$(FAKEDEST):\$\${_RLD${i}_ROOT+\$\${_RLD${i}_ROOT}}\$\${_RLD${i}_ROOT-/}; export _RLD${i}_ROOT;"
+ RUN_VARS="$RUN_VARS LD_LIBRARY${i}_PATH _RLD${i}_ROOT"
done
;;
@@ -260,6 +264,7 @@
CXX_LINK_SHARED='$(CXX) $(PROG_LIBPATH) $(PROG_RPATH_FLAGS) $(CXXFLAGS) $(LDFLAGS)'
CXX_LINK_STATIC='$(CXX) $(PROG_LIBPATH) $(CXXFLAGS) $(LDFLAGS)'
RUN_ENV='LD_LIBRARY_PATH=`echo $(PROG_LIBPATH) | sed -e "s/-L//g" -e "s/ /:/g"`; export LD_LIBRARY_PATH;'
+ RUN_VARS='LD_LIBRARY_PATH'
PROFFLAGS=-pg
;;
@@ -278,6 +283,7 @@
CXX_LINK_SHARED='$(CXX) $(PROG_LIBPATH) $(PROG_RPATH_FLAGS) $(CXXFLAGS) $(LDFLAGS)'
CXX_LINK_STATIC='$(CXX) $(PROG_LIBPATH) $(CXXFLAGS) $(LDFLAGS)'
RUN_ENV='LD_LIBRARY_PATH=`echo $(PROG_LIBPATH) | sed -e "s/-L//g" -e "s/ /:/g"`; export LD_LIBRARY_PATH;'
+ RUN_VARS='LD_LIBRARY_PATH'
PROFFLAGS=-pg
;;
@@ -295,6 +301,7 @@
CXX_LINK_SHARED='$(CXX) $(PROG_LIBPATH) $(PROG_RPATH_FLAGS) $(CXXFLAGS) $(LDFLAGS)'
CXX_LINK_STATIC='$(CXX) $(PROG_LIBPATH) $(CXXFLAGS) $(LDFLAGS)'
RUN_ENV='LD_LIBRARY_PATH=`echo $(PROG_LIBPATH) | sed -e "s/-L//g" -e "s/ /:/g"`; export LD_LIBRARY_PATH;'
+ RUN_VARS='LD_LIBRARY_PATH'
PROFFLAGS=-pg
;;
@@ -322,6 +329,7 @@
CC_LINK_STATIC='$(CC) $(PROG_LIBPATH) $(CFLAGS) $(LDFLAGS)'
CXX_LINK_STATIC='$(CXX) $(PROG_LIBPATH) $(CXXFLAGS) $(LDFLAGS)'
RUN_ENV='LD_LIBRARY_PATH=`echo $(PROG_LIBPATH) | sed -e "s/-L//g" -e "s/ /:/g"`; export LD_LIBRARY_PATH;'
+ RUN_VARS='LD_LIBRARY_PATH'
PROFFLAGS=-pg
;;
@@ -339,6 +347,7 @@
CXX_LINK_SHARED='$(CXX) $(PROG_LIBPATH) $(PROG_RPATH_FLAGS) $(CXXFLAGS) $(LDFLAGS)'
CXX_LINK_STATIC='$(CXX) $(PROG_LIBPATH) $(CXXFLAGS) $(LDFLAGS)'
RUN_ENV='LD_LIBRARY_PATH=`echo $(PROG_LIBPATH) | sed -e "s/-L//g" -e "s/ /:/g"`; export LD_LIBRARY_PATH;'
+ RUN_VARS='LD_LIBRARY_PATH'
PROFFLAGS=-pg
;;
@@ -364,6 +373,7 @@
CXX_LINK_SHARED='$(CXX) $(PROG_LIBPATH) -dynamic $(CXXFLAGS) $(LDFLAGS)'
CXX_LINK_STATIC='$(CXX) $(PROG_LIBPATH) $(CXXFLAGS) $(LDFLAGS)'
RUN_ENV='DYLD_LIBRARY_PATH=`echo $(PROG_LIBPATH) | sed -e "s/-L//g" -e "s/ /:/g"`; export DYLD_LIBRARY_PATH;'
+ RUN_VARS='DYLD_LIBRARY_PATH'
;;
*-*-solaris*)
@@ -399,6 +409,7 @@
CXX_LINK_SHARED='$(PURE) $(CXX) $(PROG_LIBPATH) $(PROG_RPATH_FLAGS) $(CXXFLAGS) $(LDFLAGS)'
CXX_LINK_STATIC='$(PURE) $(CXX) $(PROG_LIBPATH) $(CXXFLAGS) $(LDFLAGS)'
RUN_ENV='LD_LIBRARY_PATH=`echo $(PROG_LIBPATH) | sed -e "s/-L//g" -e "s/ /:/g"`; export LD_LIBRARY_PATH;'
+ RUN_VARS='LD_LIBRARY_PATH'
;;
*-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu)
@@ -424,6 +435,7 @@
CXX_LINK_SHARED='$(CXX) $(PROG_LIBPATH) $(PROG_RPATH_FLAGS) $(CXXFLAGS) $(LDFLAGS)'
CXX_LINK_STATIC='$(CXX) $(PROG_LIBPATH) $(CXXFLAGS) $(LDFLAGS)'
RUN_ENV='LD_LIBRARY_PATH=`echo $(PROG_LIBPATH) | sed -e "s/-L//g" -e "s/ /:/g"`; export LD_LIBRARY_PATH; '
+ RUN_VARS='LD_LIBRARY_PATH'
## old version:
# Linux libc does weird stuff at shlib link time, must be
@@ -451,6 +463,7 @@
CXX_LINK_STATIC='$(CXX) $(PROG_LIBPATH)'
RUN_ENV='LD_LIBRARY_PATH=`echo $(PROG_LIBPATH) | sed -e "s/-L//g" -e "s/
/:/g"`; export LD_LIBRARY_PATH;'
+ RUN_VARS='LD_LIBRARY_PATH'
PROFFLAGS=-pg
;;
@@ -482,6 +495,7 @@
CXX_LINK_STATIC='$(CXX) $(PROG_LIBPATH) $(CXXFLAGS) $(LDFLAGS)'
# $(PROG_RPATH) is here to handle things like a shared tcl library
RUN_ENV='LIBPATH=`echo $(PROG_LIBPATH) | sed -e "s/-L//g" -e "s/ /:/g"`:$(PROG_RPATH):/usr/lib:/usr/local/lib; export LIBPATH; '
+ RUN_VARS='LIBPATH'
;;
*-*-aix4.*)
@@ -519,6 +533,7 @@
CXX_LINK_STATIC='$(CXX) $(PROG_LIBPATH) $(CXXFLAGS) $(LDFLAGS)'
# $(PROG_RPATH) is here to handle things like a shared tcl library
RUN_ENV='LIBPATH=`echo $(PROG_LIBPATH) | sed -e "s/-L//g" -e "s/ /:/g"`:$(PROG_RPATH):/usr/lib:/usr/local/lib; export LIBPATH; '
+ RUN_VARS='LIBPATH'
;;
esac
Modified: branches/iakerb/src/include/krb5/krb5.hin
===================================================================
--- branches/iakerb/src/include/krb5/krb5.hin 2010-04-20 07:38:12 UTC (rev 23906)
+++ branches/iakerb/src/include/krb5/krb5.hin 2010-04-20 07:41:09 UTC (rev 23907)
@@ -2371,6 +2371,8 @@
struct _krb5_init_creds_context;
typedef struct _krb5_init_creds_context *krb5_init_creds_context;
+#define KRB5_INIT_CREDS_STEP_FLAG_CONTINUE 0x1 /* More responses needed */
+
void KRB5_CALLCONV
krb5_init_creds_free(krb5_context context, krb5_init_creds_context ctx);
@@ -2475,16 +2477,16 @@
void KRB5_CALLCONV
krb5_tkt_creds_free(krb5_context context, krb5_tkt_creds_context ctx);
-#define KRB5_TKT_CREDS_CONTINUE 1 /* Another KDC response is needed. */
+#define KRB5_TKT_CREDS_STEP_FLAG_CONTINUE 0x1 /* More responses needed. */
/**
* Process a response and generate the next request to acquire credentials.
*
* On the first call, @a in should be empty or NULL. If more responses are
* needed, the @a flags output parameter will contain @a
- * KRB5_TKT_CREDS_CONTINUE. In this case, the caller must transport @a out to
- * a KDC for @a realm and receive a response, which should be provided as @a
- * in to the next call.
+ * KRB5_TKT_CREDS_STEP_FLAG_CONTINUE. In that case, the caller must transport
+ * @a out to a KDC for @a realm and receive a response, which should be
+ * provided as @a in to the next call.
*
* @param[in] context A krb5 library context (see krb5_init_context())
* @param[in] ctx A TGS acquisition context (see krb5_tkt_creds_init())
Modified: branches/iakerb/src/kdc/do_tgs_req.c
===================================================================
--- branches/iakerb/src/kdc/do_tgs_req.c 2010-04-20 07:38:12 UTC (rev 23906)
+++ branches/iakerb/src/kdc/do_tgs_req.c 2010-04-20 07:41:09 UTC (rev 23907)
@@ -543,6 +543,7 @@
to the caller */
ticket_reply = *(header_ticket);
enc_tkt_reply = *(header_ticket->enc_part2);
+ enc_tkt_reply.authorization_data = NULL;
clear(enc_tkt_reply.flags, TKT_FLG_INVALID);
}
@@ -554,6 +555,7 @@
to the caller */
ticket_reply = *(header_ticket);
enc_tkt_reply = *(header_ticket->enc_part2);
+ enc_tkt_reply.authorization_data = NULL;
old_life = enc_tkt_reply.times.endtime - enc_tkt_reply.times.starttime;
Modified: branches/iakerb/src/lib/krb5/krb/get_creds.c
===================================================================
--- branches/iakerb/src/lib/krb5/krb/get_creds.c 2010-04-20 07:38:12 UTC (rev 23906)
+++ branches/iakerb/src/lib/krb5/krb/get_creds.c 2010-04-20 07:41:09 UTC (rev 23907)
@@ -221,7 +221,7 @@
*ctx->caller_out = out_copy;
*ctx->caller_realm = realm_copy;
- *ctx->caller_flags = KRB5_TKT_CREDS_CONTINUE;
+ *ctx->caller_flags = KRB5_TKT_CREDS_STEP_FLAG_CONTINUE;
return 0;
cleanup:
@@ -1140,7 +1140,7 @@
&flags);
if (code == KRB5KRB_ERR_RESPONSE_TOO_BIG && !tcp_only)
tcp_only = 1;
- else if (code != 0 || !(flags & KRB5_TKT_CREDS_CONTINUE))
+ else if (code != 0 || !(flags & KRB5_TKT_CREDS_STEP_FLAG_CONTINUE))
break;
krb5_free_data_contents(context, &reply);
Modified: branches/iakerb/src/lib/krb5/krb/get_in_tkt.c
===================================================================
--- branches/iakerb/src/lib/krb5/krb/get_in_tkt.c 2010-04-20 07:38:12 UTC (rev 23906)
+++ branches/iakerb/src/lib/krb5/krb/get_in_tkt.c 2010-04-20 07:41:09 UTC (rev 23907)
@@ -1083,7 +1083,7 @@
&flags);
if (code == KRB5KRB_ERR_RESPONSE_TOO_BIG && !tcp_only)
tcp_only = 1;
- else if (code != 0 || (flags & 1) == 0)
+ else if (code != 0 || !(flags & KRB5_INIT_CREDS_STEP_FLAG_CONTINUE))
break;
krb5_free_data_contents(context, &reply);
@@ -1119,7 +1119,7 @@
krb5_init_creds_context ctx,
krb5_creds *creds)
{
- if ((ctx->flags & KRB5_INIT_CREDS_STEP_FLAG_COMPLETE) == 0)
+ if (!ctx->complete)
return KRB5_NO_TKT_SUPPLIED;
return krb5int_copy_creds_contents(context, &ctx->cred, creds);
@@ -1130,7 +1130,7 @@
krb5_init_creds_context ctx,
krb5_ticket_times *times)
{
- if ((ctx->flags & KRB5_INIT_CREDS_STEP_FLAG_COMPLETE) == 0)
+ if (!ctx->complete)
return KRB5_NO_TKT_SUPPLIED;
*times = ctx->cred.times;
@@ -1979,7 +1979,7 @@
/* success */
code = 0;
- ctx->flags |= KRB5_INIT_CREDS_STEP_FLAG_COMPLETE;
+ ctx->complete = TRUE;
cleanup:
krb5_free_pa_data(context, padata);
@@ -2014,8 +2014,8 @@
realm->data = NULL;
realm->length = 0;
- if (ctx->flags & KRB5_INIT_CREDS_STEP_FLAG_COMPLETE)
- goto cleanup;
+ if (ctx->complete)
+ return EINVAL;
if (in->length != 0) {
code = init_creds_step_reply(context, ctx, in);
@@ -2029,7 +2029,7 @@
}
goto copy_realm;
}
- if (code != 0 || (ctx->flags & KRB5_INIT_CREDS_STEP_FLAG_COMPLETE))
+ if (code != 0 || ctx->complete)
goto cleanup;
}
@@ -2065,8 +2065,7 @@
}
}
- *flags = (ctx->flags & KRB5_INIT_CREDS_STEP_FLAG_COMPLETE) ? 0 : 1;
-
+ *flags = ctx->complete ? 0 : KRB5_INIT_CREDS_STEP_FLAG_CONTINUE;
return code;
}
Modified: branches/iakerb/src/lib/krb5/krb/init_creds_ctx.h
===================================================================
--- branches/iakerb/src/lib/krb5/krb/init_creds_ctx.h 2010-04-20 07:38:12 UTC (rev 23906)
+++ branches/iakerb/src/lib/krb5/krb/init_creds_ctx.h 2010-04-20 07:41:09 UTC (rev 23907)
@@ -14,7 +14,7 @@
krb5_deltat start_time;
krb5_deltat tkt_life;
krb5_deltat renew_life;
- unsigned int flags;
+ krb5_boolean complete;
unsigned int loopcount;
krb5_data password;
krb5_error *err_reply;
@@ -35,8 +35,6 @@
krb5_boolean sent_nontrivial_preauth;
};
-#define KRB5_INIT_CREDS_STEP_FLAG_COMPLETE 0x1
-
krb5_error_code
krb5_get_as_key_password(krb5_context context,
krb5_principal client,
Modified: branches/iakerb/src/tests/dejagnu/Makefile.in
===================================================================
--- branches/iakerb/src/tests/dejagnu/Makefile.in 2010-04-20 07:38:12 UTC (rev 23906)
+++ branches/iakerb/src/tests/dejagnu/Makefile.in 2010-04-20 07:41:09 UTC (rev 23907)
@@ -33,12 +33,8 @@
clean-unix::
$(RM) -rf tmpdir dbg.log krb.log krb.sum
-runenv.vars: Makefile
- echo '$(KRB5_RUN_ENV)' | tr ';' '\012' | \
- sed -ne 's% *\([^=]*\)=.*%\1%p' > runenv.vars
-
-runenv.vals: runenv.vars
- $(KRB5_RUN_ENV) for i in `cat runenv.vars`; do \
+runenv.vals: Makefile
+ $(KRB5_RUN_ENV) for i in $(KRB5_RUN_VARS); do \
eval echo "{$$i=\$$$$i}"; done > runenv.vals
site.exp: runenv.vals Makefile
Modified: branches/iakerb/src/util/k5test.py
===================================================================
--- branches/iakerb/src/util/k5test.py 2010-04-20 07:38:12 UTC (rev 23906)
+++ branches/iakerb/src/util/k5test.py 2010-04-20 07:41:09 UTC (rev 23907)
@@ -304,6 +304,11 @@
import subprocess
import sys
+# runenv.py is built in each directory where tests are run, providing
+# the environment variable settings needed for running programs in the
+# build tree. These can vary by platform.
+import runenv
+
# Used when most things go wrong (other than programming errors) so
# that the user sees an error message rather than a Python traceback,
# without help from the test script. The on-exit handler will display
@@ -462,17 +467,8 @@
# Return an environment suitable for running programs in the build
# tree. It is safe to modify the result.
def _build_env():
- libdir = os.path.join(buildtop, 'lib')
- env = os.environ.copy()
- ldlpath = env.get('LD_LIBRARY_PATH')
- if ldlpath:
- ldlpath = libdir + os.pathsep + ldlpath
- else:
- ldlpath = libdir
- env['LD_LIBRARY_PATH'] = ldlpath
- return env
+ return dict(runenv.env)
-
# Merge the nested dictionaries cfg1 and cfg2 into a new dictionary.
# cfg1 or cfg2 may be None, in which case the other is returned. If
# cfg2 contains keys mapped to None, the corresponding keys will be
More information about the cvs-krb5
mailing list