updated on Thu Jan 19 20:01:47 UTC 2012
[aur-mirror.git] / mpcs / groups64.patch
blobd7f702476a44e7a6c1add0479cec80cb4a7da197
1 --- globals.h.orig 2009-01-23 12:31:12.000000000 +0200
2 +++ globals.h 2009-02-05 17:02:36.000000000 +0200
3 @@ -233,7 +233,7 @@
4 uchar cw[16];
5 ushort caid;
6 ulong prid;
7 - ulong grp;
8 + uint64_t grp;
9 // int level;
12 @@ -285,7 +285,7 @@
13 time_t lastswitch;
14 time_t lastemm;
15 time_t lastecm;
16 - ulong grp;
17 + uint64_t grp;
18 int crypted;
19 int dup;
20 int au;
21 @@ -332,7 +332,7 @@
23 int cs_idx;
24 int fd;
25 - ulong grp;
26 + uint64_t grp;
27 int fallback;
28 int typ;
29 int card_system;
30 @@ -421,7 +421,7 @@
31 int uniq;
32 int au;
33 int monlvl;
34 - ulong grp;
35 + uint64_t grp;
36 int tosleep;
37 CAIDTAB ctab;
38 ulong sidtabok; // positiv services
39 --- mpcs-config.c.orig 2008-12-04 18:31:34.000000000 +0200
40 +++ mpcs-config.c 2009-02-05 17:09:16.000000000 +0200
41 @@ -649,9 +649,9 @@
42 if (!strcmp(token, "group"))
43 for (ptr1=strtok(value, ","); ptr1; ptr1=strtok(NULL, ","))
45 - int g;
46 - g=atoi(ptr1);
47 - if ((g>0) && (g<33)) account->grp|=(1<<(g-1));
48 + uint64_t g;
49 + g=atol(ptr1);
50 + if ((g>0) && (g<=(sizeof(account->grp)*8))/*33*/) account->grp|=(1<<(g-1));
52 if(!strcmp(token, "services")) chk_services(value, &account->sidtabok, &account->sidtabno);
53 if(!strcmp(token, "ident")) chk_ftab(value, &account->ftab, "user", account->usr, "provid");
54 @@ -998,9 +998,9 @@
55 if (!strcmp(token, "group"))
56 for (ptr=strtok(value, ","); ptr; ptr=strtok(NULL, ","))
58 - int g;
59 - g=atoi(ptr);
60 - if ((g>0) && (g<33)) rdr->grp|=(1<<(g-1));
61 + uint64_t g;
62 + g=atol(ptr);
63 + if ((g>0) && (g<=(sizeof(rdr->grp)*8)/*33*/)) rdr->grp|=(1<<(g-1));
65 if (!strcmp(token, "emmcache"))
66 for (i=0, ptr=strtok(value, ","); (i<3)&&(ptr); ptr=strtok(NULL, ","), i++)
67 --- mpcs.c.orig 2009-01-22 00:06:20.000000000 +0200
68 +++ mpcs.c 2009-02-05 17:03:38.000000000 +0200
69 @@ -1046,7 +1046,7 @@
70 char *t_grant=" granted";
71 char *t_reject=" rejected";
72 char *t_msg[]= { buf, "invalid access", "invalid ip", "unknown reason" };
73 - client[cs_idx].grp=0xffffffff;
74 + client[cs_idx].grp=-1;//0xffffffff;
75 client[cs_idx].au=(-1);
76 switch((long)account)