/*
- * $Id: acl.cc,v 1.192 1999/01/11 22:54:15 wessels Exp $
+ * $Id: acl.cc,v 1.193 1999/01/12 23:38:35 wessels Exp $
*
* DEBUG: section 28 Access Control
* AUTHOR: Duane Wessels
break;
#if SQUID_SNMP
case ACL_SNMP_COMMUNITY:
- aclParseWordList(&A->data);
+ aclParseWordList(&A->data);
break;
-#endif
+#endif
#if USE_ARP_ACL
case ACL_SRC_ARP:
aclParseArpList(&A->data);
aclIsProxyAuth(const char *name)
{
acl *a = aclFindByName(name);
- if (a)
+ if (a)
return a->type == ACL_PROXY_AUTH;
return 0;
}
*/
static int
-aclMatchProxyAuth(wordlist * data, const char * proxy_auth, acl_proxy_auth_user * auth_user, aclCheck_t * checklist)
+aclMatchProxyAuth(wordlist * data, const char *proxy_auth, acl_proxy_auth_user * auth_user, aclCheck_t * checklist)
{
/* checklist is used to register user name when identified, nothing else */
LOCAL_ARRAY(char, login_buf, USER_IDENT_SZ);
* be restricted the functions that deal with the authenticator.
*/
assert(auth_user == checklist->auth_user);
- checklist->auth_user = NULL; /* get rid of that special reference */
+ checklist->auth_user = NULL; /* get rid of that special reference */
/* Check result from external validation */
if (auth_user->passwd_ok != 1) {
/* password was checked but did not match */
/* Continue checking below, as normal */
}
}
-
/* see if we already know this user */
auth_user = hash_lookup(proxy_auth_cache, user);
debug(28, 4) ("aclMatchProxyAuth: user '%s' not yet known\n", user);
return -1;
} else if ((0 == strcmp(auth_user->passwd, password)) &&
- (auth_user->expiretime > current_time.tv_sec)) {
+ (auth_user->expiretime > current_time.tv_sec)) {
/* user already known and valid */
debug(28, 5) ("aclMatchProxyAuth: user '%s' previously validated\n",
user);
if (!r->flags.accelerated) {
/* Proxy authorization on proxy requests */
header = httpHeaderGetStr(&checklist->request->header,
- HDR_PROXY_AUTHORIZATION);
+ HDR_PROXY_AUTHORIZATION);
} else if (r->flags.internal) {
/* WWW authorization on accelerated internal requests */
header = httpHeaderGetStr(&checklist->request->header,
- HDR_AUTHORIZATION);
+ HDR_AUTHORIZATION);
} else {
#if AUTH_ON_ACCELERATION
/* WWW authorization on accelerated requests */
header = httpHeaderGetStr(&checklist->request->header,
- HDR_AUTHORIZATION);
+ HDR_AUTHORIZATION);
#else
debug(28, 1) ("aclMatchAcl: proxy_auth %s not applicable on accelerated requests.\n", ae->name);
return -1;
*/
r->flags.used_proxy_auth = 1;
/* Check the password */
- switch (aclMatchProxyAuth(ae->data,
- header,
- checklist->auth_user,
- checklist)) {
+ switch (aclMatchProxyAuth(ae->data,
+ header,
+ checklist->auth_user,
+ checklist)) {
case 0:
/* Correct password, but was not allowed in this ACL */
return 0;
/*
- * $Id: snmp_core.cc,v 1.25 1999/01/11 21:55:40 wessels Exp $
+ * $Id: snmp_core.cc,v 1.26 1999/01/12 23:38:37 wessels Exp $
*
* DEBUG: section 49 SNMP support
* AUTHOR: Glenn Chisholm
debug(49, 5) ("snmpDecodePacket: Called.\n");
/* Now that we have the data, turn it into a PDU */
PDU = snmp_pdu_create(0);
- Session.Version = SNMP_VERSION_1;
+ Session.Version = SNMP_VERSION_1;
Community = snmp_parse(&Session, PDU, buf, len);
checklist.src_addr = rq->from.sin_addr;