I talked to Todd C. Miller, the author of sudo, who proposed the following patch:
diff -r 6c0cc2def911 plugins/sudoers/ldap.c --- a/plugins/sudoers/ldap.c Wed Jun 04 11:43:39 2014 -0600 +++ b/plugins/sudoers/ldap.c Mon Jun 16 13:41:02 2014 -0600 @@ -2429,10 +2429,11 @@ rc = ldap_sasl_interactive_bind_s(ld, ldap_conf.binddn, "GSSAPI", NULL, NULL, LDAP_SASL_QUIET, sudo_ldap_sasl_interact, auth_id); if (new_ccname != NULL) { - rc = sudo_set_krb5_ccache_name(old_ccname, NULL); + rc = sudo_set_krb5_ccache_name(old_ccname ? old_ccname : "", NULL); if (rc == 0) { sudo_debug_printf(SUDO_DEBUG_INFO|SUDO_DEBUG_LINENO, - "restore ccache name %s -> %s", new_ccname, old_ccname); + "restore ccache name %s -> %s", new_ccname,az + old_ccname ? old_ccname : "(none)"); } else { sudo_debug_printf(SUDO_DEBUG_WARN|SUDO_DEBUG_LINENO, "gss_krb5_ccache_name() failed: %d", rc);
We tested it in my 14.04LTS amd64 (sudo 1.8.9p5) install and that solved the problem. The above patch will be incorporated in the next version of sudo. But, I am posting it here in case someone wants to backport it to the sudo 1.8.9 ubuntu package
I talked to Todd C. Miller, the author of sudo, who proposed the following patch:
diff -r 6c0cc2def911 plugins/ sudoers/ ldap.c sudoers/ ldap.c Wed Jun 04 11:43:39 2014 -0600 sudoers/ ldap.c Mon Jun 16 13:41:02 2014 -0600 interactive_ bind_s( ld, ldap_conf.binddn, "GSSAPI", sasl_interact, auth_id); krb5_ccache_ name(old_ ccname, NULL); krb5_ccache_ name(old_ ccname ? old_ccname : "", NULL);
sudo_ debug_printf( SUDO_DEBUG_ INFO|SUDO_ DEBUG_LINENO,
sudo_ debug_printf( SUDO_DEBUG_ WARN|SUDO_ DEBUG_LINENO,
" gss_krb5_ ccache_ name() failed: %d", rc);
--- a/plugins/
+++ b/plugins/
@@ -2429,10 +2429,11 @@
rc = ldap_sasl_
NULL, NULL, LDAP_SASL_QUIET, sudo_ldap_
if (new_ccname != NULL) {
- rc = sudo_set_
+ rc = sudo_set_
if (rc == 0) {
- "restore ccache name %s -> %s", new_ccname, old_ccname);
+ "restore ccache name %s -> %s", new_ccname,az
+ old_ccname ? old_ccname : "(none)");
} else {
We tested it in my 14.04LTS amd64 (sudo 1.8.9p5) install and that solved the problem. The above patch will be incorporated in the next version of sudo. But, I am posting it here in case someone wants to backport it to the sudo 1.8.9 ubuntu package