do afslog in the krb5 case too
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@12230 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 1995, 1996, 1997, 1998 Kungliga Tekniska H<>gskolan
|
* Copyright (c) 1995 - 1999, 2003 Kungliga Tekniska H<>gskolan
|
||||||
* (Royal Institute of Technology, Stockholm, Sweden).
|
* (Royal Institute of Technology, Stockholm, Sweden).
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
@@ -35,6 +35,8 @@
|
|||||||
|
|
||||||
RCSID("$Id$");
|
RCSID("$Id$");
|
||||||
|
|
||||||
|
#ifdef KRB4
|
||||||
|
|
||||||
static KTEXT_ST cip;
|
static KTEXT_ST cip;
|
||||||
static unsigned int lifetime;
|
static unsigned int lifetime;
|
||||||
static time_t local_time;
|
static time_t local_time;
|
||||||
@@ -346,11 +348,34 @@ krbtkfile(const char *tkfile)
|
|||||||
reply(200, "Using ticket file %s", tkfile);
|
reply(200, "Using ticket file %s", tkfile);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif /* KRB4 */
|
||||||
|
|
||||||
|
#if defined(KRB4) || defined(KRB5)
|
||||||
|
|
||||||
void
|
void
|
||||||
afslog(const char *cell)
|
afslog(const char *cell)
|
||||||
{
|
{
|
||||||
if(k_hasafs()) {
|
if(k_hasafs()) {
|
||||||
|
#ifdef KRB5
|
||||||
|
krb5_context context;
|
||||||
|
krb5_error_code ret;
|
||||||
|
krb5_ccache id;
|
||||||
|
|
||||||
|
ret = krb5_init_context(&context);
|
||||||
|
if (ret == 0) {
|
||||||
|
ret = krb5_cc_default(context, &id);
|
||||||
|
if (ret)
|
||||||
|
krb5_free_context(context);
|
||||||
|
}
|
||||||
|
if (ret == 0) {
|
||||||
|
krb5_afslog(context, id, cell, 0);
|
||||||
|
krb5_cc_close (context, id);
|
||||||
|
krb5_free_context (context);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#ifdef KRB4
|
||||||
krb_afslog(cell, 0);
|
krb_afslog(cell, 0);
|
||||||
|
#endif
|
||||||
reply(200, "afslog done");
|
reply(200, "afslog done");
|
||||||
} else {
|
} else {
|
||||||
reply(200, "no AFS present");
|
reply(200, "no AFS present");
|
||||||
@@ -363,3 +388,7 @@ afsunlog(void)
|
|||||||
if(k_hasafs())
|
if(k_hasafs())
|
||||||
k_unlog();
|
k_unlog();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#else
|
||||||
|
int ftpd_afslog_placeholder;
|
||||||
|
#endif /* KRB4 || KRB5 */
|
||||||
|
Reference in New Issue
Block a user