"limit" support in authcache to bind sessions to ip

This commit is contained in:
z3APA3A committed 2019-08-21 15:20:43 +03:00
1 parent 336b411ea2
commit e7e7d2fddf
5 files changed
+33 -8

No files matched your search

+1
View File
@@ -1338,6 +1338,7 @@ static int h_authcache(int argc, unsigned char **argv){
if(strstr((char *) *(argv + 1), "ip")) conf.authcachetype |= 1;
if(strstr((char *) *(argv + 1), "user")) conf.authcachetype |= 2;
if(strstr((char *) *(argv + 1), "pass")) conf.authcachetype |= 4;
if(strstr((char *) *(argv + 1), "limit")) conf.authcachetype |= 8;
if(argc > 2) conf.authcachetime = (unsigned) atoi((char *) *(argv + 2));
if(!conf.authcachetype) conf.authcachetype = 6;
if(!conf.authcachetime) conf.authcachetime = 600;