2009-07-08 19:41:43 +02:00
|
|
|
Index: src/slave/kprop.c
|
|
|
|
===================================================================
|
|
|
|
--- src/slave/kprop.c.orig
|
|
|
|
+++ src/slave/kprop.c
|
2010-03-23 12:40:55 +01:00
|
|
|
@@ -206,6 +206,7 @@ void get_tickets(context)
|
|
|
|
krb5_error_code retval;
|
|
|
|
static char tkstring[] = "/tmp/kproptktXXXXXX";
|
|
|
|
krb5_keytab keytab = NULL;
|
|
|
|
+ int ret = 0;
|
2009-07-08 19:41:43 +02:00
|
|
|
|
2010-03-23 12:40:55 +01:00
|
|
|
/*
|
|
|
|
* Figure out what tickets we'll be using to send stuff
|
|
|
|
@@ -231,7 +232,15 @@ void get_tickets(context)
|
|
|
|
/*
|
|
|
|
* Initialize cache file which we're going to be using
|
|
|
|
*/
|
2009-07-08 19:41:43 +02:00
|
|
|
+#ifdef HAVE_MKSTEMP
|
|
|
|
+ ret = mkstemp(tkstring);
|
|
|
|
+ if (ret == -1) {
|
|
|
|
+ com_err(progname, errno, "while initialize cache file");
|
|
|
|
+ exit(1);
|
|
|
|
+ } else close(ret);
|
|
|
|
+#else
|
2010-03-23 12:40:55 +01:00
|
|
|
(void) mktemp(tkstring);
|
2009-07-08 19:41:43 +02:00
|
|
|
+#endif
|
2010-03-23 12:40:55 +01:00
|
|
|
snprintf(buf, sizeof(buf), "FILE:%s", tkstring);
|
2009-07-08 19:41:43 +02:00
|
|
|
|
2010-03-23 12:40:55 +01:00
|
|
|
retval = krb5_cc_resolve(context, buf, &ccache);
|