blob: 640468665523acc4c650f2949e2ae3aa9db6c255 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
$NetBSD: patch-bc,v 1.1.1.1 1999/12/24 03:21:10 itohy Exp $
--- connsh.c.orig Tue Sep 22 01:50:12 1998
+++ connsh.c Sun Sep 27 13:41:53 1998
@@ -21,6 +21,10 @@
#define vfork fork
#endif
+#ifdef USE_SERVER
+extern int skkservsock;
+#endif
+
#define DEVICELEN 16
#define DEFAULT_SHELL "/bin/csh"
@@ -171,8 +175,9 @@
#endif /* not HPUX */
if((i = vfork()) < 0) {
- fprintf(stderr,"fork error\n");
- abort();
+ perror("fork");
+ reset_tty();
+ Exit(1);
}
if(i == 0) { /* child */
@@ -226,6 +231,10 @@
dup2(slave,1);
dup2(slave,2);
close(slave);
+#ifdef USE_SERVER
+ if (skkservsock >= 0)
+ close(skkservsock);
+#endif
seteuid(getuid());
p = &ShellName[strlen(ShellName)];
|