summaryrefslogtreecommitdiffstats
path: root/security/sudosh3
diff options
context:
space:
mode:
authorcy <cy@FreeBSD.org>2005-06-17 17:00:02 +0000
committercy <cy@FreeBSD.org>2005-06-17 17:00:02 +0000
commit737b607eba54d104be185ec2587df1875d9c0819 (patch)
tree70aa95e7a34af5862fd85124ba52eb506f5e4c42 /security/sudosh3
parenta5a9f55f0f50da89624adb0871e101a923fa8b36 (diff)
downloadFreeBSD-ports-737b607eba54d104be185ec2587df1875d9c0819.zip
FreeBSD-ports-737b607eba54d104be185ec2587df1875d9c0819.tar.gz
Update 1.6.3 --> 1.8.1
Diffstat (limited to 'security/sudosh3')
-rw-r--r--security/sudosh3/Makefile3
-rw-r--r--security/sudosh3/distinfo4
-rw-r--r--security/sudosh3/files/patch-src::sudosh.c121
3 files changed, 66 insertions, 62 deletions
diff --git a/security/sudosh3/Makefile b/security/sudosh3/Makefile
index 69aae02..f7c5c14 100644
--- a/security/sudosh3/Makefile
+++ b/security/sudosh3/Makefile
@@ -6,7 +6,7 @@
#
PORTNAME= sudosh
-PORTVERSION= 1.6.3
+PORTVERSION= 1.8.1
CATEGORIES= security
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE_EXTENDED}
MASTER_SITE_SUBDIR= ${PORTNAME:S/_/-/}
@@ -30,6 +30,7 @@ CONFIGURE_ARGS+= --with-logdir=/var/log/sudosh
CONFIGURE_ENV= LDFLAGS="-lutil"
MAN1= sudosh.1
+MAN5= sudosh.conf.5
MAN8= sudosh-replay.8
.include <bsd.port.pre.mk>
diff --git a/security/sudosh3/distinfo b/security/sudosh3/distinfo
index ef4001c..eb832bb 100644
--- a/security/sudosh3/distinfo
+++ b/security/sudosh3/distinfo
@@ -1,2 +1,2 @@
-MD5 (sudosh-1.6.3.tar.gz) = 700ee8c6060c1512ac0c2731b5727cc6
-SIZE (sudosh-1.6.3.tar.gz) = 119980
+MD5 (sudosh-1.8.1.tar.gz) = 415ff62cb3e3465eb62025d043e6d0b4
+SIZE (sudosh-1.8.1.tar.gz) = 135718
diff --git a/security/sudosh3/files/patch-src::sudosh.c b/security/sudosh3/files/patch-src::sudosh.c
index e54829c..d6d8bc4 100644
--- a/security/sudosh3/files/patch-src::sudosh.c
+++ b/security/sudosh3/files/patch-src::sudosh.c
@@ -1,16 +1,6 @@
---- src/sudosh.c.orig Thu May 12 19:37:44 2005
-+++ src/sudosh.c Wed Jun 1 14:05:14 2005
-@@ -24,6 +24,9 @@
- #include <unistd.h>
- #include <signal.h>
- #include <pwd.h>
-+#ifdef __FreeBSD__
-+#include <sys/param.h>
-+#endif
-
- #include "config.h"
-
-@@ -81,6 +84,12 @@
+--- src/sudosh.c.orig Sun Jun 12 18:13:15 2005
++++ src/sudosh.c Thu Jun 16 21:02:50 2005
+@@ -28,6 +28,13 @@
#define WRITE(a, b, c) do_write(a, b, c, __FILE__, __LINE__)
@@ -18,14 +8,15 @@
+#include <sys/types.h>
+#include <sys/ioctl.h>
+#include <libutil.h>
++#include <sys/param.h>
+#endif
+
static struct termios termorig;
static struct winsize winorig;
-@@ -423,17 +432,41 @@
+@@ -554,19 +561,43 @@
{
- char *sname;
+ char *sname;
+#ifdef __FreeBSD__
+#define PTYLEN 16
@@ -44,58 +35,68 @@
+ }
+ if (openpty(&p->mfd, &p->sfd, sname, &tt, &win) == -1) {
+#else
- if ((p->mfd = open("/dev/ptmx", O_RDWR)) == -1) {
- if ((p->mfd = open("/dev/ptc", O_RDWR)) == -1) {
+ if ((p->mfd = open ("/dev/ptmx", O_RDWR)) == -1)
+ {
+ if ((p->mfd = open ("/dev/ptc", O_RDWR)) == -1)
+ {
+#endif
- perror("Cannot open cloning master pty");
- return -1;
-+#ifndef __FreeBSD__
+ perror ("Cannot open cloning master pty");
+ return -1;
++#ifdef __FreeBSD
}
+#endif
}
+#if !defined(__FreeBSD_version) || (defined(__FreeBSD_version) && __FreeBSD_version >= 500000)
- (void) unlockpt(p->mfd);
- (void) grantpt(p->mfd);
+ (void) unlockpt (p->mfd);
+ (void) grantpt (p->mfd);
+#endif
-+#ifndef __FreeBSD__
- sname = (char *) ptsname(p->mfd);
++#ifndef __FreeBSD
+ sname = (char *) ptsname (p->mfd);
+#endif
- if ((p->sfd = open(sname, O_RDWR)) == -1) {
- perror("open slave pty");
-@@ -488,7 +521,10 @@
- for (i = 3; i < 100; ++i)
- close(i);
+ if ((p->sfd = open (sname, O_RDWR)) == -1)
+ {
+@@ -628,9 +659,14 @@
+ for (i = 3; i < 100; ++i)
+ close (i);
--#ifdef TCSETS
+#ifdef __FreeBSD__
+ (void) tcsetattr(0, TCSADRAIN, &termorig);
+ (void) login_tty(pst->sfd);
+#else
- (void) ioctl(0, TCSETS, &termorig);
+ #ifdef TCSETS
+ (void) ioctl (0, TCSETS, &termorig);
#endif
- (void) ioctl(0, TIOCSWINSZ, &winorig);
-@@ -528,25 +564,32 @@
++#endif
+ (void) ioctl (0, TIOCSWINSZ, &winorig);
+
+ setuid (getuid ());
+@@ -672,6 +708,13 @@
{
- static struct termios termnew;
+ static struct termios termnew;
--#ifdef TCGETS
+#ifdef __FreeBSD__
-+ if (tcgetattr(ttyfd, &termorig) == -1) {
-+ perror("tcgetattr failed");
++ if (tcgetattr(ttyfd, &termorig) == -1)
++ {
++ perror("tcgetattr failed");
++ exit (EXIT_FAILURE);
++ }
+#else
- if (ioctl(ttyfd, TCGETS, &termorig) == -1) {
- perror("ioctl TCGETS failed");
-+#endif
- exit(1);
+ #ifdef TCGETS
+ if (ioctl (ttyfd, TCGETS, &termorig) == -1)
+ {
+@@ -679,6 +722,7 @@
+ exit (EXIT_FAILURE);
}
--#endif
+ #endif
++#endif
- if (ioctl(ttyfd, TIOCGWINSZ, &winorig) == -1) {
- perror("ioctl TIOCGWINSZ failed");
- exit(1);
+ if (ioctl (ttyfd, TIOCGWINSZ, &winorig) == -1)
+ {
+@@ -686,6 +730,11 @@
+ exit (EXIT_FAILURE);
}
+#ifdef __FreeBSD__
@@ -103,24 +104,26 @@
+ termnew.c_lflag &= ~ECHO;
+ (void) tcsetattr(ttyfd, TCSAFLUSH, &termnew);
+#else
- termnew.c_cc[VEOF] = 1;
- termnew.c_iflag = BRKINT | ISTRIP | IXON | IXANY;
- termnew.c_oflag = 0;
- termnew.c_cflag = termorig.c_cflag;
- termnew.c_lflag &= ~ECHO;
-
--#ifdef TCSETS
- (void) ioctl(ttyfd, TCSETS, &termnew);
+ termnew.c_cc[VEOF] = 1;
+ termnew.c_iflag = BRKINT | ISTRIP | IXON | IXANY;
+ termnew.c_oflag = 0;
+@@ -695,13 +744,19 @@
+ #ifdef TCSETS
+ (void) ioctl (ttyfd, TCSETS, &termnew);
#endif
++#endif
}
-@@ -556,7 +599,9 @@
- char s[32];
- char t[32];
- char *sp, *tp;
--#ifdef TCSETS
+
+ static void
+ bye (int signum)
+ {
++
+#ifdef __FreeBSD__
+ (void) tcsetattr(0, TCSADRAIN, &termorig);
+#else
- (void) ioctl(0, TCSETS, &termorig);
+ #ifdef TCSETS
+ (void) ioctl (0, TCSETS, &termorig);
++#endif
#endif
+ close (timing.fd);
OpenPOWER on IntegriCloud