[pubcookie-dev] WEBISO CVS update: willey;
libpubcookie.c,2.60.2.4,2.60.2.5 libpubcookie.h,1.37.2.3,1.37.2.4
mod_pubcookie.c,1.123.2.1,1.123.2.2
Stephen Willey
willey at cac.washington.edu
Wed Jan 7 15:26:51 PST 2004
Update of /usr/local/cvsroot/webiso/pubcookie/src
In directory webiso-cvs.cac.washington.edu:/var/tmp/cvs-serv3926
Modified Files:
Tag: UWash3
index.cgi.c libpubcookie.c libpubcookie.h mod_pubcookie.c
Log Message:
- better support in mod_pubcookie for testing without forcing SSL
- logging on login server reports redirect reason
- correct logging when non-ssl reqs come into mod_pubcookie
Index: webiso/pubcookie/src/index.cgi.c
diff -c webiso/pubcookie/src/index.cgi.c:1.108.2.9 webiso/pubcookie/src/index.cgi.c:1.108.2.10
*** webiso/pubcookie/src/index.cgi.c:1.108.2.9 Tue Jan 6 09:17:47 2004
--- webiso/pubcookie/src/index.cgi.c Wed Jan 7 15:26:49 2004
***************
*** 6,12 ****
/** @file index.cgi.c
* Login server CGI
*
! * $Id: index.cgi.c,v 1.108.2.9 2004/01/06 17:17:47 willey Exp $
*/
#ifdef HAVE_CONFIG_H
--- 6,12 ----
/** @file index.cgi.c
* Login server CGI
*
! * $Id: index.cgi.c,v 1.108.2.10 2004/01/07 23:26:49 willey Exp $
*/
#ifdef HAVE_CONFIG_H
***************
*** 2335,2346 ****
/* will look like format chars in future *printf's */
now = time(NULL);
fprintf(stderr,
! "%s: PUBCOOKIE_DEBUG: %s: %s Redirect user: %s redirect: %s\n",
libpbc_time_string(p, now),
ANY_LOGINSRV_MESSAGE,
l->first_kiss,
l->user,
! redirect_final);
/* now blat out the redirect page */
if( l->pinit == PBC_FALSE ) /* don't need a G cookie for a pinit */
--- 2335,2347 ----
/* will look like format chars in future *printf's */
now = time(NULL);
fprintf(stderr,
! "%s: PUBCOOKIE_DEBUG: %s: %s Redirect user: %s redirect: %s reason: %s\n",
libpbc_time_string(p, now),
ANY_LOGINSRV_MESSAGE,
l->first_kiss,
l->user,
! redirect_final,
! l->appsrv_err_string);
/* now blat out the redirect page */
if( l->pinit == PBC_FALSE ) /* don't need a G cookie for a pinit */
Index: webiso/pubcookie/src/libpubcookie.c
diff -c webiso/pubcookie/src/libpubcookie.c:2.60.2.4 webiso/pubcookie/src/libpubcookie.c:2.60.2.5
*** webiso/pubcookie/src/libpubcookie.c:2.60.2.4 Mon Jan 5 17:05:17 2004
--- webiso/pubcookie/src/libpubcookie.c Wed Jan 7 15:26:49 2004
***************
*** 6,12 ****
/** @file libpubcookie.c
* Core pubcookie library
*
! * $Id: libpubcookie.c,v 2.60.2.4 2004/01/06 01:05:17 willey Exp $
*/
--- 6,12 ----
/** @file libpubcookie.c
* Core pubcookie library
*
! * $Id: libpubcookie.c,v 2.60.2.5 2004/01/07 23:26:49 willey Exp $
*/
***************
*** 127,133 ****
"Wrong app server id", /* 9 */
"Wrong version id", /* 10 */
"Wrong creds", /* 11 */
! "Bad Pre-session Cookie" /* 12 */
};
const char *get_my_hostname(pool *p)
--- 127,134 ----
"Wrong app server id", /* 9 */
"Wrong version id", /* 10 */
"Wrong creds", /* 11 */
! "Bad Pre-session Cookie", /* 12 */
! "Force SSL" /* 13 */
};
const char *get_my_hostname(pool *p)
Index: webiso/pubcookie/src/libpubcookie.h
diff -c webiso/pubcookie/src/libpubcookie.h:1.37.2.3 webiso/pubcookie/src/libpubcookie.h:1.37.2.4
*** webiso/pubcookie/src/libpubcookie.h:1.37.2.3 Wed Nov 26 14:18:13 2003
--- webiso/pubcookie/src/libpubcookie.h Wed Jan 7 15:26:49 2004
***************
*** 4,10 ****
*/
/*
! $Id: libpubcookie.h,v 1.37.2.3 2003/11/26 22:18:13 willey Exp $
*/
#ifndef PUBCOOKIE_LIB
--- 4,10 ----
*/
/*
! $Id: libpubcookie.h,v 1.37.2.4 2004/01/07 23:26:49 willey Exp $
*/
#ifndef PUBCOOKIE_LIB
***************
*** 122,132 ****
PBC_RR_WRONGAPPSRVID_CODE = 9,
PBC_RR_WRONGVER_CODE = 10,
PBC_RR_WRONGCREDS_CODE = 11,
! PBC_RR_BADPRES_CODE = 12
};
/* string translations of the above reasons */
! extern const char *redirect_reason[13];
int capture_cmd_output(pool *p, char **cmd, char *out, int len);
--- 122,133 ----
PBC_RR_WRONGAPPSRVID_CODE = 9,
PBC_RR_WRONGVER_CODE = 10,
PBC_RR_WRONGCREDS_CODE = 11,
! PBC_RR_BADPRES_CODE = 12,
! PBC_RR_FORCE_SSL = 13
};
/* string translations of the above reasons */
! extern const char *redirect_reason[14];
int capture_cmd_output(pool *p, char **cmd, char *out, int len);
Index: webiso/pubcookie/src/mod_pubcookie.c
diff -c webiso/pubcookie/src/mod_pubcookie.c:1.123.2.1 webiso/pubcookie/src/mod_pubcookie.c:1.123.2.2
*** webiso/pubcookie/src/mod_pubcookie.c:1.123.2.1 Wed Dec 10 17:01:11 2003
--- webiso/pubcookie/src/mod_pubcookie.c Wed Jan 7 15:26:49 2004
***************
*** 6,12 ****
/** @file mod_pubcookie.c
* Apache pubcookie module
*
! * $Id: mod_pubcookie.c,v 1.123.2.1 2003/12/11 01:01:11 willey Exp $
*/
--- 6,12 ----
/** @file mod_pubcookie.c
* Apache pubcookie module
*
! * $Id: mod_pubcookie.c,v 1.123.2.2 2004/01/07 23:26:49 willey Exp $
*/
***************
*** 1000,1006 ****
apri = APLOG_DEBUG|APLOG_NOERRNO;
ap_log_error(APLOG_MARK, apri, NULL, "%s", msg);
- /* fprintf(stderr, msg); */
}
--- 1000,1005 ----
***************
*** 1248,1262 ****
sess_cookie_name = make_session_cookie_name(p, PBC_S_COOKIENAME, appid(r));
/* force SSL */
if (ap_hook_call("ap::mod_ssl::var_lookup", &isssl, p, r->server,
r->connection, r, "HTTPS") && isssl && strcmp (isssl, "on")) {
ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_DEBUG, r,
"Not SSL; uri: %s appid: %s", r->uri, appid(r));
cfg->failed = PBC_BAD_AUTH;
! cfg->redir_reason_no = PBC_RR_NOGORS_CODE;
return OK;
}
/* before we check if they hav a valid S or G cookie see if it's a logout */
if( check_end_session(r) & PBC_END_SESSION_ANY ) {
--- 1247,1263 ----
sess_cookie_name = make_session_cookie_name(p, PBC_S_COOKIENAME, appid(r));
+ #ifndef PORT80_TEST
/* force SSL */
if (ap_hook_call("ap::mod_ssl::var_lookup", &isssl, p, r->server,
r->connection, r, "HTTPS") && isssl && strcmp (isssl, "on")) {
ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_DEBUG, r,
"Not SSL; uri: %s appid: %s", r->uri, appid(r));
cfg->failed = PBC_BAD_AUTH;
! cfg->redir_reason_no = PBC_RR_FORCE_SSL;
return OK;
}
+ #endif
/* before we check if they hav a valid S or G cookie see if it's a logout */
if( check_end_session(r) & PBC_END_SESSION_ANY ) {
end of message
More information about the pubcookie-dev
mailing list