$NetBSD: patch-ab,v 1.3 2007/10/10 16:53:58 rillig Exp $ --- common/ttio.c.orig 1997-02-21 23:06:09.000000000 +0000 +++ common/ttio.c 2007-10-10 16:48:38.000000000 +0000 @@ -51,6 +51,7 @@ static char copyright[] = #include "mcap.h" #include "ttio.h" #include +#include static void dectl PROTO ((char *, int, char *, int, char *)); @@ -73,6 +74,16 @@ int ttsetup (name) { if (chown (nbuf, pw -> pw_uid, pw -> pw_gid) < 0) warn ("Can't set owner on %s: %m", nbuf); +#ifdef __NetBSD__ + if (chmod (nbuf, 0600) < 0) + warn ("Can't set mode on %s: %m", nbuf); + revoke(nbuf); + if (ttyaction(nbuf, "modemd", "root")) + warn ("Can't ttyaction %s: %m", nbuf); + + /* delay open so DTR stays down long enough to be detected */ + usleep(100); +#endif } /* Open the terminal device. */