mirror of
https://git.FreeBSD.org/ports.git
synced 2024-10-21 20:38:45 +00:00
Use BSD naming convention for pty names, it fixes two problems:
1) Too many false open syscalls on pty allocation 2) (more serious) ssh not use about half of available ptys
This commit is contained in:
parent
c2eaa16214
commit
a13d148e44
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=4412
19
security/ssh/files/patch-af
Normal file
19
security/ssh/files/patch-af
Normal file
@ -0,0 +1,19 @@
|
||||
*** pty.c.bak Fri Oct 4 17:00:42 1996
|
||||
--- pty.c Tue Nov 12 03:00:54 1996
|
||||
***************
|
||||
*** 306,314 ****
|
||||
--- 306,319 ----
|
||||
#else /* not SCO UNIX */
|
||||
char buf[64];
|
||||
int i;
|
||||
+ #ifdef __FreeBSD__
|
||||
+ const char *ptymajors = "pqrsPQRS";
|
||||
+ const char *ptyminors = "0123456789abcdefghijklmnopqrstuv";
|
||||
+ #else
|
||||
const char *ptymajors =
|
||||
"pqrstuvwxyzabcdefghijklmnoABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
||||
const char *ptyminors = "0123456789abcdef";
|
||||
+ #endif
|
||||
int num_minors = strlen(ptyminors);
|
||||
int num_ptys = strlen(ptymajors) * num_minors;
|
||||
|
19
security/ssh2/files/patch-af
Normal file
19
security/ssh2/files/patch-af
Normal file
@ -0,0 +1,19 @@
|
||||
*** pty.c.bak Fri Oct 4 17:00:42 1996
|
||||
--- pty.c Tue Nov 12 03:00:54 1996
|
||||
***************
|
||||
*** 306,314 ****
|
||||
--- 306,319 ----
|
||||
#else /* not SCO UNIX */
|
||||
char buf[64];
|
||||
int i;
|
||||
+ #ifdef __FreeBSD__
|
||||
+ const char *ptymajors = "pqrsPQRS";
|
||||
+ const char *ptyminors = "0123456789abcdefghijklmnopqrstuv";
|
||||
+ #else
|
||||
const char *ptymajors =
|
||||
"pqrstuvwxyzabcdefghijklmnoABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
||||
const char *ptyminors = "0123456789abcdef";
|
||||
+ #endif
|
||||
int num_minors = strlen(ptyminors);
|
||||
int num_ptys = strlen(ptymajors) * num_minors;
|
||||
|
Loading…
Reference in New Issue
Block a user