Skip to content

Commit

Permalink
BSD 4.4 Lite Libexec Sources
Browse files Browse the repository at this point in the history
  • Loading branch information
rwgbsd committed May 27, 1994
1 parent 9b50d90 commit ea022d1
Show file tree
Hide file tree
Showing 107 changed files with 27,749 additions and 0 deletions.
12 changes: 12 additions & 0 deletions libexec/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# @(#)Makefile 8.1 (Berkeley) 6/4/93

SUBDIR= bugfiler comsat fingerd ftpd getNAME getty kpasswdd lfs_cleanerd \
mail.local makekey rexecd rlogind rshd talkd telnetd tftpd uucpd

.if ${MACHINE} == "hp300"
SUBDIR+=rbootd
.elif ${MACHINE} == "luna68k"
SUBDIR+=rbootd
.endif

.include <bsd.subdir.mk>
3 changes: 3 additions & 0 deletions libexec/Makefile.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# @(#)Makefile.inc 8.1 (Berkeley) 6/4/93

BINDIR?= /usr/libexec
17 changes: 17 additions & 0 deletions libexec/bugfiler/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# @(#)Makefile 8.1 (Berkeley) 6/4/93

PROG= bugfiler
CFLAGS+=-I${.CURDIR}
SRCS= bugfiler.c error.c gethead.c process.c redist.c reply.c
BINOWN= root
BINMODE=4555
MAN1= sendbug.0
MAN8= bugfiler.0

beforeinstall:
install -c -o bin -g ${BINGRP} -m 555 \
${.CURDIR}/sendbug.sh ${DESTDIR}/usr/bin/sendbug
install -c -o bin -g ${BINGRP} -m 444 ${.CURDIR}/bugformat \
${DESTDIR}/usr/share/misc

.include <bsd.prog.mk>
92 changes: 92 additions & 0 deletions libexec/bugfiler/bug.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
/*
* Copyright (c) 1986, 1987, 1993
* The Regents of the University of California. All rights reserved.
*
* 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 University of
* California, Berkeley and its contributors.
* 4. Neither the name of the University 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 REGENTS 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.
*
* @(#)bug.h 8.1 (Berkeley) 6/4/93
*/

#define BUGS_HOME "[email protected]"
#define BUGS_ID "bugs"

/*
* the METOO definition has the bugfiler exit with an error (-1) status
* if there's a problem. This causes sendmail to send off a copy of the
* report (as failed mail) to the "owner" of the mail alias that executed
* the bugfiler. This is great if you would have otherwise lost the bug
* report. It's not so great if you get a whole bunch of mail that you
* really don't want.
*/
#define METOO

/* files */
#define ACK_FILE "bug:ack" /* acknowledge file */
#define DIST_FILE "bug:redist" /* redistribution file */
#define ERROR_FILE "log" /* error file */
#define LOCK_FILE "bug:lock" /* lock file name */
#define SUMMARY_FILE "summary" /* summary file */
#define TMP_BUG "errors/BUG_XXXXXX" /* tmp bug report */
#define TMP_DIR "errors" /* tmp directory */

#define CHN (char *)NULL /* null arg string */
#define COMMENT '#' /* comment in redist file */
#define EOS (char)NULL /* end of string */
#define ERR -1 /* error return */
#define MAXLINELEN 200 /* max line length in message */
#define NO 0 /* no/false */
#define OK 0 /* okay return */
#define YES 1 /* yes/true */

typedef struct {
short found, /* line number if found */
redist; /* if part of redist headers */
int (*valid)(); /* validation routine */
short len; /* length of tag */
char *tag, /* leading tag */
*line; /* actual line */
} HEADER;
extern HEADER mailhead[];

#define DATE_TAG 0 /* "Date:" offset */
#define FROM_TAG 1 /* "From " offset */
#define CFROM_TAG 2 /* "From:" offset */
#define INDX_TAG 3 /* "Index:" offset */
#define MSG_TAG 4 /* "Message-Id:" offset */
#define RPLY_TAG 5 /* "Reply-To:" offset */
#define RET_TAG 6 /* "Return-Path:" offset */
#define SUBJ_TAG 7 /* "Subject:" offset */
#define TO_TAG 8 /* "To:" offset */
#define APPAR_TO_TAG 9 /* "Apparently-To:" offset */

/* so sizeof doesn't return 0 */
extern char bfr[MAXBSIZE], /* general I/O buffer */
dir[MAXNAMLEN], /* subject and folder */
folder[MAXNAMLEN],
tmpname[sizeof(TMP_BUG) + 5]; /* temp bug file */
Loading

0 comments on commit ea022d1

Please sign in to comment.