diff options
Diffstat (limited to 'realrcptto.c')
| -rw-r--r-- | realrcptto.c | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/realrcptto.c b/realrcptto.c index 0f275ba..f5f6f15 100644 --- a/realrcptto.c +++ b/realrcptto.c | |||
| @@ -1,5 +1,6 @@ | |||
| 1 | #include <sys/types.h> | 1 | #include <sys/types.h> |
| 2 | #include <sys/stat.h> | 2 | #include <sys/stat.h> |
| 3 | #include <unistd.h> | ||
| 3 | #include <stdlib.h> | 4 | #include <stdlib.h> |
| 4 | #include <pwd.h> | 5 | #include <pwd.h> |
| 5 | #include <string.h> | 6 | #include <string.h> |
| @@ -19,7 +20,6 @@ | |||
| 19 | #include "env.h" | 20 | #include "env.h" |
| 20 | #include "slurpclose.h" | 21 | #include "slurpclose.h" |
| 21 | #include "control.h" | 22 | #include "control.h" |
| 22 | #include "readwrite.h" | ||
| 23 | 23 | ||
| 24 | extern void die_nomem(); | 24 | extern void die_nomem(); |
| 25 | extern void die_control(); | 25 | extern void die_control(); |
| @@ -50,6 +50,8 @@ static char remoteipbuf[64]=" "; | |||
| 50 | static int flagdenyall; | 50 | static int flagdenyall; |
| 51 | static int flagdenyany; | 51 | static int flagdenyany; |
| 52 | 52 | ||
| 53 | int realrcptto(char *addr, int depth); | ||
| 54 | |||
| 53 | void realrcptto_init() | 55 | void realrcptto_init() |
| 54 | { | 56 | { |
| 55 | char *x; | 57 | char *x; |
| @@ -276,16 +278,7 @@ int depth; | |||
| 276 | return 1; | 278 | return 1; |
| 277 | } | 279 | } |
| 278 | 280 | ||
| 279 | int realrcptto(addr, depth) | 281 | static int realrcptto_ex(addr, depth) |
| 280 | char *addr; | ||
| 281 | int depth; | ||
| 282 | { | ||
| 283 | env_unset("DTUSER"); | ||
| 284 | extension = NULL; | ||
| 285 | return realrcptto_ex(addr, depth); | ||
| 286 | } | ||
| 287 | |||
| 288 | int realrcptto_ex(addr, depth) | ||
| 289 | char *addr; | 282 | char *addr; |
| 290 | int depth; | 283 | int depth; |
| 291 | { | 284 | { |
| @@ -476,6 +469,15 @@ int depth; | |||
| 476 | } | 469 | } |
| 477 | } | 470 | } |
| 478 | 471 | ||
| 472 | int realrcptto(addr, depth) | ||
| 473 | char *addr; | ||
| 474 | int depth; | ||
| 475 | { | ||
| 476 | env_unset("DTUSER"); | ||
| 477 | extension = NULL; | ||
| 478 | return realrcptto_ex(addr, depth); | ||
| 479 | } | ||
| 480 | |||
| 479 | int realrcptto_deny() | 481 | int realrcptto_deny() |
| 480 | { | 482 | { |
| 481 | return flagdenyall && flagdenyany; | 483 | return flagdenyall && flagdenyany; |
