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

Re: To Forward or Not To Forward [PATCH for Telnet]



Johan Danielsson wrote:
> 
> Thomas Nyström <thn@saeab.se> writes:
> 
> Seems reasonable. I suppose the encrypt case should also change?
> 

Ah... Yes of course, I missed that.....

/thn

> /Johan
> 
> --- main.c      2004/03/22 18:07:17     1.39
> +++ main.c      2004/04/02 06:36:04
> @@ -112,7 +112,6 @@
>  }
> 
>  #ifdef KRB5
> -/* XXX ugly hack to setup dns-proxy stuff */
>  #define Authenticator asn1_Authenticator
>  #include <krb5.h>
>  static void
> @@ -120,24 +119,29 @@
>  {
>      krb5_context context;
>      krb5_error_code ret;
> +    krb5_boolean ret_val;
> 
>      ret = krb5_init_context(&context);
>      if (ret)
>         return;
> 
> -#if defined(AUTHENTICATION) && defined(KRB5) && defined(FORWARD)
> -    if (krb5_config_get_bool (context, NULL,
> -         "libdefaults", "forward", NULL)) {
> +#if defined(AUTHENTICATION) && defined(FORWARD)
> +    krb5_appdefault_boolean(context, NULL,
> +                           NULL, "forward",
> +                           0, &ret_val);
> +    if (ret_val)
>             kerberos5_set_forward(1);
> -    }
> -    if (krb5_config_get_bool (context, NULL,
> -         "libdefaults", "forwardable", NULL)) {
> +    krb5_appdefault_boolean(context, NULL,
> +                           NULL, "forwardable",
> +                           0, &ret_val);
> +    if (ret_val)
>             kerberos5_set_forwardable(1);
> -    }
>  #endif
>  #ifdef  ENCRYPTION
> -    if (krb5_config_get_bool (context, NULL,
> -        "libdefaults", "encrypt", NULL)) {
> +    krb5_appdefault_boolean(context, NULL,
> +                           NULL, "encrypt",
> +                           0, &ret_val);
> +    if (ret_val) {
>            encrypt_auto(1);
>            decrypt_auto(1);
>           wantencryption = 1;

-- 
---------------------------------------------------------------
Svensk Aktuell Elektronik AB                     Thomas Nyström
Box 10                                    Phone: +46 8 35 92 85
S-191 21  Sollentuna                        Fax: +46 8 35 92 86
Sweden                                      Email: thn@saeab.se
---------------------------------------------------------------