WARNS?=1. RCS ids. did not merge very much of lite-2.

This commit is contained in:
mrg 1997-10-07 13:07:44 +00:00
parent 49a7341d45
commit 08a6736e8b
4 changed files with 39 additions and 33 deletions

View File

@ -1,9 +1,11 @@
# $NetBSD: Makefile,v 1.4 1997/04/21 11:29:26 mrg Exp $ # $NetBSD: Makefile,v 1.5 1997/10/07 13:07:44 mrg Exp $
# from: @(#)Makefile 5.3 (Berkeley) 1/17/91 # from: @(#)Makefile 8.1 (Berkeley) 7/19/93
WARNS?= 1
PROG= mail.local PROG= mail.local
MAN= mail.local.8 MAN= mail.local.8
BINOWN= root BINOWN= root
BINMODE=4555 BINMODE=4555
#INSTALLFLAGS=-fschg
.include <bsd.prog.mk> .include <bsd.prog.mk>

View File

@ -1,4 +1,4 @@
.\" $NetBSD: mail.local.8,v 1.4 1997/04/21 11:29:27 mrg Exp $ .\" $NetBSD: mail.local.8,v 1.5 1997/10/07 13:07:45 mrg Exp $
.\" .\"
.\" Copyright (c) 1990 The Regents of the University of California. .\" Copyright (c) 1990 The Regents of the University of California.
.\" All rights reserved. .\" All rights reserved.
@ -31,10 +31,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE. .\" SUCH DAMAGE.
.\" .\"
.\" from: @(#)mail.local.8 6.8 (Berkeley) 4/27/91 .\" from: @(#)mail.local.8 8.2 (Berkeley) 12/11/93
.\" $Id: mail.local.8,v 1.4 1997/04/21 11:29:27 mrg Exp $
.\" .\"
.Dd April 27, 1991 .Dd December 11, 1993
.Dt MAIL.LOCAL 8 .Dt MAIL.LOCAL 8
.Os .Os
.Sh NAME .Sh NAME
@ -48,7 +47,7 @@
.Sh DESCRIPTION .Sh DESCRIPTION
.Nm Mail.local .Nm Mail.local
reads the standard input up to an end-of-file and appends it to each reads the standard input up to an end-of-file and appends it to each
.Ar user 's .Ar user's
.Pa mail .Pa mail
file. file.
The The

View File

@ -1,8 +1,8 @@
/* $NetBSD: mail.local.c,v 1.10 1997/04/21 11:29:28 mrg Exp $ */ /* $NetBSD: mail.local.c,v 1.11 1997/10/07 13:07:45 mrg Exp $ */
/*- /*-
* Copyright (c) 1990 The Regents of the University of California. * Copyright (c) 1990, 1993, 1994
* All rights reserved. * The Regents of the University of California. All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions * modification, are permitted provided that the following conditions
@ -33,31 +33,34 @@
* SUCH DAMAGE. * SUCH DAMAGE.
*/ */
#include <sys/cdefs.h>
#ifndef lint #ifndef lint
char copyright[] = __COPYRIGHT("@(#) Copyright (c) 1990, 1993, 1994\n\
"@(#) Copyright (c) 1990 The Regents of the University of California.\n\ The Regents of the University of California. All rights reserved.\n");
All rights reserved.\n"; #if 0
#endif /* not lint */ static char sccsid[] = "@(#)mail.local.c 8.22 (Berkeley) 6/21/95";
#else
#ifndef lint __RCSID("$NetBSD: mail.local.c,v 1.11 1997/10/07 13:07:45 mrg Exp $");
/*static char sccsid[] = "from: @(#)mail.local.c 5.6 (Berkeley) 6/19/91";*/ #endif
static char rcsid[] = "$NetBSD: mail.local.c,v 1.10 1997/04/21 11:29:28 mrg Exp $";
#endif /* not lint */ #endif /* not lint */
#include <sys/param.h> #include <sys/param.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <sys/socket.h> #include <sys/socket.h>
#include <netinet/in.h> #include <netinet/in.h>
#include <syslog.h>
#include <fcntl.h>
#include <netdb.h>
#include <pwd.h>
#include <time.h>
#include <unistd.h>
#include <errno.h> #include <errno.h>
#include <fcntl.h>
#include <pwd.h>
#include <netdb.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <syslog.h>
#include <time.h>
#include <unistd.h>
#include "pathnames.h" #include "pathnames.h"
#define FATAL 1 #define FATAL 1
@ -68,18 +71,21 @@ void err __P((int, const char *, ...));
void notifybiff __P((char *)); void notifybiff __P((char *));
int store __P((char *)); int store __P((char *));
void usage __P((void)); void usage __P((void));
int main __P((int, char **));
int
main(argc, argv) main(argc, argv)
int argc; int argc;
char **argv; char **argv;
{ {
extern int optind;
extern char *optarg;
struct passwd *pw; struct passwd *pw;
int ch, fd, eval, lockfile=0; int ch, fd, eval, lockfile = 0;
uid_t uid; uid_t uid;
char *from; char *from;
/* use a reasonable umask */
(void) umask(0077);
openlog("mail.local", LOG_PERROR, LOG_MAIL); openlog("mail.local", LOG_PERROR, LOG_MAIL);
from = NULL; from = NULL;
@ -126,7 +132,7 @@ int
store(from) store(from)
char *from; char *from;
{ {
FILE *fp; FILE *fp = NULL; /* XXX gcc */
time_t tval; time_t tval;
int fd, eline; int fd, eline;
char *tn, line[2048]; char *tn, line[2048];

View File

@ -1,8 +1,8 @@
/* $NetBSD: pathnames.h,v 1.3 1997/04/21 11:29:29 mrg Exp $ */ /* $NetBSD: pathnames.h,v 1.4 1997/10/07 13:07:46 mrg Exp $ */
/*- /*-
* Copyright (c) 1990 The Regents of the University of California. * Copyright (c) 1990, 1993
* All rights reserved. * The Regents of the University of California. All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions * modification, are permitted provided that the following conditions
@ -32,8 +32,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE. * SUCH DAMAGE.
* *
* from: @(#)pathnames.h 5.3 (Berkeley) 1/17/91 * from: @(#)pathnames.h 8.1 (Berkeley) 6/4/93
* $Id: pathnames.h,v 1.3 1997/04/21 11:29:29 mrg Exp $
*/ */
#include <paths.h> #include <paths.h>