X-Git-Url: https://git.subgeniuskitty.com/unix-history/.git/blobdiff_plain/70c98dc6c8a17ed2fb6da5b4d027f4589ed6567e..435e8dffcf378b5a0513c17aabf4f32096c20da8:/usr/src/libexec/bugfiler/bug.h diff --git a/usr/src/libexec/bugfiler/bug.h b/usr/src/libexec/bugfiler/bug.h index 84a84f93d2..5f9b909f6a 100644 --- a/usr/src/libexec/bugfiler/bug.h +++ b/usr/src/libexec/bugfiler/bug.h @@ -1,52 +1,43 @@ /* - * Copyright (c) 1986 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. + * Copyright (c) 1986, 1987 Regents of the University of California. + * All rights reserved. * - * @(#)bug.h 1.1 (Berkeley) 11/25/86 + * Redistribution and use in source and binary forms are permitted + * provided that the above copyright notice and this paragraph are + * duplicated in all such forms and that any documentation, + * advertising materials, and other materials related to such + * distribution and use acknowledge that the software was developed + * by the University of California, Berkeley. The name of the + * University may not be used to endorse or promote products derived + * from this software without specific prior written permission. + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED + * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * @(#)bug.h 5.8 (Berkeley) %G% */ -#define BUGS_HOME "owner-bugs@ucbvax.BERKELEY.EDU" +#define BUGS_HOME "owner-bugs@ucbvax.Berkeley.EDU" #define BUGS_ID "bugs" -#define MAIL_CMD "/usr/lib/sendmail -i -t -F \"Bugs Bunny\" -f owner-bugs@ucbvax.BERKELEY.EDU" /* * the METOO definition has the bugfiler exit with an error (-1) status - * if there's a problem. Sendmail then mails off a copy of the problem - * mail to "owner-bugs". 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. + * 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 -#include -#define GET_LOCK { \ - if (flock(lfd,LOCK_EX)) { \ - perror(LOCK_FILE); \ - exit(ERR); \ - } \ -} - -#define REL_LOCK { \ - if (flock(lfd,LOCK_UN)) { \ - perror(LOCK_FILE); \ - exit(ERR); \ - } \ -} - /* files */ -#define ACK_FILE ".ack" /* acknowledge file */ -#define DEF_DIR "mail" /* top-level directory */ -#define DIST_FILE ".redist" /* redistribution file */ +#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_FILE "/tmp/BUG_XXXXXX" /* tmp file name */ - -/* permissions */ -#define DIR_MODE 0750 /* directory creation mode */ -#define FILE_MODE 0644 /* file creation mode */ +#define TMP_DIR "errors" /* tmp directory */ #define CHN (char *)NULL /* null arg string */ #define COMMENT '#' /* comment in redist file */ @@ -65,6 +56,7 @@ typedef struct { char *tag, /* leading tag */ *line; /* actual line */ } HEADER; +extern HEADER mailhead[]; #define DATE_TAG 0 /* "Date:" offset */ #define FROM_TAG 1 /* "From " offset */ @@ -75,7 +67,12 @@ typedef struct { #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 */ #include -extern char bfr[MAXBSIZE]; /* general I/O buffer */ +#include +extern char bfr[MAXBSIZE], /* general I/O buffer */ + dir[MAXNAMLEN], /* subject and folder */ + folder[MAXNAMLEN], + tmpname[sizeof(TMP_BUG) + 5]; /* temp bug file */