MCPcopy Create free account
hub / github.com/3proxy/3proxy / checkACL

Function checkACL

src/auth.c:604–630  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

602}
603
604int checkACL(struct clientparam * param){
605 struct ace* acentry;
606
607 if(!param->srv->acl) {
608 return alwaysauth(param);
609 }
610 for(acentry = param->srv->acl; acentry; acentry = acentry->next) {
611 if(ACLmatches(acentry, param)) {
612 param->nolog = acentry->nolog;
613 param->weight = acentry->weight;
614 if(acentry->action == 2) {
615 struct ace dup;
616
617 if(param->operation < 256 && !(param->operation & CONNECT)){
618 continue;
619 }
620 if(param->redirected && acentry->chains && SAISNULL(&acentry->chains->addr) && !*SAPORT(&acentry->chains->addr)) {
621 continue;
622 }
623 dup = *acentry;
624 return handleredirect(param, &dup);
625 }
626 return acentry->action;
627 }
628 }
629 return 3;
630}
631
632struct authcache {
633 char * username;

Callers 2

threadfuncFunction · 0.85
ipauthFunction · 0.85

Calls 3

alwaysauthFunction · 0.85
ACLmatchesFunction · 0.85
handleredirectFunction · 0.85

Tested by

no test coverage detected