unconditionally set KRBTKFILE
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@12434 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 1995 - 2002 Kungliga Tekniska H<>gskolan
|
* Copyright (c) 1995 - 2003 Kungliga Tekniska H<>gskolan
|
||||||
* (Royal Institute of Technology, Stockholm, Sweden).
|
* (Royal Institute of Technology, Stockholm, Sweden).
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
@@ -64,6 +64,10 @@ RCSID("$Id$");
|
|||||||
#include <roken.h>
|
#include <roken.h>
|
||||||
#include <getarg.h>
|
#include <getarg.h>
|
||||||
|
|
||||||
|
#ifndef TKT_ROOT
|
||||||
|
#define TKT_ROOT "/tmp/tkt"
|
||||||
|
#endif
|
||||||
|
|
||||||
static int help_flag;
|
static int help_flag;
|
||||||
static int version_flag;
|
static int version_flag;
|
||||||
static int c_flag;
|
static int c_flag;
|
||||||
@@ -113,20 +117,22 @@ main(int argc, char **argv)
|
|||||||
argv += optind;
|
argv += optind;
|
||||||
|
|
||||||
#ifdef KRB5
|
#ifdef KRB5
|
||||||
snprintf (tf, sizeof(tf), "%sXXXXXX", KRB5_DEFAULT_CCROOT);
|
snprintf (tf, sizeof(tf), "%sXXXXXXXXXX", KRB5_DEFAULT_CCROOT);
|
||||||
f = mkstemp (tf + 5);
|
f = mkstemp (tf + 5);
|
||||||
|
if (f < 0)
|
||||||
|
err(1, "mkstemp failed");
|
||||||
close (f);
|
close (f);
|
||||||
unlink (tf + 5);
|
unlink (tf + 5);
|
||||||
esetenv("KRB5CCNAME", tf, 1);
|
esetenv("KRB5CCNAME", tf, 1);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef KRB4
|
snprintf (tf, sizeof(tf), "%s_XXXXXXXXXX", TKT_ROOT);
|
||||||
snprintf (tf, sizeof(tf), "%s_XXXXXX", TKT_ROOT);
|
|
||||||
f = mkstemp (tf);
|
f = mkstemp (tf);
|
||||||
|
if (f < 0)
|
||||||
|
err(1, "mkstemp failed");
|
||||||
close (f);
|
close (f);
|
||||||
unlink (tf);
|
unlink (tf);
|
||||||
esetenv("KRBTKFILE", tf, 1);
|
esetenv("KRBTKFILE", tf, 1);
|
||||||
#endif
|
|
||||||
|
|
||||||
i = 0;
|
i = 0;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user