|
Lines 138-143
static int num_adm_permitted_opens = 0;
Link Here
|
| 138 |
/* special-case port number meaning allow any port */ |
138 |
/* special-case port number meaning allow any port */ |
| 139 |
#define FWD_PERMIT_ANY_PORT 0 |
139 |
#define FWD_PERMIT_ANY_PORT 0 |
| 140 |
|
140 |
|
|
|
141 |
/* special-case wildcard meaning allow any host */ |
| 142 |
#define FWD_PERMIT_ANY_HOST "*" |
| 143 |
|
| 141 |
/* |
144 |
/* |
| 142 |
* If this is true, all opens are permitted. This is the case on the server |
145 |
* If this is true, all opens are permitted. This is the case on the server |
| 143 |
* on which we have to trust the client anyway, and the user could do |
146 |
* on which we have to trust the client anyway, and the user could do |
|
Lines 3298-3304
open_match(ForwardPermission *allowed_open, const char *requestedhost,
Link Here
|
| 3298 |
if (allowed_open->port_to_connect != FWD_PERMIT_ANY_PORT && |
3301 |
if (allowed_open->port_to_connect != FWD_PERMIT_ANY_PORT && |
| 3299 |
allowed_open->port_to_connect != requestedport) |
3302 |
allowed_open->port_to_connect != requestedport) |
| 3300 |
return 0; |
3303 |
return 0; |
| 3301 |
if (strcmp(allowed_open->host_to_connect, requestedhost) != 0) |
3304 |
if (strcmp(allowed_open->host_to_connect, FWD_PERMIT_ANY_HOST) != 0 && |
|
|
3305 |
strcmp(allowed_open->host_to_connect, requestedhost) != 0) |
| 3302 |
return 0; |
3306 |
return 0; |
| 3303 |
return 1; |
3307 |
return 1; |
| 3304 |
} |
3308 |
} |