blob: 17fd65bd7d5206cab86a8689abafa90b888c0d60 (
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 2002/05/31 13:00:04 seb 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)];
|