[pubcookie-dev] WEBISO CVS update: willey;
securid_stub.c,1.13,1.13.2.1 index.cgi.c,1.108.2.7,1.108.2.8
libpubcookie.c,2.60.2.3,2.60.2.4 flavor_basic.c,1.42.2.7,1.42.2.8
pbc_logging.h,1.16.2.1,1.16.2.2
Stephen Willey
willey at cac.washington.edu
Mon Jan 5 17:05:19 PST 2004
Update of /usr/local/cvsroot/webiso/pubcookie/src
In directory webiso-cvs.cac.washington.edu:/var/tmp/cvs-serv32525
Modified Files:
Tag: UWash3
keyserver.c securid_stub.c index.cgi.c libpubcookie.c
flavor_basic.c pbc_logging.h
Log Message:
- fixed some logging levels
- retired 'debug' config directive, use 'logging_level'
- added somments for logging levels
Index: webiso/pubcookie/src/keyserver.c
diff -c webiso/pubcookie/src/keyserver.c:2.36.2.4 webiso/pubcookie/src/keyserver.c:2.36.2.5
*** webiso/pubcookie/src/keyserver.c:2.36.2.4 Wed Nov 26 14:17:26 2003
--- webiso/pubcookie/src/keyserver.c Mon Jan 5 17:05:17 2004
***************
*** 6,12 ****
/** @file keyserver.c
* Server side of key management structure
*
! * $Id: keyserver.c,v 2.36.2.4 2003/11/26 22:17:26 willey Exp $
*/
--- 6,12 ----
/** @file keyserver.c
* Server side of key management structure
*
! * $Id: keyserver.c,v 2.36.2.5 2004/01/06 01:05:17 willey Exp $
*/
***************
*** 547,553 ****
pbc_log_init(p, "keyserver", NULL, NULL, NULL);
libpbc_pubcookie_init(p);
! debug = libpbc_config_getint(p, "debug", 0);
keyfile = libpbc_config_getstring(p, "ssl_key_file", "server.pem");
certfile = libpbc_config_getstring(p, "ssl_cert_file", "server.pem");
cafile = libpbc_config_getstring(p, "ssl_ca_file", NULL);
--- 547,553 ----
pbc_log_init(p, "keyserver", NULL, NULL, NULL);
libpbc_pubcookie_init(p);
! debug = libpbc_config_getint(p, "logging_level", 0);
keyfile = libpbc_config_getstring(p, "ssl_key_file", "server.pem");
certfile = libpbc_config_getstring(p, "ssl_cert_file", "server.pem");
cafile = libpbc_config_getstring(p, "ssl_ca_file", NULL);
***************
*** 754,760 ****
/* xxx log connection */
libpbc_config_init(NULL, "keyserver");
! debug = libpbc_config_getint("debug", 0);
if (!getenv("HTTPS") || strcmp( getenv("HTTPS"), "on") ) {
printf("\r\nNO HTTPS required\r\n");
--- 754,760 ----
/* xxx log connection */
libpbc_config_init(NULL, "keyserver");
! debug = libpbc_config_getint("logging_level", 0);
if (!getenv("HTTPS") || strcmp( getenv("HTTPS"), "on") ) {
printf("\r\nNO HTTPS required\r\n");
Index: webiso/pubcookie/src/securid_stub.c
diff -c webiso/pubcookie/src/securid_stub.c:1.13 webiso/pubcookie/src/securid_stub.c:1.13.2.1
*** webiso/pubcookie/src/securid_stub.c:1.13 Wed Jul 2 15:04:04 2003
--- webiso/pubcookie/src/securid_stub.c Mon Jan 5 17:05:17 2004
***************
*** 6,12 ****
/** @file securid_stub.c
* Test app for old UW SecurID interface
*
! * $Id: securid_stub.c,v 1.13 2003/07/02 22:04:04 willey Exp $
*/
--- 6,12 ----
/** @file securid_stub.c
* Test app for old UW SecurID interface
*
! * $Id: securid_stub.c,v 1.13.2.1 2004/01/06 01:05:17 willey Exp $
*/
***************
*** 97,103 ****
# include <dmalloc.h>
# endif /* ! APACHE */
#endif /* HAVE_DMALLOC_H */
-
// extra debugging
FILE *mirror;
--- 97,102 ----
Index: webiso/pubcookie/src/index.cgi.c
diff -c webiso/pubcookie/src/index.cgi.c:1.108.2.7 webiso/pubcookie/src/index.cgi.c:1.108.2.8
*** webiso/pubcookie/src/index.cgi.c:1.108.2.7 Wed Dec 10 15:45:55 2003
--- webiso/pubcookie/src/index.cgi.c Mon Jan 5 17:05:17 2004
***************
*** 6,12 ****
/** @file index.cgi.c
* Login server CGI
*
! * $Id: index.cgi.c,v 1.108.2.7 2003/12/10 23:45:55 willey Exp $
*/
#ifdef HAVE_CONFIG_H
--- 6,12 ----
/** @file index.cgi.c
* Login server CGI
*
! * $Id: index.cgi.c,v 1.108.2.8 2004/01/06 01:05:17 willey Exp $
*/
#ifdef HAVE_CONFIG_H
***************
*** 1543,1549 ****
using apache, here we just pass a void pointer */
libpbc_config_init(p, NULL, "logincgi");
! debug = libpbc_config_getint(p, "debug", 0);
pbc_log_init(p, "pubcookie login server", NULL, NULL, NULL);
pbc_log_activity(p, PBC_LOG_DEBUG_VERBOSE, "cgiMain() hello...\n");
--- 1543,1549 ----
using apache, here we just pass a void pointer */
libpbc_config_init(p, NULL, "logincgi");
! debug = libpbc_config_getint(p, "loggin_level", 0);
pbc_log_init(p, "pubcookie login server", NULL, NULL, NULL);
pbc_log_activity(p, PBC_LOG_DEBUG_VERBOSE, "cgiMain() hello...\n");
***************
*** 2209,2217 ****
abend(p, "out of memory");
}
- pbc_log_activity(p, PBC_LOG_AUDIT, "l->user=%s l->appsrvid=%s l->appid=%s",
- l->user, l->appsrvid, l->appid);
-
/* the login cookie is encoded as having passed 'creds', which is what
the flavor verified. */
--- 2209,2214 ----
***************
*** 2550,2575 ****
}
}
! pbc_log_activity(p, PBC_LOG_AUDIT, "get_query: from login user: %s\n",
l->user == NULL ? "(null)" : l->user
);
! pbc_log_activity(p, PBC_LOG_AUDIT, "get_query: from login version: %s\n",
l->version == NULL ? "(null)" : l->version
);
! pbc_log_activity(p, PBC_LOG_AUDIT,
"get_query: from login creds: %c\n", l->creds);
! pbc_log_activity(p, PBC_LOG_AUDIT, "get_query: from login appid: %s\n",
l->appid == NULL ? "(null)" : l->appid
);
! pbc_log_activity(p, PBC_LOG_AUDIT, "get_query: from login host: %s\n",
l->host == NULL ? "(null)" : l->host
);
! pbc_log_activity(p, PBC_LOG_AUDIT, "get_query: from login appsrvid: %s\n",
l->appsrvid == NULL ? "(null)" : l->appsrvid
);
! pbc_log_activity(p, PBC_LOG_AUDIT, "get_query: from login first_kiss: %d\n",
(int)l->first_kiss);
! pbc_log_activity(p, PBC_LOG_AUDIT,
"get_query: from login post_stuff: %s\n",
(l->post_stuff==NULL ? "" : l->post_stuff));
--- 2547,2572 ----
}
}
! pbc_log_activity(p, PBC_LOG_DEBUG_LOW, "get_query: from login user: %s\n",
l->user == NULL ? "(null)" : l->user
);
! pbc_log_activity(p, PBC_LOG_DEBUG_LOW, "get_query: from login version: %s\n",
l->version == NULL ? "(null)" : l->version
);
! pbc_log_activity(p, PBC_LOG_DEBUG_LOW,
"get_query: from login creds: %c\n", l->creds);
! pbc_log_activity(p, PBC_LOG_DEBUG_LOW, "get_query: from login appid: %s\n",
l->appid == NULL ? "(null)" : l->appid
);
! pbc_log_activity(p, PBC_LOG_DEBUG_LOW, "get_query: from login host: %s\n",
l->host == NULL ? "(null)" : l->host
);
! pbc_log_activity(p, PBC_LOG_DEBUG_LOW, "get_query: from login appsrvid: %s\n",
l->appsrvid == NULL ? "(null)" : l->appsrvid
);
! pbc_log_activity(p, PBC_LOG_DEBUG_LOW, "get_query: from login first_kiss: %d\n",
(int)l->first_kiss);
! pbc_log_activity(p, PBC_LOG_DEBUG_LOW,
"get_query: from login post_stuff: %s\n",
(l->post_stuff==NULL ? "" : l->post_stuff));
***************
*** 2629,2635 ****
if (check_l_cookie_expire(p, new, t=time(NULL)) == PBC_FAIL)
new->alterable_username = PBC_TRUE;
! pbc_log_activity(p, PBC_LOG_AUDIT,
"verify_unload_login_cookie: bye! user is %s\n",
new->user == NULL ? "(null)" : new->user
);
--- 2626,2632 ----
if (check_l_cookie_expire(p, new, t=time(NULL)) == PBC_FAIL)
new->alterable_username = PBC_TRUE;
! pbc_log_activity(p, PBC_LOG_DEBUG_LOW,
"verify_unload_login_cookie: bye! user is %s\n",
new->user == NULL ? "(null)" : new->user
);
Index: webiso/pubcookie/src/libpubcookie.c
diff -c webiso/pubcookie/src/libpubcookie.c:2.60.2.3 webiso/pubcookie/src/libpubcookie.c:2.60.2.4
*** webiso/pubcookie/src/libpubcookie.c:2.60.2.3 Wed Dec 10 15:45:55 2003
--- webiso/pubcookie/src/libpubcookie.c Mon Jan 5 17:05:17 2004
***************
*** 6,12 ****
/** @file libpubcookie.c
* Core pubcookie library
*
! * $Id: libpubcookie.c,v 2.60.2.3 2003/12/10 23:45:55 willey Exp $
*/
--- 6,12 ----
/** @file libpubcookie.c
* Core pubcookie library
*
! * $Id: libpubcookie.c,v 2.60.2.4 2004/01/06 01:05:17 willey Exp $
*/
***************
*** 733,749 ****
}
if( ! libpbc_base64_decode(p, (unsigned char *)in, buf, &outlen) ) {
! pbc_log_activity(p, PBC_LOG_ERROR, "libpbc_unbundle_cookie: could not base64 decode cookie.\n");
return 0;
}
if (libpbc_rd_priv(p, peer, (const char *)buf, outlen, &plain, &plainlen)) {
! pbc_log_activity(p, PBC_LOG_ERROR, "libpbc_unbundle_cookie: libpbc_rd_priv() failed\n");
return 0;
}
if (plainlen != sizeof(pbc_cookie_data)) {
! pbc_log_activity(p, PBC_LOG_ERROR, "libpbc_unbundle_cookie: cookie wrong size: %d != %d\n", plainlen, sizeof(pbc_cookie_data));
return 0;
}
--- 733,749 ----
}
if( ! libpbc_base64_decode(p, (unsigned char *)in, buf, &outlen) ) {
! pbc_log_activity(p, PBC_LOG_ERROR, "libpbc_unbundle_cookie: could not base64 decode cookie.");
return 0;
}
if (libpbc_rd_priv(p, peer, (const char *)buf, outlen, &plain, &plainlen)) {
! pbc_log_activity(p, PBC_LOG_ERROR, "libpbc_unbundle_cookie: libpbc_rd_priv() failed");
return 0;
}
if (plainlen != sizeof(pbc_cookie_data)) {
! pbc_log_activity(p, PBC_LOG_ERROR, "libpbc_unbundle_cookie: cookie wrong size: %d != %d", plainlen, sizeof(pbc_cookie_data));
return 0;
}
Index: webiso/pubcookie/src/flavor_basic.c
diff -c webiso/pubcookie/src/flavor_basic.c:1.42.2.7 webiso/pubcookie/src/flavor_basic.c:1.42.2.8
*** webiso/pubcookie/src/flavor_basic.c:1.42.2.7 Tue Dec 9 17:24:57 2003
--- webiso/pubcookie/src/flavor_basic.c Mon Jan 5 17:05:17 2004
***************
*** 13,19 ****
* will pass l->realm to the verifier and append it to the username when
* 'append_realm' is set
*
! * $Id: flavor_basic.c,v 1.42.2.7 2003/12/10 01:24:57 willey Exp $
*/
--- 13,19 ----
* will pass l->realm to the verifier and append it to the username when
* 'append_realm' is set
*
! * $Id: flavor_basic.c,v 1.42.2.8 2004/01/06 01:05:17 willey Exp $
*/
***************
*** 67,73 ****
#endif /* HAVE_DMALLOC_H */
static verifier *v = NULL;
- extern int debug;
/* The types of reasons for printing the login page..
* Should this be in a header? I don't think I need it outside this file.. */
--- 67,72 ----
***************
*** 622,635 ****
}
if (v->v(p, l->user, l->pass, NULL, l->realm, credsp, errstr) == 0) {
! if (debug) {
! /* xxx log realm */
! pbc_log_activity(p, PBC_LOG_AUDIT,
"Authentication success: %s IP: %s type: %c\n",
l->user,
(cgiRemoteAddr == NULL ? "(null)" : cgiRemoteAddr),
l->creds);
- }
/* authn succeeded! */
--- 621,632 ----
}
if (v->v(p, l->user, l->pass, NULL, l->realm, credsp, errstr) == 0) {
! /* xxx log realm */
! pbc_log_activity(p, PBC_LOG_AUDIT,
"Authentication success: %s IP: %s type: %c\n",
l->user,
(cgiRemoteAddr == NULL ? "(null)" : cgiRemoteAddr),
l->creds);
/* authn succeeded! */
***************
*** 766,772 ****
return LOGIN_INPROGRESS;
} else { /* valid login cookie */
! pbc_log_activity(p, PBC_LOG_AUDIT,
"flavor_basic: L cookie valid user: %s", l->user);
pbc_log_activity(p, PBC_LOG_DEBUG_VERBOSE,
"process_basic: L cookie valid, goodbye\n" );
--- 763,769 ----
return LOGIN_INPROGRESS;
} else { /* valid login cookie */
! pbc_log_activity(p, PBC_LOG_DEBUG_LOW,
"flavor_basic: L cookie valid user: %s", l->user);
pbc_log_activity(p, PBC_LOG_DEBUG_VERBOSE,
"process_basic: L cookie valid, goodbye\n" );
Index: webiso/pubcookie/src/pbc_logging.h
diff -c webiso/pubcookie/src/pbc_logging.h:1.16.2.1 webiso/pubcookie/src/pbc_logging.h:1.16.2.2
*** webiso/pubcookie/src/pbc_logging.h:1.16.2.1 Thu Jul 10 11:58:31 2003
--- webiso/pubcookie/src/pbc_logging.h Mon Jan 5 17:05:17 2004
***************
*** 6,12 ****
/** @file pbc_logging.h
* Header file for logging stuff
*
! * $Id: pbc_logging.h,v 1.16.2.1 2003/07/10 18:58:31 willey Exp $
*/
--- 6,12 ----
/** @file pbc_logging.h
* Header file for logging stuff
*
! * $Id: pbc_logging.h,v 1.16.2.2 2004/01/06 01:05:17 willey Exp $
*/
***************
*** 17,27 ****
# include "config.h"
#endif
! #define PBC_LOG_ERROR 0
! #define PBC_LOG_AUDIT 1
! #define PBC_LOG_DEBUG_LOW 2
! #define PBC_LOG_DEBUG_VERBOSE 3
! #define PBC_LOG_DEBUG_OUTPUT 5
#ifdef HAVE_STDARG_H
# include <stdarg.h>
--- 17,27 ----
# include "config.h"
#endif
! #define PBC_LOG_ERROR 0 /* errors only */
! #define PBC_LOG_AUDIT 1 /* activity (authns, redirects, etc.) */
! #define PBC_LOG_DEBUG_LOW 2 /* some debugging */
! #define PBC_LOG_DEBUG_VERBOSE 3 /* whole lotta debugging */
! #define PBC_LOG_DEBUG_OUTPUT 5 /* adds logging of all html output */
#ifdef HAVE_STDARG_H
# include <stdarg.h>
end of message
More information about the pubcookie-dev
mailing list