1
0
mirror of https://github.com/openbsd/src.git synced 2025-01-10 06:47:55 -08:00

sync 0521

This commit is contained in:
deraadt 1996-05-26 01:04:36 +00:00
parent f1a5e2be32
commit d077aa933e
8 changed files with 52 additions and 28 deletions

View File

@ -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 */
}

View File

@ -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) */

View File

@ -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);

View File

@ -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)

View File

@ -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>

View File

@ -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 */
/*

View File

@ -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

View File

@ -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