From 83f4eadd864f9636afc16ef7b364f8987f9e5573 Mon Sep 17 00:00:00 2001 From: Waldo Bastian Date: Mon, 2 Sep 2002 01:09:24 +0000 Subject: [PATCH] Call revoke() to ensure that no evil-doers are listening on our pty. svn path=/trunk/kdebase/konsole/; revision=175186 --- konsole/konsole_grantpty.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/konsole/konsole_grantpty.c b/konsole/konsole_grantpty.c index eb5dd6c6..d8a91986 100644 --- a/konsole/konsole_grantpty.c +++ b/konsole/konsole_grantpty.c @@ -175,5 +175,12 @@ int main (int argc, char *argv[]) return 1; /* FAIL */ } + if (revoke(tty) < 0) + { + fprintf(stderr,"%s: cannot revoke %s.\n",argv[0],tty); perror("Reason"); + return 1; /* FAIL */ + } + + return 0; /* OK */ }