Blame acs-warning.patch

9efdbdc
commit 5ba9bb72707a90503cd4d042083ea074a0cb6b8a
9efdbdc
Author: John Dennis <jdennis@redhat.com>
9efdbdc
Date:   Fri Oct 30 15:46:33 2015 -0400
9efdbdc
9efdbdc
    Role maybe unknown when assertion consumer url is looked up
9efdbdc
    
9efdbdc
    Replace the call to lasso_provider_get_metadata_one() with
9efdbdc
    lasso_provider_get_metadata_one_for_role() so that we can exlicitly
9efdbdc
    pass the LASSO_PROVIDER_ROLE_SP role. The former call obtains the
9efdbdc
    role from the provider object and then calls
9efdbdc
    lasso_provider_get_metadata_one_for_role() using that role. However
9efdbdc
    the role will not have been set in the provider until the first request is
9efdbdc
    processed. This means the first time we call this routine it won't
9efdbdc
    work correctly because the role will not have been set yet, by
9efdbdc
    explicitly passing the role we avoid this problem.
9efdbdc
    
9efdbdc
    Signed-off-by: John Dennis <jdennis@redhat.com>
9efdbdc
9efdbdc
diff --git a/auth_mellon_util.c b/auth_mellon_util.c
9efdbdc
index 155bb1a..6c694b7 100644
9efdbdc
--- a/auth_mellon_util.c
9efdbdc
+++ b/auth_mellon_util.c
9efdbdc
@@ -1827,7 +1827,9 @@ char *am_get_assertion_consumer_service_by_binding(LassoProvider *provider, cons
9efdbdc
     }
9efdbdc
 
9efdbdc
     if (selected_descriptor) {
9efdbdc
-        url = lasso_provider_get_metadata_one(provider, selected_descriptor);
9efdbdc
+        url = lasso_provider_get_metadata_one_for_role(provider,
9efdbdc
+                                                       LASSO_PROVIDER_ROLE_SP,
9efdbdc
+                                                       selected_descriptor);
9efdbdc
     }
9efdbdc
 
9efdbdc
     lasso_release_list_of_strings(descriptors);