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

Function h_auth

src/conf.c:461–483  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

459}
460
461static int h_auth(int argc, unsigned char **argv){
462 struct auth *au, * newau;
463
464 freeauth(conf.authfuncs);
465 conf.authfuncs = NULL;
466 if(!conf.bandlimfunc)conf.bandlimfunc = bandlimitfunc;
467 for(argc--; argc; argc--){
468 for(au = authfuncs; au; au=au->next){
469 if(!strcmp((char *)argv[argc], au->desc)){
470 newau = myalloc(sizeof(struct auth));
471 newau->next = conf.authfuncs;
472 conf.authfuncs = newau;
473 conf.authfuncs->desc = au->desc;
474 conf.authfuncs->authenticate = au->authenticate;
475 conf.authfuncs->authorize = au->authorize;
476 break;
477 }
478 }
479 if(!au) return 1;
480 }
481 conf.authfunc = doauth;
482 return 0;
483}
484
485static int h_users(int argc, unsigned char **argv){
486 int j;

Callers 1

freeconfFunction · 0.85

Calls 2

freeauthFunction · 0.85
myallocFunction · 0.85

Tested by

no test coverage detected