|
|
Power 6/32 Unix version 1.21
/* D.L.Buck and Associates, Inc. - February, 1983
*
* COPYRIGHT NOTICE:
* Copyright c 1983 - An unpublished work by
* D.L.Buck and Associates, Inc.
*
* PROPRIETARY RIGHTS NOTICE:
* All rights reserved. This document and program contains
* proprietary information of D.L.Buck and Associates,Inc.
* of San Jose, California, U.S.A., embodying confidential
* information, ideas, and expressions, no part of which
* may be reproduced, or transmitted in any form or by any
* means, electronic, mechanical, or otherwise, without
* the written permission of D.L.Buck and Associates, Inc.
* NAME
* em_audnm -- name the audit file
*
* DESCRIPTION
* If the primary audit file (/usr/spool/bscbatch/<hostname>/AUDIT) is
* in use, this routine creates a secondary audit file to make entries
* in. bsclog sorts and merges all files which begin with AUDIT before
* it displays the log, fear not.
*/
#include "empr.h"
#define spoolpath "/usr/spool/bscbatch/"
static char sccsid[] = "@(#)em_audnm.c 1.1 "; /* sccs id */
extern char hostname[];
extern char audname[]; /* temp audit file name goes here */
extern char new_audnm[]; /* real audit file name goes here */
extern FILE *aud;
em_audnm()
{
int pid; /* process number to give unique name to this
audit file by */
pid = getpid();
sprintf(audname,"%s%s/TUDIT.%d",spoolpath,hostname,pid);
sprintf(new_audnm,"%s%s/AUDIT.%d",spoolpath,hostname,pid);
aud = fopen(audname,"a");
}
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.