aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorache <ache@FreeBSD.org>1996-11-12 08:13:38 +0800
committerache <ache@FreeBSD.org>1996-11-12 08:13:38 +0800
commit9af21648cf26d849dbcdbe58d4e2c3495fa2cef1 (patch)
treef4ae604b4a671e600513583b82d52b4aa47d91dc
parentd36efc03dcf382653fe01d94dee45d91c1ce5cd2 (diff)
downloadfreebsd-ports-gnome-9af21648cf26d849dbcdbe58d4e2c3495fa2cef1.tar.gz
freebsd-ports-gnome-9af21648cf26d849dbcdbe58d4e2c3495fa2cef1.tar.zst
freebsd-ports-gnome-9af21648cf26d849dbcdbe58d4e2c3495fa2cef1.zip
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
-rw-r--r--security/ssh/files/patch-af19
-rw-r--r--security/ssh2/files/patch-af19
2 files changed, 38 insertions, 0 deletions
diff --git a/security/ssh/files/patch-af b/security/ssh/files/patch-af
new file mode 100644
index 000000000000..1534ce2649fa
--- /dev/null
+++ b/security/ssh/files/patch-af
@@ -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;
+
diff --git a/security/ssh2/files/patch-af b/security/ssh2/files/patch-af
new file mode 100644
index 000000000000..1534ce2649fa
--- /dev/null
+++ b/security/ssh2/files/patch-af
@@ -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;
+