]> andersk Git - openssh.git/commitdiff
- (djm) [auth-krb5.c auth.h session.c] Explicitly refer to Kerberos ccache
authordjm <djm>
Fri, 16 Apr 2004 12:47:55 +0000 (12:47 +0000)
committerdjm <djm>
Fri, 16 Apr 2004 12:47:55 +0000 (12:47 +0000)
   file using FILE: method, fixes problems on Mac OSX.
   Patch from simon@sxw.org.uk; ok dtucker@

ChangeLog
auth-krb5.c
auth.h
session.c

index 40477ba3452fb56dacb436ca7afc30a7d4d06f7a..05a28e6a5fa7f5a5a1d8b9f90146e12d18f8e9ab 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,9 @@
 20040416
  - (dtucker) [regress/sftp-cmds.sh] Skip quoting test on Cygwin, since
    FAT/NTFS does not permit quotes in filenames.  From vinschen at redhat.com
+ - (djm) [auth-krb5.c auth.h session.c] Explicitly refer to Kerberos ccache 
+   file using FILE: method, fixes problems on Mac OSX.
+   Patch from simon@sxw.org.uk; ok dtucker@
 
 20040412
  - (dtucker) [sshd_config.5] Add PermitRootLogin without-password warning
index baa1a631751330bd387def494ce8e746ed7fd442..a728ebac11042735dc259ac40a25073b45459332 100644 (file)
@@ -72,6 +72,7 @@ auth_krb5_password(Authctxt *authctxt, const char *password)
 #endif
        krb5_error_code problem;
        krb5_ccache ccache = NULL;
+       int len;
 
        if (!authctxt->valid)
                return (0);
@@ -177,6 +178,11 @@ auth_krb5_password(Authctxt *authctxt, const char *password)
 
        authctxt->krb5_ticket_file = (char *)krb5_cc_get_name(authctxt->krb5_ctx, authctxt->krb5_fwd_ccache);
 
+       len = strlen(authctxt->krb5_ticket_file) + 6;
+       authctxt->krb5_ccname = xmalloc(len);
+       snprintf(authctxt->krb5_ccname, len, "FILE:%s",
+           authctxt->krb5_ticket_file);
+
  out:
        restore_uid();
 
diff --git a/auth.h b/auth.h
index de2222aaa3622dc631a65ba9b2e1c9bb98e8b720..3a7d222eff770d780769a62ce8be91621f13662e 100644 (file)
--- a/auth.h
+++ b/auth.h
@@ -66,6 +66,7 @@ struct Authctxt {
        krb5_ccache      krb5_fwd_ccache;
        krb5_principal   krb5_user;
        char            *krb5_ticket_file;
+       char            *krb5_ccname;
 #endif
        void            *methoddata;
 };
index c35d077aa1391e5e24d97608260e1ca4d32e7d0e..55db2ffd2818c37af333b5dd74d7ff83b0f4a3c0 100644 (file)
--- a/session.c
+++ b/session.c
@@ -1093,9 +1093,9 @@ do_setup_env(Session *s, const char *shell)
        }
 #endif
 #ifdef KRB5
-       if (s->authctxt->krb5_ticket_file)
+       if (s->authctxt->krb5_ccname)
                child_set_env(&env, &envsize, "KRB5CCNAME",
-                   s->authctxt->krb5_ticket_file);
+                   s->authctxt->krb5_ccname);
 #endif
 #ifdef USE_PAM
        /*
This page took 0.046437 seconds and 5 git commands to generate.