Patch from Garry Zacheiss to use krb5_get_init_creds_password in ftpd
authorSam Hartman <hartmans@mit.edu>
Fri, 27 Aug 2004 19:12:13 +0000 (19:12 +0000)
committerSam Hartman <hartmans@mit.edu>
Fri, 27 Aug 2004 19:12:13 +0000 (19:12 +0000)
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

src/appl/gssftp/ftpd/ChangeLog
src/appl/gssftp/ftpd/ftpd.c

index f0701624a46c2527da940dc5fdd476c8148f9d10..1112b3fd0a4b20bb354dc8388246c156231caa03 100644 (file)
@@ -1,3 +1,9 @@
+2004-08-27  Sam Hartman  <hartmans@mit.edu>
+
+       * 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  <raeburn@mit.edu>
 
        * ftpd.c (main): Use socklen_t for the size of the address from
index b3359ae655d8ebcc38aa7e7f2fa91a0eacaa85f3..eabc74fbb83ee7f78e6496064794a2f9f7415595 100644 (file)
@@ -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);