Sorry for the triple-posting... I'll return to mutt soon ;)
We've had some problems because of our apache proxy for cas service
being hosted as 'virtualhost': pam_cas couldn't validate any ticket with
HTTP/1.0 protocol.
Here is a little patch, adding a 'Host: ' header with the configured
hostname, and changing CAS_PROT to HTTP/1.1.
It works for us™
Hope this can help ... more than without patch ;)
--
___________________________________________________________
/ *Geoffroy DESVERNAY* | \
/\ `Service info` | Tel: (+33|0)4 91 05 45 24 /\
\/ Ecole Centrale de Marseille | Fax: (+33|0)4 91 05 45 98 \/
\ (ex-EGIM) | Mail: [EMAIL PROTECTED] /
-----------------------------------------------------------
diff -bruN ../Pam_cas-2.0.11-esup-2.0.4.bak/sources/cas.h sources/cas.h
--- ../Pam_cas-2.0.11-esup-2.0.4.bak/sources/cas.h 2006-05-23 13:52:02.000000000 +0200
+++ sources/cas.h 2008-06-25 17:28:37.000000000 +0200
@@ -35,7 +35,7 @@
#define DEFAULT_URI_VALIDATE "/proxyValidate"
#define CAS_METHOD "GET"
-#define CAS_PROT "HTTP/1.0"
+#define CAS_PROT "HTTP/1.1"
#define CAS_LEN_NETID 32
diff -bruN ../Pam_cas-2.0.11-esup-2.0.4.bak/sources/cas_validator.c sources/cas_validator.c
--- ../Pam_cas-2.0.11-esup-2.0.4.bak/sources/cas_validator.c 2006-08-30 16:31:13.000000000 +0200
+++ sources/cas_validator.c 2008-06-25 17:31:28.000000000 +0200
@@ -140,14 +140,14 @@
full_request = malloc(strlen(CAS_METHOD) + strlen(" ")
+ strlen(config->uriValidate) + strlen("?ticket=") + strlen(ticket) +
+ strlen("&service=") + strlen(service) + strlen(" ")
- + strlen(CAS_PROT) + strlen("\n\n") + 1);
+ + strlen(CAS_PROT) + strlen("\n") + strlen("Host: ") + strlen(config->host) + strlen("\n\n") + 1);
if (full_request == NULL)
{
LOG("Error memory allocation%s\n", "");
END(CAS_ERROR_MEMORY_ALLOC);
}
- sprintf(full_request, "%s %s?ticket=%s&service=%s %s\n\n",
- CAS_METHOD, config->uriValidate, ticket, service, CAS_PROT);
+ sprintf(full_request, "%s %s?ticket=%s&service=%s %s\nHost: %s\n\n",
+ CAS_METHOD, config->uriValidate, ticket, service, CAS_PROT, config->host);
/* send request */
if (BIO_write(bio, full_request, strlen(full_request)) != strlen(full_request))
_______________________________________________
Yale CAS mailing list
[email protected]
http://tp.its.yale.edu/mailman/listinfo/cas