Bugzilla – Attachment 2116 Details for
Bug 1949
PermitOpen none option
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
PermitOpen None diff for native OpenSSH
permit_open_none.diff (text/plain), 2.50 KB, created by
Loganaden Velvindron
on 2011-12-08 06:03:12 AEDT
(
hide
)
Description:
PermitOpen None diff for native OpenSSH
Filename:
MIME Type:
Creator:
Loganaden Velvindron
Created:
2011-12-08 06:03:12 AEDT
Size:
2.50 KB
patch
obsolete
>Index: src/usr.bin/ssh/channels.c >=================================================================== >RCS file: /cvs/src/usr.bin/ssh/channels.c,v >retrieving revision 1.315 >diff -u -p -r1.315 channels.c >--- src/usr.bin/ssh/channels.c 23 Sep 2011 07:45:05 -0000 1.315 >+++ src/usr.bin/ssh/channels.c 7 Dec 2011 18:54:00 -0000 >@@ -3097,6 +3097,17 @@ channel_add_adm_permitted_opens(char *ho > } > > void >+channel_disable_adm_local_opens(void) >+{ >+ if (num_adm_permitted_opens == 0) { >+ permitted_adm_opens = xmalloc(sizeof(*permitted_adm_opens)); >+ permitted_adm_opens[num_adm_permitted_opens].host_to_connect >+ = NULL; >+ num_adm_permitted_opens = 1; >+ } >+} >+ >+void > channel_clear_permitted_opens(void) > { > int i; >@@ -3137,7 +3148,9 @@ channel_print_adm_permitted_opens(void) > return; > } > for (i = 0; i < num_adm_permitted_opens; i++) >- if (permitted_adm_opens[i].host_to_connect != NULL) >+ if (permitted_adm_opens[i].host_to_connect == NULL) >+ printf(" none"); >+ else > printf(" %s:%d", permitted_adm_opens[i].host_to_connect, > permitted_adm_opens[i].port_to_connect); > printf("\n"); >Index: src/usr.bin/ssh/channels.h >=================================================================== >RCS file: /cvs/src/usr.bin/ssh/channels.h,v >retrieving revision 1.109 >diff -u -p -r1.109 channels.h >--- src/usr.bin/ssh/channels.h 23 Sep 2011 07:45:05 -0000 1.109 >+++ src/usr.bin/ssh/channels.h 7 Dec 2011 18:54:00 -0000 >@@ -252,6 +252,7 @@ void channel_set_af(int af); > void channel_permit_all_opens(void); > void channel_add_permitted_opens(char *, int); > int channel_add_adm_permitted_opens(char *, int); >+void channel_disable_adm_local_opens(void); > void channel_update_permitted_opens(int, int); > void channel_clear_permitted_opens(void); > void channel_clear_adm_permitted_opens(void); >Index: src/usr.bin/ssh/servconf.c >=================================================================== >RCS file: /cvs/src/usr.bin/ssh/servconf.c,v >retrieving revision 1.223 >diff -u -p -r1.223 servconf.c >--- src/usr.bin/ssh/servconf.c 23 Sep 2011 00:22:04 -0000 1.223 >+++ src/usr.bin/ssh/servconf.c 7 Dec 2011 18:54:02 -0000 >@@ -1288,6 +1288,14 @@ process_server_config_line(ServerOptions > } > break; > } >+ if (strcmp(arg, "none") == 0) { >+ if (*activep && n == -1) { >+ channel_clear_adm_permitted_opens(); >+ options->num_permitted_opens = 1; >+ channel_disable_adm_local_opens(); >+ } >+ break; >+ } > if (*activep && n == -1) > channel_clear_adm_permitted_opens(); > for (; arg != NULL && *arg != '\0'; arg = strdelim(&cp)) {
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 1949
:
2104
|
2108
|
2111
|
2112
| 2116