aboutsummaryrefslogtreecommitdiff
path: root/security
diff options
context:
space:
mode:
authorCy Schubert <cy@FreeBSD.org>2004-10-28 22:33:41 +0000
committerCy Schubert <cy@FreeBSD.org>2004-10-28 22:33:41 +0000
commit7435ded5ba1ce482c78720425f39822596a36979 (patch)
tree78aa9e82ec2c6939a749f31842cb6c6699b81bb6 /security
parent8f15720c8451df633f2ee88bd58298c69a70342f (diff)
downloadports-7435ded5ba1ce482c78720425f39822596a36979.tar.gz
ports-7435ded5ba1ce482c78720425f39822596a36979.zip
Repair handling of ptys.
Notes
Notes: svn path=/head/; revision=120441
Diffstat (limited to 'security')
-rw-r--r--security/sudosh/Makefile1
-rw-r--r--security/sudosh/files/patch-src::sudosh.c42
-rw-r--r--security/sudosh2/Makefile1
-rw-r--r--security/sudosh2/files/patch-src::sudosh.c42
-rw-r--r--security/sudosh3/Makefile1
-rw-r--r--security/sudosh3/files/patch-src::sudosh.c42
6 files changed, 129 insertions, 0 deletions
diff --git a/security/sudosh/Makefile b/security/sudosh/Makefile
index 67496042c3ce..cd58476af25a 100644
--- a/security/sudosh/Makefile
+++ b/security/sudosh/Makefile
@@ -7,6 +7,7 @@
PORTNAME= sudosh
PORTVERSION= 1.4.1
+PORTREVISION= 1
CATEGORIES= security
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= ${PORTNAME:S/_/-/}
diff --git a/security/sudosh/files/patch-src::sudosh.c b/security/sudosh/files/patch-src::sudosh.c
new file mode 100644
index 000000000000..9f7d3a914cb3
--- /dev/null
+++ b/security/sudosh/files/patch-src::sudosh.c
@@ -0,0 +1,42 @@
+--- src/sudosh.c.orig Tue Oct 26 18:01:24 2004
++++ src/sudosh.c Thu Oct 28 15:18:50 2004
+@@ -75,6 +75,12 @@
+ #define SIGCHLD SIGCLD
+ #endif
+
++#ifdef __FreeBSD__
++#include <sys/types.h>
++#include <sys/ioctl.h>
++#include <libutil.h>
++#endif
++
+ static struct termios termorig;
+ static struct winsize winorig;
+
+@@ -377,15 +383,24 @@
+ {
+ if ((p->mfd = open ("/dev/ptc", O_RDWR)) == -1)
+ {
+- perror ("Cannot open cloning master pty");
+- return -1;
++#ifdef __FreeBSD__
++ if (openpty(&p->mfd, &p->sfd, sname, NULL, NULL) == -1)
++ {
++#endif
++ perror ("Cannot open cloning master pty");
++ return -1;
++#ifdef __FreeBSD__
++ }
++#endif
+ }
+ }
+
+ (void) unlockpt (p->mfd);
+ (void) grantpt (p->mfd);
+
++#ifndef __FreeBSD__
+ sname = (char *) ptsname (p->mfd);
++#endif
+
+ if ((p->sfd = open (sname, O_RDWR)) == -1)
+ {
diff --git a/security/sudosh2/Makefile b/security/sudosh2/Makefile
index 67496042c3ce..cd58476af25a 100644
--- a/security/sudosh2/Makefile
+++ b/security/sudosh2/Makefile
@@ -7,6 +7,7 @@
PORTNAME= sudosh
PORTVERSION= 1.4.1
+PORTREVISION= 1
CATEGORIES= security
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= ${PORTNAME:S/_/-/}
diff --git a/security/sudosh2/files/patch-src::sudosh.c b/security/sudosh2/files/patch-src::sudosh.c
new file mode 100644
index 000000000000..9f7d3a914cb3
--- /dev/null
+++ b/security/sudosh2/files/patch-src::sudosh.c
@@ -0,0 +1,42 @@
+--- src/sudosh.c.orig Tue Oct 26 18:01:24 2004
++++ src/sudosh.c Thu Oct 28 15:18:50 2004
+@@ -75,6 +75,12 @@
+ #define SIGCHLD SIGCLD
+ #endif
+
++#ifdef __FreeBSD__
++#include <sys/types.h>
++#include <sys/ioctl.h>
++#include <libutil.h>
++#endif
++
+ static struct termios termorig;
+ static struct winsize winorig;
+
+@@ -377,15 +383,24 @@
+ {
+ if ((p->mfd = open ("/dev/ptc", O_RDWR)) == -1)
+ {
+- perror ("Cannot open cloning master pty");
+- return -1;
++#ifdef __FreeBSD__
++ if (openpty(&p->mfd, &p->sfd, sname, NULL, NULL) == -1)
++ {
++#endif
++ perror ("Cannot open cloning master pty");
++ return -1;
++#ifdef __FreeBSD__
++ }
++#endif
+ }
+ }
+
+ (void) unlockpt (p->mfd);
+ (void) grantpt (p->mfd);
+
++#ifndef __FreeBSD__
+ sname = (char *) ptsname (p->mfd);
++#endif
+
+ if ((p->sfd = open (sname, O_RDWR)) == -1)
+ {
diff --git a/security/sudosh3/Makefile b/security/sudosh3/Makefile
index 67496042c3ce..cd58476af25a 100644
--- a/security/sudosh3/Makefile
+++ b/security/sudosh3/Makefile
@@ -7,6 +7,7 @@
PORTNAME= sudosh
PORTVERSION= 1.4.1
+PORTREVISION= 1
CATEGORIES= security
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= ${PORTNAME:S/_/-/}
diff --git a/security/sudosh3/files/patch-src::sudosh.c b/security/sudosh3/files/patch-src::sudosh.c
new file mode 100644
index 000000000000..9f7d3a914cb3
--- /dev/null
+++ b/security/sudosh3/files/patch-src::sudosh.c
@@ -0,0 +1,42 @@
+--- src/sudosh.c.orig Tue Oct 26 18:01:24 2004
++++ src/sudosh.c Thu Oct 28 15:18:50 2004
+@@ -75,6 +75,12 @@
+ #define SIGCHLD SIGCLD
+ #endif
+
++#ifdef __FreeBSD__
++#include <sys/types.h>
++#include <sys/ioctl.h>
++#include <libutil.h>
++#endif
++
+ static struct termios termorig;
+ static struct winsize winorig;
+
+@@ -377,15 +383,24 @@
+ {
+ if ((p->mfd = open ("/dev/ptc", O_RDWR)) == -1)
+ {
+- perror ("Cannot open cloning master pty");
+- return -1;
++#ifdef __FreeBSD__
++ if (openpty(&p->mfd, &p->sfd, sname, NULL, NULL) == -1)
++ {
++#endif
++ perror ("Cannot open cloning master pty");
++ return -1;
++#ifdef __FreeBSD__
++ }
++#endif
+ }
+ }
+
+ (void) unlockpt (p->mfd);
+ (void) grantpt (p->mfd);
+
++#ifndef __FreeBSD__
+ sname = (char *) ptsname (p->mfd);
++#endif
+
+ if ((p->sfd = open (sname, O_RDWR)) == -1)
+ {