/*
- * $Id: acl.cc,v 1.266 2001/10/23 12:14:48 hno Exp $
+ * $Id: acl.cc,v 1.267 2001/10/24 05:46:26 hno Exp $
*
* DEBUG: section 28 Access Control
* AUTHOR: Duane Wessels
debug(28, 7) ("aclMatchUser: user is %s, case_insensitive is %d\n",
user, data->flags.case_insensitive);
debug(28, 8) ("Top is %p, Top->data is %s\n", Top,
- (Top != NULL ? (Top)->data : "Unavailable"));
+ (char *)(Top != NULL ? (Top)->data : "Unavailable"));
if (user == NULL)
return 0;
Top = splay_splay(user, Top, (SPLAYCMP *) strcmp);
/* Top=splay_splay(user,Top,(SPLAYCMP *)dumping_strcmp); */
debug(28, 7) ("aclMatchUser: returning %d,Top is %p, Top->data is %s\n",
- !splayLastResult, Top, (Top ? Top->data : "Unavailable"));
+ !splayLastResult, Top, (char *)(Top ? Top->data : "Unavailable"));
data->names = Top;
return !splayLastResult;
}
while (link) {
auth_match = link->data;
if (auth_match->acl_data == data) {
- debug(28, 4) ("aclCacheMatchAcl: cache hit on acl '%d'\n", data);
+ debug(28, 4) ("aclCacheMatchAcl: cache hit on acl '%p'\n", data);
return auth_match->matchrv;
}
link = link->next;
char buf[128];
if (acldata->flags.strict)
wordlistAdd(&W, "-s");
- snprintf(buf, sizeof(buf), "%ld", acldata->max);
+ snprintf(buf, sizeof(buf), "%lu", (unsigned long int)acldata->max);
wordlistAdd(&W, buf);
return W;
}
}
if (ret == 0) {
debug(28, 0) ("WARNING: '%s' is a subdomain of '%s'\n", d1, d2);
- debug(28, 0) ("WARNING: because of this '%s' is ignored to keep splay tree searching predictable\n", a);
+ debug(28, 0) ("WARNING: because of this '%s' is ignored to keep splay tree searching predictable\n", (char *)a);
debug(28, 0) ("WARNING: You should probably remove '%s' from the ACL named '%s'\n", d1, AclMatchedName);
}
return ret;
/*
- * $Id: asn.cc,v 1.74 2001/10/17 19:43:39 hno Exp $
+ * $Id: asn.cc,v 1.75 2001/10/24 05:46:26 hno Exp $
*
* DEBUG: section 53 AS Number handling
* AUTHOR: Duane Wessels, Kostas Anagnostakis
}
asState->seen = asState->offset + size;
asState->offset += (s - buf);
- debug(53, 3) ("asState->seen = %d, asState->offset = %d\n",
- asState->seen, asState->offset);
+ debug(53, 3) ("asState->seen = %ld, asState->offset = %ld\n",
+ (long int)asState->seen, (long int)asState->offset);
if (e->store_status == STORE_PENDING) {
debug(53, 3) ("asHandleReply: store_status == STORE_PENDING: %s\n", storeUrl(e));
storeClientCopy(asState->sc,
/*
- * $Id: authenticate.cc,v 1.31 2001/10/17 20:25:01 hno Exp $
+ * $Id: authenticate.cc,v 1.32 2001/10/24 05:46:26 hno Exp $
*
* DEBUG: section 29 Authenticator
* AUTHOR: Duane Wessels
if (proxy_auth && conn->auth_user_request &&
authenticateUserAuthenticated(conn->auth_user_request) &&
strcmp(proxy_auth, authscheme_list[conn->auth_user_request->auth_user->auth_module - 1].authConnLastHeader(conn->auth_user_request))) {
- debug(28, 2) ("authenticateAuthenticate: DUPLICATE AUTH - authentication header on already authenticated connection!. AU %x, Current user '%s' proxy_auth %s\n", conn->auth_user_request, authenticateUserRequestUsername(conn->auth_user_request), proxy_auth);
+ debug(28, 2) ("authenticateAuthenticate: DUPLICATE AUTH - authentication header on already authenticated connection!. AU %p, Current user '%s' proxy_auth %s\n", conn->auth_user_request, authenticateUserRequestUsername(conn->auth_user_request), proxy_auth);
/* remove this request struct - the link is already authed and it can't be to
* reauth.
*/
authenticateAuthUserRequestLock(*auth_user_request);
} else {
/* failed connection based authentication */
- debug(28, 4) ("authenticateAuthenticate: Auth user request %d conn-auth user request %d conn type %d authentication failed.\n",
+ debug(28, 4) ("authenticateAuthenticate: Auth user request %p conn-auth user request %p conn type %d authentication failed.\n",
*auth_user_request, conn->auth_user_request, conn->auth_type);
authenticateAuthUserRequestUnlock(*auth_user_request);
*auth_user_request = NULL;
auth_user_t *auth_user;
char *username = NULL;
debug(29, 3) ("authenticateProxyUserCacheCleanup: Cleaning the user cache now\n");
- debug(29, 3) ("authenticateProxyUserCacheCleanup: Current time: %d\n", current_time.tv_sec);
+ debug(29, 3) ("authenticateProxyUserCacheCleanup: Current time: %ld\n", (long int)current_time.tv_sec);
hash_first(proxy_auth_username_cache);
while ((usernamehash = ((auth_user_hash_pointer *) hash_next(proxy_auth_username_cache)))) {
auth_user = usernamehash->auth_user;
/* if we need to have inpedendent expiry clauses, insert a module call
* here */
- debug(29, 4) ("authenticateProxyUserCacheCleanup: Cache entry:\n\tType: %d\n\tUsername: %s\n\texpires: %d\n\treferences: %d\n", auth_user->auth_type, username, auth_user->expiretime + Config.authenticateTTL, auth_user->references);
+ debug(29, 4) ("authenticateProxyUserCacheCleanup: Cache entry:\n\tType: %d\n\tUsername: %s\n\texpires: %ld\n\treferences: %d\n", auth_user->auth_type, username, (long int)(auth_user->expiretime + Config.authenticateTTL), auth_user->references);
if (auth_user->expiretime + Config.authenticateTTL <= current_time.tv_sec) {
debug(29, 5) ("authenticateProxyUserCacheCleanup: Removing user %s from cache due to timeout.\n", username);
/* the minus 1 accounts for the cache lock */
/*
- * $Id: cache_cf.cc,v 1.394 2001/10/19 22:34:48 hno Exp $
+ * $Id: cache_cf.cc,v 1.395 2001/10/24 05:46:26 hno Exp $
*
* DEBUG: section 3 Configuration File Parsing
* AUTHOR: Harvest Derived
* during reconfigure.
*/
fatalf("getpwnam failed to find userid for effective user '%s'",
- Config.effectiveUser,
- xstrerror());
+ Config.effectiveUser);
Config2.effectiveUserID = pwd->pw_uid;
Config2.effectiveGroupID = pwd->pw_gid;
}
struct group *grp = getgrnam(Config.effectiveGroup);
if (NULL == grp)
fatalf("getgrnam failed to find groupid for effective group '%s'",
- Config.effectiveGroup,
- xstrerror());
+ Config.effectiveGroup);
Config2.effectiveGroupID = grp->gr_gid;
}
urlExtMethodConfigure();
size = atoi(value);
if (reconfiguring && sd->max_objsize != size)
- debug(3, 1) ("Cache dir '%s' max object size now %d\n", size);
+ debug(3, 1) ("Cache dir '%s' max object size now %d\n", sd->path, size);
sd->max_objsize = size;
}
/*
- * $Id: client_side.cc,v 1.552 2001/10/24 02:25:08 hno Exp $
+ * $Id: client_side.cc,v 1.553 2001/10/24 05:46:27 hno Exp $
*
* DEBUG: section 33 Client-side Routines
* AUTHOR: Duane Wessels
callback(buf, 0, cbdata); /* Signal end of body */
return;
}
- debug(33, 2) ("clientReadBody: start fd=%d body_size=%d in.offset=%d cb=%p req=%p\n", conn->fd, conn->body.size_left, conn->in.offset, callback, request);
+ debug(33, 2) ("clientReadBody: start fd=%d body_size=%lu in.offset=%ld cb=%p req=%p\n", conn->fd, (unsigned long int)conn->body.size_left, (long int)conn->in.offset, callback, request);
conn->body.callback = callback;
conn->body.cbdata = cbdata;
conn->body.buf = buf;
CBCB *callback = conn->body.callback;
request_t *request = conn->body.request;
/* Note: request is null while eating "aborted" transfers */
- debug(33, 2) ("clientProcessBody: start fd=%d body_size=%d in.offset=%d cb=%p req=%p\n", conn->fd, conn->body.size_left, conn->in.offset, callback, request);
+ debug(33, 2) ("clientProcessBody: start fd=%d body_size=%lu in.offset=%ld cb=%p req=%p\n", conn->fd, (unsigned long int)conn->body.size_left, (long int)conn->in.offset, callback, request);
if (conn->in.offset) {
/* Some sanity checks... */
assert(conn->body.size_left > 0);
callback(buf, size, cbdata);
if (request != NULL)
requestUnlink(request); /* Linked in clientReadBody */
- debug(33, 2) ("clientProcessBody: end fd=%d size=%d body_size=%d in.offset=%d cb=%p req=%p\n", conn->fd, size, conn->body.size_left, conn->in.offset, callback, request);
+ debug(33, 2) ("clientProcessBody: end fd=%d size=%d body_size=%lu in.offset=%ld cb=%p req=%p\n", conn->fd, size, (unsigned long int)conn->body.size_left, (long int)conn->in.offset, callback, request);
}
}
clientReadBodyAbortHandler(char *buf, size_t size, void *data)
{
ConnStateData *conn = (ConnStateData *) data;
- debug(33, 2) ("clientReadBodyAbortHandler: fd=%d body_size=%d in.offset=%d\n", conn->fd, conn->body.size_left, conn->in.offset);
+ debug(33, 2) ("clientReadBodyAbortHandler: fd=%d body_size=%lu in.offset=%ld\n", conn->fd, (unsigned long int)conn->body.size_left, (long int)conn->in.offset);
if (size != 0 && conn->body.size_left != 0) {
debug(33, 3) ("clientReadBodyAbortHandler: fd=%d shedule next read\n", conn->fd);
conn->body.callback = clientReadBodyAbortHandler;