]>
Commit | Line | Data |
---|---|---|
1e601ece AM |
1 | diff -urN fwtk.orig/ftp-gw/ftp-gw.c fwtk/ftp-gw/ftp-gw.c |
2 | --- fwtk.orig/ftp-gw/ftp-gw.c Fri Jul 9 12:43:53 1999 | |
3 | +++ fwtk/ftp-gw/ftp-gw.c Fri Jul 9 12:44:02 1999 | |
4 | @@ -1746,8 +1746,8 @@ | |
5 | } | |
6 | ||
7 | if(extendperm && (op->flg & OP_XTND)) { | |
8 | - msg_int = auth_perm(confp,authuser,"ftp-gw",riaddr,tokav[0]); | |
9 | - if(msg_int == 1 || msg_int == 0) { | |
10 | + msg_int = auth_perm(confp,authuser,"ftp-gw",riaddr,tokav); | |
11 | + if(msg_int == 1 || msg_int == -1) { | |
12 | sprintf(mbuf,"Permission denied for operation"); | |
13 | syslog(LLEV,"deny host=%.512s/%.20s operation %.100s - extended permissions",rladdr,riaddr,buf); | |
14 | say(0,mbuf); | |
15 | diff -urN fwtk.orig/http-gw/http-gw.c fwtk/http-gw/http-gw.c | |
16 | --- fwtk.orig/http-gw/http-gw.c Fri Jul 9 12:43:54 1999 | |
17 | +++ fwtk/http-gw/http-gw.c Fri Jul 9 12:44:02 1999 | |
18 | @@ -2320,6 +2320,14 @@ | |
19 | seek_and_destroy(value); | |
20 | ||
21 | /* Quote at end removed to avoid double write*/ | |
22 | + if (*value == '"' || *value == '\'') { | |
23 | + /* leave single quote intact */ | |
24 | + if (strlen(value) > 1) { | |
25 | + char *p2 = value + strlen(value) - 1; | |
26 | + if (*value == *p2) *p2 = 0; | |
27 | + } | |
28 | + } | |
29 | + | |
30 | p = value + strlen(value) - 1; | |
31 | if ((*p == '"') || (*p == '\'')) *p = 0; | |
32 | ||
33 | diff -urN fwtk.orig/smap/smap.c fwtk/smap/smap.c | |
34 | --- fwtk.orig/smap/smap.c Fri Jul 9 12:43:53 1999 | |
35 | +++ fwtk/smap/smap.c Fri Jul 9 12:44:02 1999 | |
36 | @@ -369,6 +369,11 @@ | |
37 | q += 3; | |
38 | while(isspace(*q)) | |
39 | q++; | |
40 | + if(q == (char *)0) { | |
41 | + printf("501 Syntax error\r\n"); | |
42 | + fflush(stdout); | |
43 | + continue; | |
44 | + } | |
45 | #ifdef SPECIALDOMAIN | |
46 | if(!checkvalid(q)) { | |
47 | syslog(LLEV,"securityalert: rejecting recip %.512s",q); | |
48 | diff -urN fwtk.orig/smapd/smapd.c fwtk/smapd/smapd.c | |
49 | --- fwtk.orig/smapd/smapd.c Fri Jul 9 12:43:53 1999 | |
50 | +++ fwtk/smapd/smapd.c Fri Jul 9 12:44:02 1999 | |
51 | @@ -493,7 +493,7 @@ | |
52 | ||
53 | i = 0; | |
54 | faka[i++] = smailprog; | |
55 | - faka[i++] = "-f"; | |
56 | + faka[i++] = "-if"; | |
57 | faka[i++] = fromaddr; | |
58 | ||
59 | while(nrec != (struct towho *)0) { | |
60 | diff -urN fwtk.orig/x-gw/sig.c fwtk/x-gw/sig.c | |
61 | --- fwtk.orig/x-gw/sig.c Fri Jul 9 12:43:54 1999 | |
62 | +++ fwtk/x-gw/sig.c Fri Jul 9 12:44:02 1999 | |
63 | @@ -83,13 +83,21 @@ | |
64 | { | |
65 | int ret; | |
66 | list_t *p=pidlist; | |
67 | + list_t *ptemp; /* Define a temporary pointer to list_t */ | |
68 | ||
69 | while(p) { | |
70 | if( (ret=handle_sigpid(p->id))>= -1 && cb) | |
71 | ret=cb(p->id,data,ret); | |
72 | - if( ret>= -1) | |
73 | + if( ret>= -1) { | |
74 | + /* Assign the next pid to ptemp even if it's NULL */ | |
75 | + ptemp=p->next; | |
76 | + /* Now we can call deleteListItem and free memory for p */ | |
77 | pidlist=(list_t*)deleteListItem(pidlist,p->id); | |
78 | - p=p->next; | |
79 | + /* Now we put the next pid value into memory location p */ | |
80 | + p=ptemp; | |
81 | + } else { /* If child pid still active and has not died then do this */ | |
82 | + p=p->next; | |
83 | + } | |
84 | } | |
85 | return pidlist; | |
86 | } |