aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcy <cy@FreeBSD.org>2007-01-06 06:31:58 +0800
committercy <cy@FreeBSD.org>2007-01-06 06:31:58 +0800
commit07bebb240c55d9e5dbc52092e231948ecda278ab (patch)
treec7cf1c6699c7fc66338bdb06625654f522e0a641
parenta9fc7c75e4f8c90367193841289d18bbb93324aa (diff)
downloadfreebsd-ports-gnome-07bebb240c55d9e5dbc52092e231948ecda278ab.tar.gz
freebsd-ports-gnome-07bebb240c55d9e5dbc52092e231948ecda278ab.tar.zst
freebsd-ports-gnome-07bebb240c55d9e5dbc52092e231948ecda278ab.zip
ptsname(3) is supported under FreeBSD 5.X and up.
Submitted by: jkim
-rw-r--r--security/sudosh/Makefile2
-rw-r--r--security/sudosh/files/patch-src::sudosh.c16
-rw-r--r--security/sudosh2/Makefile2
-rw-r--r--security/sudosh2/files/patch-src::sudosh.c16
-rw-r--r--security/sudosh3/Makefile2
-rw-r--r--security/sudosh3/files/patch-src::sudosh.c16
6 files changed, 24 insertions, 30 deletions
diff --git a/security/sudosh/Makefile b/security/sudosh/Makefile
index 06ed10922bbd..1ee670dc6228 100644
--- a/security/sudosh/Makefile
+++ b/security/sudosh/Makefile
@@ -7,7 +7,7 @@
PORTNAME= sudosh
PORTVERSION= 1.8.2
-PORTREVISION= 3
+PORTREVISION= 4
CATEGORIES= security
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE_EXTENDED}
MASTER_SITE_SUBDIR= ${PORTNAME:S/_/-/}
diff --git a/security/sudosh/files/patch-src::sudosh.c b/security/sudosh/files/patch-src::sudosh.c
index 7f6da6fe8f0e..0c79a345cfc4 100644
--- a/security/sudosh/files/patch-src::sudosh.c
+++ b/security/sudosh/files/patch-src::sudosh.c
@@ -1,5 +1,5 @@
--- src/sudosh.c.orig Sun Jun 12 19:35:07 2005
-+++ src/sudosh.c Thu Jan 4 08:29:43 2007
++++ src/sudosh.c Fri Jan 5 14:14:05 2007
@@ -28,6 +28,13 @@
#define WRITE(a, b, c) do_write(a, b, c, __FILE__, __LINE__)
@@ -14,7 +14,7 @@
static struct termios termorig;
static struct winsize winorig;
-@@ -545,19 +552,45 @@
+@@ -545,19 +552,43 @@
{
char *sname;
@@ -52,15 +52,13 @@
+#if !defined(__FreeBSD_version) || (defined(__FreeBSD_version) && __FreeBSD_version >= 500000)
(void) unlockpt (p->mfd);
(void) grantpt (p->mfd);
-+#endif
-+#ifndef __FreeBSD__
sname = (char *) ptsname (p->mfd);
+#endif
if ((p->sfd = open (sname, O_RDWR)) == -1)
{
-@@ -619,9 +652,14 @@
+@@ -619,9 +650,14 @@
for (i = 3; i < 100; ++i)
close (i);
@@ -75,7 +73,7 @@
(void) ioctl (0, TIOCSWINSZ, &winorig);
setuid (getuid ());
-@@ -663,6 +701,13 @@
+@@ -663,6 +699,13 @@
{
static struct termios termnew;
@@ -89,7 +87,7 @@
#ifdef TCGETS
if (ioctl (ttyfd, TCGETS, &termorig) == -1)
{
-@@ -670,6 +715,7 @@
+@@ -670,6 +713,7 @@
exit (EXIT_FAILURE);
}
#endif
@@ -97,7 +95,7 @@
if (ioctl (ttyfd, TIOCGWINSZ, &winorig) == -1)
{
-@@ -677,6 +723,11 @@
+@@ -677,6 +721,11 @@
exit (EXIT_FAILURE);
}
@@ -109,7 +107,7 @@
termnew.c_cc[VEOF] = 1;
termnew.c_iflag = BRKINT | ISTRIP | IXON | IXANY;
termnew.c_oflag = 0;
-@@ -686,13 +737,19 @@
+@@ -686,13 +735,19 @@
#ifdef TCSETS
(void) ioctl (ttyfd, TCSETS, &termnew);
#endif
diff --git a/security/sudosh2/Makefile b/security/sudosh2/Makefile
index 06ed10922bbd..1ee670dc6228 100644
--- a/security/sudosh2/Makefile
+++ b/security/sudosh2/Makefile
@@ -7,7 +7,7 @@
PORTNAME= sudosh
PORTVERSION= 1.8.2
-PORTREVISION= 3
+PORTREVISION= 4
CATEGORIES= security
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE_EXTENDED}
MASTER_SITE_SUBDIR= ${PORTNAME:S/_/-/}
diff --git a/security/sudosh2/files/patch-src::sudosh.c b/security/sudosh2/files/patch-src::sudosh.c
index 7f6da6fe8f0e..0c79a345cfc4 100644
--- a/security/sudosh2/files/patch-src::sudosh.c
+++ b/security/sudosh2/files/patch-src::sudosh.c
@@ -1,5 +1,5 @@
--- src/sudosh.c.orig Sun Jun 12 19:35:07 2005
-+++ src/sudosh.c Thu Jan 4 08:29:43 2007
++++ src/sudosh.c Fri Jan 5 14:14:05 2007
@@ -28,6 +28,13 @@
#define WRITE(a, b, c) do_write(a, b, c, __FILE__, __LINE__)
@@ -14,7 +14,7 @@
static struct termios termorig;
static struct winsize winorig;
-@@ -545,19 +552,45 @@
+@@ -545,19 +552,43 @@
{
char *sname;
@@ -52,15 +52,13 @@
+#if !defined(__FreeBSD_version) || (defined(__FreeBSD_version) && __FreeBSD_version >= 500000)
(void) unlockpt (p->mfd);
(void) grantpt (p->mfd);
-+#endif
-+#ifndef __FreeBSD__
sname = (char *) ptsname (p->mfd);
+#endif
if ((p->sfd = open (sname, O_RDWR)) == -1)
{
-@@ -619,9 +652,14 @@
+@@ -619,9 +650,14 @@
for (i = 3; i < 100; ++i)
close (i);
@@ -75,7 +73,7 @@
(void) ioctl (0, TIOCSWINSZ, &winorig);
setuid (getuid ());
-@@ -663,6 +701,13 @@
+@@ -663,6 +699,13 @@
{
static struct termios termnew;
@@ -89,7 +87,7 @@
#ifdef TCGETS
if (ioctl (ttyfd, TCGETS, &termorig) == -1)
{
-@@ -670,6 +715,7 @@
+@@ -670,6 +713,7 @@
exit (EXIT_FAILURE);
}
#endif
@@ -97,7 +95,7 @@
if (ioctl (ttyfd, TIOCGWINSZ, &winorig) == -1)
{
-@@ -677,6 +723,11 @@
+@@ -677,6 +721,11 @@
exit (EXIT_FAILURE);
}
@@ -109,7 +107,7 @@
termnew.c_cc[VEOF] = 1;
termnew.c_iflag = BRKINT | ISTRIP | IXON | IXANY;
termnew.c_oflag = 0;
-@@ -686,13 +737,19 @@
+@@ -686,13 +735,19 @@
#ifdef TCSETS
(void) ioctl (ttyfd, TCSETS, &termnew);
#endif
diff --git a/security/sudosh3/Makefile b/security/sudosh3/Makefile
index 06ed10922bbd..1ee670dc6228 100644
--- a/security/sudosh3/Makefile
+++ b/security/sudosh3/Makefile
@@ -7,7 +7,7 @@
PORTNAME= sudosh
PORTVERSION= 1.8.2
-PORTREVISION= 3
+PORTREVISION= 4
CATEGORIES= security
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE_EXTENDED}
MASTER_SITE_SUBDIR= ${PORTNAME:S/_/-/}
diff --git a/security/sudosh3/files/patch-src::sudosh.c b/security/sudosh3/files/patch-src::sudosh.c
index 7f6da6fe8f0e..0c79a345cfc4 100644
--- a/security/sudosh3/files/patch-src::sudosh.c
+++ b/security/sudosh3/files/patch-src::sudosh.c
@@ -1,5 +1,5 @@
--- src/sudosh.c.orig Sun Jun 12 19:35:07 2005
-+++ src/sudosh.c Thu Jan 4 08:29:43 2007
++++ src/sudosh.c Fri Jan 5 14:14:05 2007
@@ -28,6 +28,13 @@
#define WRITE(a, b, c) do_write(a, b, c, __FILE__, __LINE__)
@@ -14,7 +14,7 @@
static struct termios termorig;
static struct winsize winorig;
-@@ -545,19 +552,45 @@
+@@ -545,19 +552,43 @@
{
char *sname;
@@ -52,15 +52,13 @@
+#if !defined(__FreeBSD_version) || (defined(__FreeBSD_version) && __FreeBSD_version >= 500000)
(void) unlockpt (p->mfd);
(void) grantpt (p->mfd);
-+#endif
-+#ifndef __FreeBSD__
sname = (char *) ptsname (p->mfd);
+#endif
if ((p->sfd = open (sname, O_RDWR)) == -1)
{
-@@ -619,9 +652,14 @@
+@@ -619,9 +650,14 @@
for (i = 3; i < 100; ++i)
close (i);
@@ -75,7 +73,7 @@
(void) ioctl (0, TIOCSWINSZ, &winorig);
setuid (getuid ());
-@@ -663,6 +701,13 @@
+@@ -663,6 +699,13 @@
{
static struct termios termnew;
@@ -89,7 +87,7 @@
#ifdef TCGETS
if (ioctl (ttyfd, TCGETS, &termorig) == -1)
{
-@@ -670,6 +715,7 @@
+@@ -670,6 +713,7 @@
exit (EXIT_FAILURE);
}
#endif
@@ -97,7 +95,7 @@
if (ioctl (ttyfd, TIOCGWINSZ, &winorig) == -1)
{
-@@ -677,6 +723,11 @@
+@@ -677,6 +721,11 @@
exit (EXIT_FAILURE);
}
@@ -109,7 +107,7 @@
termnew.c_cc[VEOF] = 1;
termnew.c_iflag = BRKINT | ISTRIP | IXON | IXANY;
termnew.c_oflag = 0;
-@@ -686,13 +737,19 @@
+@@ -686,13 +735,19 @@
#ifdef TCSETS
(void) ioctl (ttyfd, TCSETS, &termnew);
#endif