]> git.ipfire.org Git - people/ms/ipfire-2.x.git/blob
33732deea10f977120305aea28bcb0ec4824248b
[people/ms/ipfire-2.x.git] /
1 --- a/src/sg.l Sat Jan 30 13:51:12 2016
2 +++ b/src/sg.l Sat Jan 30 14:01:28 2016
3 @@ -23,6 +23,8 @@
4
5 %}
6
7 +%option noinput
8 +%option nounput
9 ignore [,\t\r ]+
10 s [\t ]
11 d [0-9]
12 --- a/src/sg.y.in Sat Jan 30 13:52:26 2016
13 +++ b/src/sg.y.in Sat Jan 30 14:00:50 2016
14 @@ -26,6 +26,7 @@
15
16 #ifdef HAVE_LIBLDAP
17 #include "lber.h"
18 +#define LDAP_DEPRECATED 1
19 #include "ldap.h"
20 #endif
21
22 @@ -1097,7 +1098,6 @@
23 foundip = 1;
24 unblockedip = 1;
25 if(s->ipquota.seconds != 0){
26 - struct IpInfo uq;
27 time_t t = time(NULL) + globalDebugTimeDelta;
28 sgLogError("status %d time %d lasttime %d consumed %d", ipquota->status, ipquota->time, ipquota->last, ipquota->consumed);
29 sgLogError("renew %d seconds %d", s->ipquota.renew, s->ipquota.seconds);
30 @@ -1157,7 +1157,6 @@
31 founduser = 1;
32 unblockeduser = 1;
33 if(s->userquota.seconds != 0){
34 - struct UserInfo uq;
35 time_t t = time(NULL) + globalDebugTimeDelta;
36 //sgLogError("status %d time %d lasttime %d consumed %d", userquota->status, userquota->time, userquota->last, userquota->consumed);
37 //sgLogError("renew %d seconds %d", s->userquota.renew, s->userquota.seconds);
38 --- a/src/sgDiv.c.in Sat Jan 30 13:52:10 2016
39 +++ b/src/sgDiv.c.in Sat Jan 30 13:59:16 2016
40 @@ -18,6 +18,7 @@
41
42 #include "sg.h"
43 #include "sgEx.h"
44 +#include "HTEscape.h"
45
46 /* #define METEST 8; */
47
48 @@ -692,7 +693,7 @@
49 struct UserInfo *userquota;
50 if(defined(s->userDb, req->ident, (char **) &userquota) == 1){
51 char qbuf[150];
52 - sprintf(qbuf, "%d-%d-%d-%d-%d-%d", s->userquota.renew, s->userquota.seconds, userquota->status, userquota->time, userquota->last, userquota->consumed);
53 + sprintf(qbuf, "%d-%d-%d-%d-%d-%d", s->userquota.renew, (int)s->userquota.seconds, userquota->status, (int)userquota->time, (int)userquota->last, userquota->consumed);
54 strcat(buf, qbuf);
55 } else {
56 strcat(buf, "noquota");