* Don't explicitly chgrp tty (and certainly not to utmp); openpty() gives

us a tty with proper permissions/owner/group.
* Reserve enough space for tty name.
ok benoit@
This commit is contained in:
naddy 2012-12-12 21:40:02 +00:00
parent 0fe50ed6e4
commit f51b1d5965
2 changed files with 15 additions and 3 deletions

View File

@ -1,9 +1,9 @@
# $OpenBSD: Makefile,v 1.22 2011/10/06 10:00:02 giovanni Exp $
# $OpenBSD: Makefile,v 1.23 2012/12/12 21:40:02 naddy Exp $
COMMENT= multi-tabbed terminal emulator
DISTNAME= mrxvt-0.5.4
REVISION= 5
REVISION= 6
CATEGORIES= x11
@ -31,7 +31,7 @@ AUTOCONF_VERSION=2.61
CONFIGURE_STYLE=autoconf
CONFIGURE_ARGS+=--enable-menubar \
--with-x \
--enable-ttygid=utmp \
--disable-ttygid \
--enable-xim \
--enable-xft

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-src_ptytty_c,v 1.1 2012/12/12 21:40:02 naddy Exp $
--- src/ptytty.c.orig Wed Dec 12 21:49:15 2012
+++ src/ptytty.c Wed Dec 12 21:49:32 2012
@@ -44,7 +44,7 @@ rxvt_get_pty(int *fd_tty, char **ttydev)
#ifdef PTYS_ARE_OPENPTY
{
- char tty_name[sizeof "/dev/pts/????\0"];
+ char tty_name[16];
if (openpty(&pfd, fd_tty, tty_name, NULL, NULL) != -1) {
*ttydev = STRDUP(tty_name);