svn commit: samba r20536 - in branches: SAMBA_3_0/source/libads
SAMBA_3_0/source/nsswitch SAMBA_3_0_24/source/libads
SAMBA_3_0_24/source/nsswitch
gd at samba.org
gd at samba.org
Thu Jan 4 23:41:17 GMT 2007
Author: gd
Date: 2007-01-04 23:41:16 +0000 (Thu, 04 Jan 2007)
New Revision: 20536
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=20536
Log:
In the offline PAM session close case the attempt to delete a
non-existing krb5 credential cache should not generate an error.
Guenther
Modified:
branches/SAMBA_3_0/source/libads/krb5_errs.c
branches/SAMBA_3_0/source/nsswitch/winbindd_cred_cache.c
branches/SAMBA_3_0_24/source/libads/krb5_errs.c
branches/SAMBA_3_0_24/source/nsswitch/winbindd_cred_cache.c
Changeset:
Modified: branches/SAMBA_3_0/source/libads/krb5_errs.c
===================================================================
--- branches/SAMBA_3_0/source/libads/krb5_errs.c 2007-01-04 23:25:04 UTC (rev 20535)
+++ branches/SAMBA_3_0/source/libads/krb5_errs.c 2007-01-04 23:41:16 UTC (rev 20536)
@@ -56,6 +56,8 @@
#if defined(KRB5KRB_ERR_RESPONSE_TOO_BIG)
{KRB5KRB_ERR_RESPONSE_TOO_BIG, NT_STATUS_PROTOCOL_UNREACHABLE},
#endif
+ {KRB5_CC_NOTFOUND, NT_STATUS_NO_SUCH_FILE},
+ {KRB5_FCC_NOFILE, NT_STATUS_NO_SUCH_FILE},
{KRB5KDC_ERR_NONE, NT_STATUS_OK},
{0, NT_STATUS_OK}
};
Modified: branches/SAMBA_3_0/source/nsswitch/winbindd_cred_cache.c
===================================================================
--- branches/SAMBA_3_0/source/nsswitch/winbindd_cred_cache.c 2007-01-04 23:25:04 UTC (rev 20535)
+++ branches/SAMBA_3_0/source/nsswitch/winbindd_cred_cache.c 2007-01-04 23:41:16 UTC (rev 20536)
@@ -419,7 +419,11 @@
#ifdef HAVE_KRB5
ret = ads_kdestroy(entry->ccname);
- if (ret) {
+
+ /* we ignore the error when there has been no credential cache */
+ if (ret == KRB5_FCC_NOFILE) {
+ ret = 0;
+ } else if (ret) {
DEBUG(0,("remove_ccache: failed to destroy user krb5 ccache %s with: %s\n",
entry->ccname, error_message(ret)));
} else {
Modified: branches/SAMBA_3_0_24/source/libads/krb5_errs.c
===================================================================
--- branches/SAMBA_3_0_24/source/libads/krb5_errs.c 2007-01-04 23:25:04 UTC (rev 20535)
+++ branches/SAMBA_3_0_24/source/libads/krb5_errs.c 2007-01-04 23:41:16 UTC (rev 20536)
@@ -56,6 +56,8 @@
#if defined(KRB5KRB_ERR_RESPONSE_TOO_BIG)
{KRB5KRB_ERR_RESPONSE_TOO_BIG, NT_STATUS_PROTOCOL_UNREACHABLE},
#endif
+ {KRB5_CC_NOTFOUND, NT_STATUS_NO_SUCH_FILE},
+ {KRB5_FCC_NOFILE, NT_STATUS_NO_SUCH_FILE},
{KRB5KDC_ERR_NONE, NT_STATUS_OK},
{0, NT_STATUS_OK}
};
Modified: branches/SAMBA_3_0_24/source/nsswitch/winbindd_cred_cache.c
===================================================================
--- branches/SAMBA_3_0_24/source/nsswitch/winbindd_cred_cache.c 2007-01-04 23:25:04 UTC (rev 20535)
+++ branches/SAMBA_3_0_24/source/nsswitch/winbindd_cred_cache.c 2007-01-04 23:41:16 UTC (rev 20536)
@@ -419,7 +419,11 @@
#ifdef HAVE_KRB5
ret = ads_kdestroy(entry->ccname);
- if (ret) {
+
+ /* we ignore the error when there has been no credential cache */
+ if (ret == KRB5_FCC_NOFILE) {
+ ret = 0;
+ } else if (ret) {
DEBUG(0,("remove_ccache: failed to destroy user krb5 ccache %s with: %s\n",
entry->ccname, error_message(ret)));
} else {
More information about the samba-cvs
mailing list