Changeset 1272
- Timestamp:
- 01/17/10 21:24:18 (14 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Distribution/doc/example/oscam.user
r852 r1272 40 40 caid = 0200 41 41 42 # user for group 3 without monitor access, only one connection possible, AU disabled 42 # user for group 3 without monitor access, only one connection possible, AU disabled, account disabled 43 43 44 44 [account] 45 45 user = user4 46 46 pwd = password4 47 disabled = 1 47 48 monlevel = 0 48 49 uniq = 1 -
trunk/Distribution/doc/man/oscam.user.5
r1070 r1272 112 112 .RE 113 113 .PP 114 \fBdisabled\fP = \fB0\fP|\fB1\fP 115 .RS 3n 116 1 = account disabled, default:0 117 .RE 118 .PP 114 119 \fBnumusers\fP = \fBquantity\fP \fI(only if anti-cascading enabled)\fR 115 120 .RS 3n -
trunk/Distribution/doc/txt/oscam.user.txt
r1070 r1272 86 86 expdate = 2002/12/22 87 87 88 disabled = 0|1 89 1 = account disabled, default:0 90 88 91 numusers = quantity (only if anti-cascading enabled) 89 92 anti-cascading: user per account, 0 = anti-cascading not permitted, -
trunk/globals.h
r1263 r1272 321 321 time_t lastecm; 322 322 time_t expirationdate; 323 int disabled; 323 324 ulong grp; 324 325 int crypted; … … 501 502 uchar dyndns[64]; 502 503 time_t expirationdate; 503 struct s_auth *next; 504 int disabled; 505 struct s_auth *next; 504 506 }; 505 507 -
trunk/oscam-config.c
r1241 r1272 746 746 if (!strcmp(token, "monlevel")) { account->monlvl=atoi(value); return; } 747 747 if (!strcmp(token, "caid")) { chk_caidtab(value, &account->ctab); return; } 748 if (!strcmp(token, "disabled")) { account->disabled=atoi(value); return; } 748 749 /* 749 750 * case insensitive … … 828 829 int init_userdb() 829 830 { 830 int tag=0, nr, nro, expired ;831 int tag=0, nr, nro, expired, disabled; 831 832 //int first=1; 832 833 FILE *fp; … … 889 890 fclose(fp); 890 891 891 for (expired=0, ptr=cfg->account; ptr;)892 for (expired=0, disabled=0, ptr=cfg->account; ptr;) 892 893 { 893 894 if(ptr->expirationdate && ptr->expirationdate<time(NULL)) expired++; 895 if(ptr->disabled != 0) disabled++; 894 896 ptr=ptr->next; 895 897 } 896 898 897 cs_log("userdb reloaded: %d accounts freed, %d accounts loaded, %d expired ", nro, nr, expired);899 cs_log("userdb reloaded: %d accounts freed, %d accounts loaded, %d expired, %d disabled", nro, nr, expired, disabled); 898 900 return(0); 899 901 } -
trunk/oscam.c
r1136 r1272 343 343 client[i].autoau = account->autoau; 344 344 client[i].expirationdate = account->expirationdate; 345 client[i].tosleep = (60*account->tosleep); 345 client[i].disabled = account->disabled; 346 client[i].tosleep = (60*account->tosleep); 346 347 client[i].monlvl = account->monlvl; 347 348 client[i].fchid = account->fchid; // CHID filters … … 1527 1528 static char *stxt[]={"found", "cache1", "cache2", "emu", 1528 1529 "not found", "timeout", "sleeping", 1529 "fake", "invalid", "corrupt", "no card", "expdate" };1530 "fake", "invalid", "corrupt", "no card", "expdate", "disabled"}; 1530 1531 static char *stxtEx[]={"", "group", "caid", "ident", "class", "chid", "queue", "peer"}; 1531 1532 static char *stxtWh[]={"", "user ", "reader ", "server ", "lserver "}; … … 1811 1812 if(client[cs_idx].expirationdate && client[cs_idx].expirationdate<client[cs_idx].lastecm) 1812 1813 er->rc=11; //expired 1814 if(client[cs_idx].disabled != 0) 1815 er->rc=12; //disabled 1813 1816 if ((client[cs_idx].tosleep) && 1814 1817 (now-client[cs_idx].lastswitch>client[cs_idx].tosleep))
Note:
See TracChangeset
for help on using the changeset viewer.