misc style

This commit is contained in:
fpeters 2005-04-01 17:35:08 +00:00
parent ab79761be8
commit 55684fbcda
1 changed files with 9 additions and 12 deletions

View File

@ -130,12 +130,12 @@ int single_sign_on()
char *query;
query = getenv("QUERY_STRING");
if (query == NULL) {
if (query == NULL)
return error_page("No authnRequest as query string");
}
if (lasso_profile_is_liberty_query(query) == 0) {
if (! lasso_profile_is_liberty_query(query))
return error_page("Improper query string; not a AuthnRequest");
}
authn_request_msg = strdup(query);
}
@ -168,14 +168,12 @@ int single_sign_on()
}
}
if (authn_request_msg == NULL) {
if (authn_request_msg == NULL)
return error_page("Failed to get authn_request_msg");
}
server = get_config_server();
if (server == NULL) {
if (server == NULL)
return error_page("Failed to get server configuration");
}
if (strcmp(http_verb, "POST") == 0 && strcmp(ct, "text/xml") == 0) {
rc = lecp_profile(server);
@ -206,8 +204,7 @@ int single_sign_on()
if (user_id == NULL) {
authentication_result = 0;
}
else {
} else {
authentication_result = 1;
/* retrieve identity_dump and session_dump */
rc = db_get_dumps(user_id, &identity_dump, &session_dump);
@ -216,7 +213,7 @@ int single_sign_on()
return error_page("Error getting dumps from db");
}
rc = set_profile_from_dumps(LASSO_PROFILE(login),
identity_dump, session_dump);
identity_dump, session_dump);
free(identity_dump);
free(session_dump);
if (rc) {
@ -310,6 +307,7 @@ int single_sign_on()
printf("Location: %s\n\nRedirected", LASSO_PROFILE(login)->msg_url);
} else {
/* POST profile (lassoLoginProtocolProfileBrwsPost) */
/* XXX: invalid and unqualified html */
printf("Content-type: text/html\n\n");
printf("<html><head><title>Authentication Response</title></head>\n"
"<body onload=\"document.forms[0].submit()\">\n"
@ -356,4 +354,3 @@ shutdown:
lasso_shutdown();
return rc;
}