Bugzilla – Attachment 2826 Details for
Bug 2582
[PATCH] Allow PermitOpen to use a wildcard hostname with a fixed port
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch for PermitOpen hostname wildcard feature
openssh-PermitOpen-wildcard-host.diff (text/plain), 1.06 KB, created by
AG
on 2016-06-06 07:18:12 AEST
(
hide
)
Description:
Patch for PermitOpen hostname wildcard feature
Filename:
MIME Type:
Creator:
AG
Created:
2016-06-06 07:18:12 AEST
Size:
1.06 KB
patch
obsolete
>diff --git a/channels.c b/channels.c >index 7ee1f98..ba0d728 100644 >--- a/channels.c >+++ b/channels.c >@@ -138,6 +138,9 @@ static int num_adm_permitted_opens = 0; > /* special-case port number meaning allow any port */ > #define FWD_PERMIT_ANY_PORT 0 > >+/* special-case port number meaning allow any host */ >+#define FWD_PERMIT_ANY_HOST "*" >+ > /* > * If this is true, all opens are permitted. This is the case on the server > * on which we have to trust the client anyway, and the user could do >@@ -3296,10 +3299,13 @@ open_match(ForwardPermission *allowed_open, const char *requestedhost, > if (allowed_open->host_to_connect == NULL) > return 0; > if (allowed_open->port_to_connect != FWD_PERMIT_ANY_PORT && >- allowed_open->port_to_connect != requestedport) >- return 0; >- if (strcmp(allowed_open->host_to_connect, requestedhost) != 0) >- return 0; >+ allowed_open->port_to_connect != requestedport) >+ return 0; >+ >+ if (strcmp(allowed_open->host_to_connect, FWD_PERMIT_ANY_HOST) != 0 && >+ strcmp(allowed_open->host_to_connect, requestedhost) != 0) >+ return 0; >+ > return 1; > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 2582
: 2826 |
2834
|
2845