[1218] in Kerberos-V5-bugs

home help back first fref pref prev next nref lref last post

krb5b4pl3: appl/telnet/telnetd/sys_term.c: setpgrp used wrong on systems where it takes no arguments

daemon@ATHENA.MIT.EDU (Jonathan I. Kamens)
Mon Mar 20 14:36:44 1995

From: "Jonathan I. Kamens" <jik@cam.ov.com>
Date: Mon, 20 Mar 1995 14:39:32 -0500
To: krb5-bugs@MIT.EDU
Cc: dab@cray.com

The file appl/telnet/telnetd/sys_term.c in krb5b4pl3 uses setpgrp()
inconstently -- sometimes it calls it with two arguments, and
sometimes it calls it with none.  It should always call it with two
arguments, because there's a #define at the top of the file which
does the right thing on systems on which it's supposed to be called
with no arguments.

Here's a patch:

--- sys_term.c	1995/03/20 19:36:26	1.1
+++ sys_term.c	1995/03/20 19:36:44
@@ -1247,7 +1247,7 @@
 		(void) signal(SIGHUP, SIG_IGN);
 		(void) ioctl(t, TCVHUP, (char *)0);
 		(void) signal(SIGHUP, SIG_DFL);
-		setpgrp();
+		setpgrp(0, 0);
 
 #if		defined(_SC_CRAY_SECURE_SYS)
 		if (secflag) {
@@ -1387,7 +1387,7 @@
 		register int pid = i;
 		void sigjob P((int));
 
-		setpgrp();
+		setpgrp(0, 0);
 		utmp_sig_reset();		/* reset handler to default */
 		/*
 		 * Create utmp entry for child

home help back first fref pref prev next nref lref last post