File tree Expand file tree Collapse file tree 2 files changed +12
-7
lines changed Expand file tree Collapse file tree 2 files changed +12
-7
lines changed Original file line number Diff line number Diff line change 1
- /* $NetBSD: init.c,v 1.2 1995/03 /21 12:05:04 cgd Exp $ */
1
+ /* $NetBSD: init.c,v 1.3 1996/05 /21 10:48:09 mrg Exp $ */
2
2
3
3
/*-
4
4
* Copyright (c) 1993
42
42
#if 0
43
43
static char sccsid [] = "@(#)init.c 8.1 (Berkeley) 6/2/93" ;
44
44
#else
45
- static char rcsid [] = "$NetBSD: init.c,v 1.2 1995/03 /21 12:05:04 cgd Exp $" ;
45
+ static char rcsid [] = "$NetBSD: init.c,v 1.3 1996/05 /21 10:48:09 mrg Exp $" ;
46
46
#endif
47
47
#endif /* not lint */
48
48
49
49
/* Re-coding of advent in C: data initialization */
50
50
51
51
#include <sys/types.h>
52
+ #include <sys/signal.h>
52
53
#include <stdio.h>
53
54
#include "hdr.h"
54
55
@@ -203,7 +204,7 @@ linkdata() /* secondary data manipulation */
203
204
204
205
trapdel () /* come here if he hits a del */
205
206
{ delhit ++ ; /* main checks, treats as QUIT */
206
- signal (2 ,trapdel ); /* catch subsequent DELs */
207
+ signal (SIGINT ,trapdel ); /* catch subsequent DELs */
207
208
}
208
209
209
210
Original file line number Diff line number Diff line change 1
- /* $NetBSD: main.c,v 1.3 1996/02/06 22:47:06 jtc Exp $ */
1
+ /* $NetBSD: main.c,v 1.4 1996/05/21 10:48:07 mrg Exp $ */
2
2
3
3
/*-
4
4
* Copyright (c) 1991, 1993
@@ -48,17 +48,17 @@ static char copyright[] =
48
48
#if 0
49
49
static char sccsid [] = "@(#)main.c 8.1 (Berkeley) 6/2/93" ;
50
50
#else
51
- static char rcsid [] = "$NetBSD: main.c,v 1.3 1996/02/06 22:47:06 jtc Exp $" ;
51
+ static char rcsid [] = "$NetBSD: main.c,v 1.4 1996/05/21 10:48:07 mrg Exp $" ;
52
52
#endif
53
53
#endif /* not lint */
54
54
55
55
/* Re-coding of advent in C: main program */
56
56
57
57
#include <sys/file.h>
58
+ #include <sys/signal.h>
58
59
#include <stdio.h>
59
60
#include "hdr.h"
60
61
61
-
62
62
main (argc ,argv )
63
63
int argc ;
64
64
char * * argv ;
@@ -68,8 +68,12 @@ char **argv;
68
68
struct text * kk ;
69
69
extern trapdel ();
70
70
71
+ /* adventure doesn't need setuid-ness, so, just get rid of it */
72
+ if (setuid (getuid ()) < 0 )
73
+ perror ("setuid" );
74
+
71
75
init (); /* Initialize everything */
72
- signal (2 ,trapdel );
76
+ signal (SIGINT ,trapdel );
73
77
74
78
if (argc > 1 ) /* Restore file specified */
75
79
{ /* Restart is label 8305 (Fortran) */
You can’t perform that action at this time.
0 commit comments