summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>1996-05-26 01:04:36 +0000
committerderaadt <deraadt@openbsd.org>1996-05-26 01:04:36 +0000
commitd077aa933e339b8d0603c88f0e416eb9f39d72a0 (patch)
tree036d61c08cb5478da11284bb250f78bdf7af9770
parentsync 0521 (diff)
downloadwireguard-openbsd-d077aa933e339b8d0603c88f0e416eb9f39d72a0.tar.xz
wireguard-openbsd-d077aa933e339b8d0603c88f0e416eb9f39d72a0.zip
sync 0521
-rw-r--r--games/adventure/init.c7
-rw-r--r--games/adventure/main.c10
-rw-r--r--games/snake/snake/move.c19
-rw-r--r--lib/libkvm.old/Makefile5
-rw-r--r--lib/libkvm.old/kvm.c8
-rw-r--r--lib/libkvm.old/kvm_m68k.c6
-rw-r--r--lib/libkvm.old/kvm_private.h4
-rw-r--r--lib/libkvm/kvm_getprocs.321
8 files changed, 52 insertions, 28 deletions
diff --git a/games/adventure/init.c b/games/adventure/init.c
index 663e267fe63..e16daa943a9 100644
--- a/games/adventure/init.c
+++ b/games/adventure/init.c
@@ -1,4 +1,4 @@
-/* $NetBSD: init.c,v 1.2 1995/03/21 12:05:04 cgd Exp $ */
+/* $NetBSD: init.c,v 1.3 1996/05/21 10:48:09 mrg Exp $ */
/*-
* Copyright (c) 1993
@@ -42,13 +42,14 @@
#if 0
static char sccsid[] = "@(#)init.c 8.1 (Berkeley) 6/2/93";
#else
-static char rcsid[] = "$NetBSD: init.c,v 1.2 1995/03/21 12:05:04 cgd Exp $";
+static char rcsid[] = "$NetBSD: init.c,v 1.3 1996/05/21 10:48:09 mrg Exp $";
#endif
#endif /* not lint */
/* Re-coding of advent in C: data initialization */
#include <sys/types.h>
+#include <sys/signal.h>
#include <stdio.h>
#include "hdr.h"
@@ -203,7 +204,7 @@ linkdata() /* secondary data manipulation */
trapdel() /* come here if he hits a del */
{ delhit++; /* main checks, treats as QUIT */
- signal(2,trapdel); /* catch subsequent DELs */
+ signal(SIGINT,trapdel); /* catch subsequent DELs */
}
diff --git a/games/adventure/main.c b/games/adventure/main.c
index 7bb25c2c1a4..ce502092b17 100644
--- a/games/adventure/main.c
+++ b/games/adventure/main.c
@@ -48,17 +48,17 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)main.c 8.1 (Berkeley) 6/2/93";
#else
-static char rcsid[] = "$NetBSD: main.c,v 1.3 1996/02/06 22:47:06 jtc Exp $";
+static char rcsid[] = "$NetBSD: main.c,v 1.4 1996/05/21 10:48:07 mrg Exp $";
#endif
#endif /* not lint */
/* Re-coding of advent in C: main program */
#include <sys/file.h>
+#include <sys/signal.h>
#include <stdio.h>
#include "hdr.h"
-
main(argc,argv)
int argc;
char **argv;
@@ -68,8 +68,12 @@ char **argv;
struct text *kk;
extern trapdel();
+ /* adventure doesn't need setuid-ness, so, just get rid of it */
+ if (setuid(getuid()) < 0)
+ perror("setuid");
+
init(); /* Initialize everything */
- signal(2,trapdel);
+ signal(SIGINT,trapdel);
if (argc > 1) /* Restore file specified */
{ /* Restart is label 8305 (Fortran) */
diff --git a/games/snake/snake/move.c b/games/snake/snake/move.c
index 5a90795d96f..3a7d61d63fa 100644
--- a/games/snake/snake/move.c
+++ b/games/snake/snake/move.c
@@ -1,4 +1,4 @@
-/* $NetBSD: move.c,v 1.11 1995/04/29 01:17:12 mycroft Exp $ */
+/* $NetBSD: move.c,v 1.12 1996/05/19 20:22:09 pk Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -37,7 +37,7 @@
#if 0
static char sccsid[] = "@(#)move.c 8.1 (Berkeley) 7/19/93";
#else
-static char rcsid[] = "$NetBSD: move.c,v 1.11 1995/04/29 01:17:12 mycroft Exp $";
+static char rcsid[] = "$NetBSD: move.c,v 1.12 1996/05/19 20:22:09 pk Exp $";
#endif
#endif /* not lint */
@@ -642,14 +642,23 @@ getcap()
if (xPC)
PC = *xPC;
- NDlength = strlen(ND);
- BSlength = strlen(BS);
if ((CM == 0) &&
- (HO == 0 | UP==0 || BS==0 || ND==0)) {
+ (HO == 0 || UP == 0 || BS == 0 || ND == 0)) {
fprintf(stderr, "Terminal must have addressible ");
fprintf(stderr, "cursor or home + 4 local motions\n");
exit(5);
}
+ if (ND == 0) {
+ fprintf(stderr, "Terminal must have `nd' capability\n");
+ exit(5);
+ }
+ NDlength = strlen(ND);
+ if (BS == 0) {
+ fprintf(stderr, "Terminal must have `bs' or `bc' capability\n");
+ exit(5);
+ }
+ BSlength = strlen(BS);
+
if (tgetflag("os")) {
fprintf(stderr, "Terminal must not overstrike\n");
exit(5);
diff --git a/lib/libkvm.old/Makefile b/lib/libkvm.old/Makefile
index 9d91510740c..5311d7ccb55 100644
--- a/lib/libkvm.old/Makefile
+++ b/lib/libkvm.old/Makefile
@@ -1,8 +1,9 @@
-# from: @(#)Makefile 8.1 (Berkeley) 6/4/93
-# $OpenBSD: Makefile,v 1.1 1996/03/19 23:15:26 niklas Exp $
+# $OpenBSD: Makefile,v 1.2 1996/05/26 01:04:39 deraadt Exp $
+# $NetBSD: Makefile,v 1.4 1996/05/13 02:30:20 thorpej Exp $
LIB= kvm
CFLAGS+=-DLIBC_SCCS
+CFLAGS+=-I- -I${.CURDIR}
# Try most specific name first.
.if exists(kvm_${MACHINE}.c)
diff --git a/lib/libkvm.old/kvm.c b/lib/libkvm.old/kvm.c
index db0e05e4d2f..90e61885c34 100644
--- a/lib/libkvm.old/kvm.c
+++ b/lib/libkvm.old/kvm.c
@@ -1,4 +1,6 @@
-/* $OpenBSD: kvm.c,v 1.1 1996/03/19 23:15:28 niklas Exp $ */
+/* $OpenBSD: kvm.c,v 1.2 1996/05/26 01:04:39 deraadt Exp $ */
+
+/* $NetBSD: kvm.c,v 1.2 1996/05/13 02:30:22 thorpej Exp $ */
/*-
* Copyright (c) 1989, 1992, 1993
@@ -38,7 +40,11 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
+#if 0
static char sccsid[] = "@(#)kvm.c 8.2 (Berkeley) 2/13/94";
+#else
+static char rcsid[] = "$NetBSD: kvm.c,v 1.2 1996/05/13 02:30:22 thorpej Exp $";
+#endif
#endif /* LIBC_SCCS and not lint */
#include <sys/param.h>
diff --git a/lib/libkvm.old/kvm_m68k.c b/lib/libkvm.old/kvm_m68k.c
index 8930f973306..9e38c4cbb86 100644
--- a/lib/libkvm.old/kvm_m68k.c
+++ b/lib/libkvm.old/kvm_m68k.c
@@ -1,4 +1,6 @@
-/* $OpenBSD: kvm_m68k.c,v 1.1 1996/03/19 23:15:35 niklas Exp $ */
+/* $OpenBSD: kvm_m68k.c,v 1.2 1996/05/26 01:04:40 deraadt Exp $ */
+
+/* $NetBSD: kvm_m68k.c,v 1.3 1996/05/14 21:59:57 scottr Exp $ */
/*-
* Copyright (c) 1989, 1992, 1993
@@ -39,7 +41,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
/* from: static char sccsid[] = "@(#)kvm_hp300.c 8.1 (Berkeley) 6/4/93"; */
-static char *rcsid = "$OpenBSD: kvm_m68k.c,v 1.1 1996/03/19 23:15:35 niklas Exp $";
+static char *rcsid = "$OpenBSD: kvm_m68k.c,v 1.2 1996/05/26 01:04:40 deraadt Exp $";
#endif /* LIBC_SCCS and not lint */
/*
diff --git a/lib/libkvm.old/kvm_private.h b/lib/libkvm.old/kvm_private.h
index 8151011193c..859f200292f 100644
--- a/lib/libkvm.old/kvm_private.h
+++ b/lib/libkvm.old/kvm_private.h
@@ -1,4 +1,6 @@
-/* $OpenBSD: kvm_private.h,v 1.1 1996/03/19 23:15:39 niklas Exp $ */
+/* $OpenBSD: kvm_private.h,v 1.2 1996/05/26 01:04:41 deraadt Exp $ */
+
+/* $NetBSD: kvm_private.h,v 1.2 1996/05/13 02:30:25 thorpej Exp $ */
/*-
* Copyright (c) 1992, 1993
diff --git a/lib/libkvm/kvm_getprocs.3 b/lib/libkvm/kvm_getprocs.3
index 16d4efa5bd6..180bf56ee7d 100644
--- a/lib/libkvm/kvm_getprocs.3
+++ b/lib/libkvm/kvm_getprocs.3
@@ -1,5 +1,5 @@
-.\" $OpenBSD: kvm_getprocs.3,v 1.2 1996/05/05 14:57:17 deraadt Exp $
-.\" $NetBSD: kvm_getprocs.3,v 1.2 1996/03/18 22:33:35 thorpej Exp $
+.\" $OpenBSD: kvm_getprocs.3,v 1.3 1996/05/26 01:04:36 deraadt Exp $
+.\" $NetBSD: kvm_getprocs.3,v 1.3 1996/05/20 16:58:03 mrg Exp $
.\"
.\" Copyright (c) 1992, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -48,8 +48,7 @@
.Nd access user process state
.Sh SYNOPSIS
.Fd #include <kvm.h>
-.Fd #include <sys/kinfo.h>
-.Fd #include <sys/kinfo_proc.h>
+.Fd #include <sys/sysctl.h>
.\" .Fa kvm_t *kd
.br
.Ft struct kinfo_proc *
@@ -72,24 +71,24 @@ returned. The value of
describes the filtering predicate as follows:
.Pp
.Bl -tag -width 20n -offset indent -compact
-.It Sy KINFO_PROC_ALL
+.It Sy KERN_PROC_ALL
all processes
-.It Sy KINFO_PROC_PID
+.It Sy KERN_PROC_PID
processes with process id
.Fa arg
-.It Sy KINFO_PROC_PGRP
+.It Sy KERN_PROC_PGRP
processes with process group
.Fa arg
-.It Sy KINFO_PROC_SESSION
+.It Sy KERN_PROC_SESSION
processes with session
.Fa arg
-.It Sy KINFO_PROC_TTY
+.It Sy KERN_PROC_TTY
processes with tty
.Fa arg
-.It Sy KINFO_PROC_UID
+.It Sy KERN_PROC_UID
processes with effective user id
.Fa arg
-.It Sy KINFO_PROC_RUID
+.It Sy KERN_PROC_RUID
processes with real user id
.Fa arg
.El