[krb5-auth-dialog] No need to fill opts when we're not using them



commit 4743967cb6b3655250b121461812e95934912350
Author: Guido Günther <agx sigxcpu org>
Date:   Fri Jun 18 19:42:46 2010 +0200

    No need to fill opts when we're not using them
    
    so ka_set_ticket_options can go too.

 src/ka-dialog.c |   44 --------------------------------------------
 1 files changed, 0 insertions(+), 44 deletions(-)
---
diff --git a/src/ka-dialog.c b/src/ka-dialog.c
index 468b185..869d8fa 100644
--- a/src/ka-dialog.c
+++ b/src/ka-dialog.c
@@ -561,46 +561,6 @@ ka_set_ticket_options(KaApplet* applet, krb5_context context,
 }
 
 
-/*
- * set ticket options
- * by looking at krb5.conf, the passed in creds and gconf
- */
-static void
-set_options_from_creds(const KaApplet* applet,
-		       krb5_context context,
-		       krb5_creds *in,
-		       krb5_get_init_creds_opt *out)
-{
-	krb5_deltat renew_lifetime;
-	int flag;
-
-#ifdef HAVE_KRB5_GET_INIT_CREDS_OPT_SET_DEFAULT_FLAGS
-	krb5_get_init_creds_opt_set_default_flags(context, PACKAGE,
-		krb5_principal_get_realm(context, kprincipal), out);
-#endif
-
-	flag = get_cred_forwardable(in) != 0;
-	krb5_get_init_creds_opt_set_forwardable(out, flag);
-	flag = get_cred_proxiable(in) != 0;
-	krb5_get_init_creds_opt_set_proxiable(out, flag);
-	flag = get_cred_renewable(in) != 0;
-	if (flag && (in->times.renew_till > in->times.starttime)) {
-		renew_lifetime = in->times.renew_till -
-				 in->times.starttime;
-		krb5_get_init_creds_opt_set_renew_life(out,
-						       renew_lifetime);
-	}
-	if (in->times.endtime >
-	    in->times.starttime + ka_applet_get_pw_prompt_secs(applet)) {
-		krb5_get_init_creds_opt_set_tkt_life(out,
-						     in->times.endtime -
-						     in->times.starttime);
-	}
-	/* This doesn't do a deep copy -- fix it later. */
-	/* krb5_get_init_creds_opt_set_address_list(out, creds->addresses); */
-}
-
-
 #if ENABLE_PKINIT && HAVE_KRB5_GET_INIT_CREDS_OPT_SET_PKINIT
 static krb5_error_code
 ka_auth_heimdal_pkinit(KaApplet* applet, krb5_creds* creds,
@@ -845,7 +805,6 @@ ka_renew_credentials (KaApplet* applet)
 	krb5_error_code retval;
 	krb5_creds my_creds;
 	krb5_ccache ccache;
-	krb5_get_init_creds_opt opts;
 
 	if (kprincipal == NULL) {
 		retval = ka_parse_name(applet, kcontext, &kprincipal);
@@ -864,9 +823,6 @@ ka_renew_credentials (KaApplet* applet)
 		return -1;
 	}
 
-	krb5_get_init_creds_opt_init (&opts);
-	set_options_from_creds (applet, kcontext, &my_creds, &opts);
-
 	if (ka_applet_get_tgt_renewable(applet)) {
 		krb5_free_cred_contents (kcontext, &my_creds);
 		retval = get_renewed_creds (kcontext, &my_creds, kprincipal, ccache, NULL);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]