- RCSID police

- Add ttymsg.3
This commit is contained in:
christos 1997-06-29 18:44:03 +00:00
parent c897d730b5
commit f5646a08d4
11 changed files with 108 additions and 20 deletions

View File

@ -1,10 +1,10 @@
# $NetBSD: Makefile,v 1.9 1996/11/14 17:53:07 gwr Exp $
# $NetBSD: Makefile,v 1.10 1997/06/29 18:44:03 christos Exp $
# @(#)Makefile 8.1 (Berkeley) 6/4/93
LIB= util
CFLAGS+=-DLIBC_SCCS
CFLAGS+=-DLIBC_SCCS -Wall -Wstrict-prototypes -Wmissing-prototypes
SRCS= getmaxpartitions.c getrawpartition.c login.c login_tty.c logout.c \
logwtmp.c passwd.c pty.c ttyaction.c
logwtmp.c passwd.c pty.c ttyaction.c ttymsg.c
MAN= getmaxpartitions.3 getrawpartition.3 login.3 openpty.3 pw_init.3 \
pw_lock.3 ttyaction.3

View File

@ -1,4 +1,4 @@
/* $NetBSD: getmaxpartitions.c,v 1.1 1996/05/16 07:03:31 thorpej Exp $ */
/* $NetBSD: getmaxpartitions.c,v 1.2 1997/06/29 18:44:04 christos Exp $ */
/*-
* Copyright (c) 1996 The NetBSD Foundation, Inc.
@ -36,8 +36,9 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
static char rcsid[] = "$NetBSD: getmaxpartitions.c,v 1.1 1996/05/16 07:03:31 thorpej Exp $";
__RCSID("$NetBSD: getmaxpartitions.c,v 1.2 1997/06/29 18:44:04 christos Exp $");
#endif
#include <sys/param.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: getrawpartition.c,v 1.1 1996/05/16 07:03:33 thorpej Exp $ */
/* $NetBSD: getrawpartition.c,v 1.2 1997/06/29 18:44:04 christos Exp $ */
/*-
* Copyright (c) 1996 The NetBSD Foundation, Inc.
@ -36,8 +36,9 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
static char rcsid[] = "$NetBSD: getrawpartition.c,v 1.1 1996/05/16 07:03:33 thorpej Exp $";
__RCSID("$NetBSD: getrawpartition.c,v 1.2 1997/06/29 18:44:04 christos Exp $");
#endif
#include <sys/param.h>

View File

@ -1,3 +1,5 @@
/* $NetBSD: login.c,v 1.7 1997/06/29 18:44:05 christos Exp $ */
/*
* Copyright (c) 1988, 1993
* The Regents of the University of California. All rights reserved.
@ -31,11 +33,12 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
#if 0
static char sccsid[] = "@(#)login.c 8.1 (Berkeley) 6/4/93";
#else
static char rcsid[] = "$NetBSD: login.c,v 1.6 1996/05/15 21:42:26 jtc Exp $";
__RCSID("$NetBSD: login.c,v 1.7 1997/06/29 18:44:05 christos Exp $");
#endif
#endif /* LIBC_SCCS and not lint */

View File

@ -1,3 +1,5 @@
/* $NetBSD: login_tty.c,v 1.6 1997/06/29 18:44:06 christos Exp $ */
/*-
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
@ -31,11 +33,12 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
#if 0
static char sccsid[] = "@(#)login_tty.c 8.1 (Berkeley) 6/4/93";
#else
static char rcsid[] = "$NetBSD: login_tty.c,v 1.5 1996/05/15 21:42:27 jtc Exp $";
__RCSID("$NetBSD: login_tty.c,v 1.6 1997/06/29 18:44:06 christos Exp $");
#endif
#endif /* LIBC_SCCS and not lint */

View File

@ -1,3 +1,5 @@
/* $NetBSD: logout.c,v 1.6 1997/06/29 18:44:07 christos Exp $ */
/*
* Copyright (c) 1988, 1993
* The Regents of the University of California. All rights reserved.
@ -31,11 +33,12 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
#if 0
static char sccsid[] = "@(#)logout.c 8.1 (Berkeley) 6/4/93";
#else
static char rcsid[] = "$NetBSD: logout.c,v 1.5 1996/05/15 21:42:28 jtc Exp $";
__RCSID("$NetBSD: logout.c,v 1.6 1997/06/29 18:44:07 christos Exp $");
#endif
#endif /* LIBC_SCCS and not lint */

View File

@ -1,3 +1,5 @@
/* $NetBSD: logwtmp.c,v 1.6 1997/06/29 18:44:07 christos Exp $ */
/*
* Copyright (c) 1988, 1993
* The Regents of the University of California. All rights reserved.
@ -31,11 +33,12 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
#if 0
static char sccsid[] = "@(#)logwtmp.c 8.1 (Berkeley) 6/4/93";
#else
static char rcsid[] = "$NetBSD: logwtmp.c,v 1.5 1996/05/15 21:42:29 jtc Exp $";
__RCSID("$NetBSD: logwtmp.c,v 1.6 1997/06/29 18:44:07 christos Exp $");
#endif
#endif /* LIBC_SCCS and not lint */

View File

@ -1,3 +1,5 @@
/* $NetBSD: passwd.c,v 1.8 1997/06/29 18:44:08 christos Exp $ */
/*
* Copyright (c) 1987, 1993, 1994, 1995
* The Regents of the University of California. All rights reserved.
@ -31,8 +33,9 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
static char rcsid[] = "$NetBSD: passwd.c,v 1.7 1997/06/20 06:17:27 mikel Exp $";
__RCSID("$NetBSD: passwd.c,v 1.8 1997/06/29 18:44:08 christos Exp $");
#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>
@ -147,9 +150,12 @@ pw_edit(notsetuid, filename)
int notsetuid;
const char *filename;
{
int i, j, xargc, pstat;
int i, xargc, pstat;
char *p, *editor;
char **xargv;
#ifdef __GNUC__
(void) &editor;
#endif
if (filename == NULL)
filename = _PATH_MASTERPASSWD_LOCK;

View File

@ -1,3 +1,5 @@
/* $NetBSD: pty.c,v 1.8 1997/06/29 18:44:09 christos Exp $ */
/*-
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
@ -31,15 +33,15 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
#if 0
static char sccsid[] = "@(#)pty.c 8.1 (Berkeley) 6/4/93";
#else
static char rcsid[] = "$NetBSD: pty.c,v 1.7 1996/11/12 16:39:38 mycroft Exp $";
__RCSID("$NetBSD: pty.c,v 1.8 1997/06/29 18:44:09 christos Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
#include <sys/cdefs.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/ioctl.h>

63
lib/libutil/ttymsg.3 Normal file
View File

@ -0,0 +1,63 @@
.\" $NetBSD: ttymsg.3,v 1.1 1997/06/29 18:44:10 christos Exp $
.\"
.\" Copyright (c) 1996 The NetBSD Foundation, Inc.
.\" All rights reserved.
.\"
.\" This code is derived from software contributed to The NetBSD Foundation
.\" by Gordon W. Ross.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\" 3. All advertising materials mentioning features or use of this software
.\" must display the following acknowledgement:
.\" This product includes software developed by the NetBSD
.\" Foundation, Inc. and its contributors.
.\" 4. Neither the name of The NetBSD Foundation nor the names of its
.\" contributors may be used to endorse or promote products derived
.\" from this software without specific prior written permission.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE
.\" LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd June 29, 1997
.Dt TTYMSG 3
.Os
.Sh NAME
.Nm ttymsg
.Nd ttymsg utility function
.Sh SYNOPSIS
.Fd #include <util.h>
.Ft char *
.Fn ttyaction "struct iovec *iov" "int iovlen" "const char *tty" "int tmout"
.Sh DESCRIPTION
The
.Fn ttyaction
function is used by
programs such as
.Xr talkd 8 ,
.Xr syslogd 8 ,
.Xr wall 1 ,
etc. to display the contents of a uio structure on a terminal.
.Fn ttyaction
forks and finishes in child if write would block after
waiting up to tmout seconds.
.Sh RETURN VALUES
.Fn ttyaction
returns a pointer to the error string on unexpected
error; string is not newline-terminated. Various "normal" errors are
ignored (exclusive-use, lack of permission, etc.).

View File

@ -1,4 +1,4 @@
/* $NetBSD: ttymsg.c,v 1.4 1997/02/11 08:42:03 mrg Exp $ */
/* $NetBSD: ttymsg.c,v 1.5 1997/06/29 18:44:10 christos Exp $ */
/*
* Copyright (c) 1989, 1993
@ -33,12 +33,14 @@
* SUCH DAMAGE.
*/
#ifndef lint
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
#if 0
static char sccsid[] = "@(#)ttymsg.c 8.2 (Berkeley) 11/16/93";
#else
__RCSID("$NetBSD: ttymsg.c,v 1.5 1997/06/29 18:44:10 christos Exp $");
#endif
static char rcsid[] = "$NetBSD: ttymsg.c,v 1.4 1997/02/11 08:42:03 mrg Exp $";
#endif /* not lint */
#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>
#include <sys/uio.h>
@ -51,6 +53,7 @@ static char rcsid[] = "$NetBSD: ttymsg.c,v 1.4 1997/02/11 08:42:03 mrg Exp $";
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <util.h>
/*
* Display the contents of a uio structure on a terminal. Used by wall(1),
@ -63,7 +66,7 @@ char *
ttymsg(iov, iovcnt, line, tmout)
struct iovec *iov;
int iovcnt;
char *line;
const char *line;
int tmout;
{
static char device[MAXNAMLEN] = _PATH_DEV;