[26215] in CVS-changelog-for-Kerberos-V5

home help back first fref pref prev next nref lref last post

svn rev #25555: trunk/src/windows/ include/ leashdll/

daemon@ATHENA.MIT.EDU (tlyu@mit.edu)
Mon Dec 12 15:45:39 2011

Date: Mon, 12 Dec 2011 15:45:34 -0500
From: tlyu@mit.edu
Message-Id: <201112122045.pBCKjYkt005263@drugstore.mit.edu>
To: cvs-krb5@mit.edu
Reply-To: krbdev@mit.edu
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: cvs-krb5-bounces@mit.edu

http://src.mit.edu/fisheye/changelog/krb5/?cs=25555
Commit By: tlyu
Log Message:
ticket: 7050
subject: kfw fixes: make leash ignore credentials that store config principals.

Signed-off-by: Kevin Wasserman <kevin.wasserman@painless-security.com>


Changed Files:
U   trunk/src/windows/include/loadfuncs-krb5.h
U   trunk/src/windows/leashdll/krb5routines.c
U   trunk/src/windows/leashdll/leashdll.c
U   trunk/src/windows/leashdll/leashdll.h
Modified: trunk/src/windows/include/loadfuncs-krb5.h
===================================================================
--- trunk/src/windows/include/loadfuncs-krb5.h	2011-12-12 20:45:29 UTC (rev 25554)
+++ trunk/src/windows/include/loadfuncs-krb5.h	2011-12-12 20:45:33 UTC (rev 25555)
@@ -1775,4 +1775,11 @@
     krb5_clear_error_message,
     (krb5_context)
     );
+
+TYPEDEF_FUNC(
+    krb5_boolean,
+    KRB5_CALLCONV,
+    krb5_is_config_principal,
+    (krb5_context, krb5_const_principal)
+    );
 #endif /* __LOADFUNCS_KRB5_H__ */

Modified: trunk/src/windows/leashdll/krb5routines.c
===================================================================
--- trunk/src/windows/leashdll/krb5routines.c	2011-12-12 20:45:29 UTC (rev 25554)
+++ trunk/src/windows/leashdll/krb5routines.c	2011-12-12 20:45:33 UTC (rev 25555)
@@ -450,6 +450,11 @@
 
     while (!(code = pkrb5_cc_next_cred(ctx, cache, &KRBv5Cursor, &KRBv5Credentials)))
     {
+        if ((*pkrb5_is_config_principal)(ctx, KRBv5Credentials.server))
+        { /* skip configuration credentials */
+            (*pkrb5_free_cred_contents)(ctx, &KRBv5Credentials);
+            continue;
+        }
         if (!list)
         {
             list = (TicketList*) calloc(1, sizeof(TicketList));

Modified: trunk/src/windows/leashdll/leashdll.c
===================================================================
--- trunk/src/windows/leashdll/leashdll.c	2011-12-12 20:45:29 UTC (rev 25554)
+++ trunk/src/windows/leashdll/leashdll.c	2011-12-12 20:45:33 UTC (rev 25555)
@@ -82,6 +82,7 @@
 DECL_FUNC_PTR(krb5_free_default_realm);
 DECL_FUNC_PTR(krb5_principal_compare);
 DECL_FUNC_PTR(krb5_string_to_deltat);
+DECL_FUNC_PTR(krb5_is_config_principal);
 
 // ComErr functions
 DECL_FUNC_PTR(com_err);
@@ -178,6 +179,7 @@
     MAKE_FUNC_INFO(krb5_free_default_realm),
     MAKE_FUNC_INFO(krb5_principal_compare),
     MAKE_FUNC_INFO(krb5_string_to_deltat),
+    MAKE_FUNC_INFO(krb5_is_config_principal),
     END_FUNC_INFO
 };
 

Modified: trunk/src/windows/leashdll/leashdll.h
===================================================================
--- trunk/src/windows/leashdll/leashdll.h	2011-12-12 20:45:29 UTC (rev 25554)
+++ trunk/src/windows/leashdll/leashdll.h	2011-12-12 20:45:33 UTC (rev 25555)
@@ -221,6 +221,7 @@
 extern DECL_FUNC_PTR(krb5_free_default_realm);
 extern DECL_FUNC_PTR(krb5_principal_compare);
 extern DECL_FUNC_PTR(krb5_string_to_deltat);
+extern DECL_FUNC_PTR(krb5_is_config_principal);
 
 #ifndef NO_KRB4
 // Krb524 functions

_______________________________________________
cvs-krb5 mailing list
cvs-krb5@mit.edu
https://mailman.mit.edu/mailman/listinfo/cvs-krb5

home help back first fref pref prev next nref lref last post