From 55684fbcda274b6abbcc744955eb418d040305af Mon Sep 17 00:00:00 2001 From: fpeters <> Date: Fri, 1 Apr 2005 17:35:08 +0000 Subject: [PATCH] misc style --- src/single_sign_on.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/src/single_sign_on.c b/src/single_sign_on.c index 3c6a258..3a51579 100644 --- a/src/single_sign_on.c +++ b/src/single_sign_on.c @@ -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("Authentication Response\n" "\n" @@ -356,4 +354,3 @@ shutdown: lasso_shutdown(); return rc; } -