From: Sam Hartman Date: Fri, 27 Aug 2004 19:12:13 +0000 (+0000) Subject: Patch from Garry Zacheiss to use krb5_get_init_creds_password in ftpd X-Git-Tag: krb5-1.4-beta1~124 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=c226f8300720e781dd43bebe5afadf8f9b66d28b;p=krb5.git Patch from Garry Zacheiss to use krb5_get_init_creds_password in ftpd not krb5_get_in_tkt_password in order to avoid the prompter being called. Ticket: 2682 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16688 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/appl/gssftp/ftpd/ChangeLog b/src/appl/gssftp/ftpd/ChangeLog index f0701624a..1112b3fd0 100644 --- a/src/appl/gssftp/ftpd/ChangeLog +++ b/src/appl/gssftp/ftpd/ChangeLog @@ -1,3 +1,9 @@ +2004-08-27 Sam Hartman + + * ftpd.c (passwd;): Patch from Garry Zacheiss to use + krb5_get_init_creds_password instead of krb5_get_in_tkt since + get_in_tkt is obselete + 2004-08-08 Ken Raeburn * ftpd.c (main): Use socklen_t for the size of the address from diff --git a/src/appl/gssftp/ftpd/ftpd.c b/src/appl/gssftp/ftpd/ftpd.c index b3359ae65..eabc74fbb 100644 --- a/src/appl/gssftp/ftpd/ftpd.c +++ b/src/appl/gssftp/ftpd/ftpd.c @@ -963,12 +963,12 @@ char *name, *passwd; my_creds.times.endtime = now + 60 * 60 * 10; my_creds.times.renew_till = 0; - if (krb5_get_in_tkt_with_password(kcontext, 0, - 0, NULL, 0 /*preauth*/, - passwd, - ccache, - &my_creds, 0)) - goto nuke_ccache; + if (krb5_get_init_creds_password(kcontext, &my_creds, me, + passwd, NULL, NULL, 0, NULL, NULL)) + goto nuke_ccache; + + if (krb5_cc_store_cred(kcontext, ccache, &my_creds)) + goto nuke_ccache; if (!want_creds) { krb5_cc_destroy(kcontext, ccache);