2 * Copyright 2000, International Business Machines Corporation and others.
5 * This software has been released under the terms of the IBM Public
6 * License. For details, see the LICENSE file in the top-level source
7 * directory or online at http://www.openafs.org/dl/license10.html
10 #include <afsconfig.h>
11 #include <afs/param.h>
16 #include <sys/types.h>
27 #include <WINNT/afsevent.h>
30 #include <netinet/in.h>
32 #endif /* AFS_NT40_ENV */
33 #include <afs/cellconfig.h>
36 #include <rx/rx_globals.h>
41 #include <afs/ktime.h>
42 #include <afs/afsutil.h>
43 #include <afs/fileutil.h>
44 #include <afs/procmgmt.h> /* signal(), kill(), wait(), etc. */
45 #if defined(AFS_SGI_ENV)
46 #include <afs/afs_args.h>
50 #define BOZO_LWP_STACKSIZE 16000
51 extern int BOZO_ExecuteRequest();
52 extern int RXSTATS_ExecuteRequest();
53 extern int afsconf_GetKey();
54 extern struct bnode_ops fsbnode_ops, ezbnode_ops, cronbnode_ops;
55 struct afsconf_dir *bozo_confdir = 0; /* bozo configuration dir */
56 static char *bozo_pid;
57 struct rx_securityClass *bozo_rxsc[3];
58 const char *bozo_fileName;
60 extern int rx_stackSize; /* for rx_SetStackSize macro */
65 int DoSyslogFacility = LOG_DAEMON;
67 static afs_int32 nextRestart;
68 static afs_int32 nextDay;
70 struct ktime bozo_nextRestartKT, bozo_nextDayKT;
72 #ifdef BOS_RESTRICTED_MODE
73 int bozo_isrestricted=0;
74 int bozo_restdisable=0;
76 void bozo_insecureme(int sig)
78 signal(SIGFPE, bozo_insecureme);
88 /* check whether caller is authorized to manage RX statistics */
89 int bozo_rxstat_userok(call)
92 return afsconf_SuperUser(bozo_confdir, call, (char *)0);
95 /* restart bozo process */
98 /* exit with restart code; SCM integrator process will restart bosserver */
99 int status = BOSEXIT_RESTART;
101 /* if noauth flag is set, pass "-noauth" to new bosserver */
102 if (afsconf_GetNoAuthFlag(bozo_confdir)) {
103 status |= BOSEXIT_NOAUTH_FLAG;
105 /* if logging is on, pass "-log" to new bosserver */
107 status |= BOSEXIT_LOGGING_FLAG;
111 /* exec new bosserver process */
115 argv[i] = (char *)AFSDIR_SERVER_BOSVR_FILEPATH;
118 /* if noauth flag is set, pass "-noauth" to new bosserver */
119 if (afsconf_GetNoAuthFlag(bozo_confdir)) {
123 /* if logging is on, pass "-log" to new bosserver */
130 /* if syslog logging is on, pass "-syslog" to new bosserver */
132 char *arg=(char *)malloc(40); /* enough for -syslog=# */
133 if ( DoSyslogFacility != LOG_DAEMON ) {
134 snprintf(arg, 40, "-syslog=%d", DoSyslogFacility);
136 strcpy(arg, "-syslog");
143 /* null-terminate argument list */
146 /* close random fd's */
147 for (i = 3; i < 64; i++) {
151 execv(argv[0], argv); /* should not return */
153 #endif /* AFS_NT40_ENV */
156 /* make sure a dir exists */
158 register char *adir; {
160 register afs_int32 code;
161 if (stat(adir, &tstat) < 0 || (tstat.st_mode & S_IFMT) != S_IFDIR) {
164 reqPerm = GetRequiredDirPerm (adir);
165 if (reqPerm == -1) reqPerm = 0777;
167 /* underlying filesystem may not support directory protection */
170 code = mkdir(adir, reqPerm);
177 /* create all the bozo dirs */
178 static CreateDirs() {
180 MakeDir(AFSDIR_USR_DIRPATH);
181 MakeDir(AFSDIR_SERVER_AFS_DIRPATH);
182 MakeDir(AFSDIR_SERVER_BIN_DIRPATH);
183 MakeDir(AFSDIR_SERVER_ETC_DIRPATH);
184 MakeDir(AFSDIR_SERVER_LOCAL_DIRPATH);
185 MakeDir(AFSDIR_SERVER_DB_DIRPATH);
186 MakeDir(AFSDIR_SERVER_LOGS_DIRPATH);
188 MakeDir(AFSDIR_CLIENT_VICE_DIRPATH);
189 MakeDir(AFSDIR_CLIENT_ETC_DIRPATH);
191 symlink(AFSDIR_SERVER_THISCELL_FILEPATH, AFSDIR_CLIENT_THISCELL_FILEPATH);
192 symlink(AFSDIR_SERVER_CELLSERVDB_FILEPATH, AFSDIR_CLIENT_CELLSERVDB_FILEPATH);
193 #endif /* AFS_NT40_ENV */
197 /* strip the \\n from the end of the line, if it is present */
198 static StripLine(abuffer)
199 register char *abuffer; {
202 tp = abuffer + strlen(abuffer); /* starts off pointing at the null */
203 if(tp == abuffer) return 0; /* null string, no last character to check */
204 tp--; /* aim at last character */
205 if (*tp == '\n') *tp = 0;
209 /* write one bnode's worth of entry into the file */
210 static bzwrite(abnode, at)
211 register struct bnode *abnode;
212 register struct bztemp *at; {
214 char tbuffer[BOZO_BSSIZE];
215 register afs_int32 code;
217 if (abnode->notifier)
218 fprintf(at->file, "bnode %s %s %d %s\n",
219 abnode->type->name, abnode->name, abnode->fileGoal, abnode->notifier);
221 fprintf(at->file, "bnode %s %s %d\n", abnode->type->name, abnode->name, abnode->fileGoal);
223 code = bnode_GetParm(abnode, i, tbuffer, BOZO_BSSIZE);
225 if (code != BZDOM) return code;
228 fprintf(at->file, "parm %s\n", tbuffer);
230 fprintf(at->file, "end\n");
237 register FILE *tfile;
238 char tbuffer[BOZO_BSSIZE];
240 char *instp, *typep, *notifier, *notp;
241 register afs_int32 code;
242 afs_int32 ktmask, ktday, kthour, ktmin, ktsec;
245 char *parms[MAXPARMS];
246 #ifdef BOS_RESTRICTED_MODE
250 /* rename BozoInit to BosServer for the user */
252 /* if BozoInit exists and BosConfig doesn't, try a rename */
253 if (access(AFSDIR_SERVER_BOZINIT_FILEPATH, 0) == 0
254 && access(AFSDIR_SERVER_BOZCONF_FILEPATH, 0) != 0) {
255 code = renamefile(AFSDIR_SERVER_BOZINIT_FILEPATH, AFSDIR_SERVER_BOZCONF_FILEPATH);
257 perror("bosconfig rename");
259 #ifdef BOS_NEW_CONFIG
260 if (access(AFSDIR_SERVER_BOZCONFNEW_FILEPATH, 0) == 0) {
261 code = renamefile(AFSDIR_SERVER_BOZCONFNEW_FILEPATH,
262 AFSDIR_SERVER_BOZCONF_FILEPATH);
264 perror("bosconfig rename");
269 /* setup default times we want to do restarts */
270 bozo_nextRestartKT.mask = KTIME_HOUR | KTIME_MIN | KTIME_DAY;
271 bozo_nextRestartKT.hour = 4; /* 4 am */
272 bozo_nextRestartKT.min = 0;
273 bozo_nextRestartKT.day = 0; /* Sunday */
274 bozo_nextDayKT.mask = KTIME_HOUR | KTIME_MIN;
275 bozo_nextDayKT.hour = 5;
276 bozo_nextDayKT.min = 0;
278 for(code=0;code<MAXPARMS;code++)
279 parms[code] = (char *) 0;
280 instp = typep = notifier = (char *) 0;
282 if (!aname) aname = (char *)bozo_fileName;
283 tfile = fopen(aname, "r");
286 instp = (char *) malloc(BOZO_BSSIZE);
287 typep = (char *) malloc(BOZO_BSSIZE);
288 notifier = notp = (char *) malloc(BOZO_BSSIZE);
290 /* ok, read lines giving parms and such from the file */
291 tp = fgets(tbuffer, sizeof(tbuffer), tfile);
292 if (tp == (char *) 0) break; /* all done */
294 if (strncmp(tbuffer, "restarttime", 11) == 0) {
295 code = sscanf(tbuffer, "restarttime %d %d %d %d %d",
296 &ktmask, &ktday, &kthour, &ktmin, &ktsec);
301 /* otherwise we've read in the proper ktime structure; now assign
302 it and continue processing */
303 bozo_nextRestartKT.mask = ktmask;
304 bozo_nextRestartKT.day = ktday;
305 bozo_nextRestartKT.hour = kthour;
306 bozo_nextRestartKT.min = ktmin;
307 bozo_nextRestartKT.sec = ktsec;
311 if (strncmp(tbuffer, "checkbintime", 12) == 0) {
312 code = sscanf(tbuffer, "checkbintime %d %d %d %d %d",
313 &ktmask, &ktday, &kthour, &ktmin, &ktsec);
318 /* otherwise we've read in the proper ktime structure; now assign
319 it and continue processing */
320 bozo_nextDayKT.mask = ktmask; /* time to restart the system */
321 bozo_nextDayKT.day = ktday;
322 bozo_nextDayKT.hour = kthour;
323 bozo_nextDayKT.min = ktmin;
324 bozo_nextDayKT.sec = ktsec;
328 #ifdef BOS_RESTRICTED_MODE
329 if (strncmp(tbuffer, "restrictmode", 12) == 0) {
330 code = sscanf(tbuffer, "restrictmode %d",
336 if (rmode !=0 && rmode != 1) {
340 bozo_isrestricted=rmode;
345 if (strncmp("bnode", tbuffer, 5) != 0) {
350 code = sscanf(tbuffer, "bnode %s %s %d %s", typep, instp, &goal, notifier);
354 } else if (code == 3)
355 notifier = (char *)0;
357 for(i=0;i<MAXPARMS;i++) {
358 /* now read the parms, until we see an "end" line */
359 tp = fgets(tbuffer, sizeof(tbuffer), tfile);
365 if (!strncmp(tbuffer, "end", 3)) break;
366 if (strncmp(tbuffer, "parm ", 5)) {
368 goto fail; /* no "parm " either */
370 if (!parms[i]) /* make sure there's space */
371 parms[i] = (char *) malloc(BOZO_BSSIZE);
372 strcpy(parms[i], tbuffer+5); /* remember the parameter for later */
375 /* ok, we have the type and parms, now create the object */
376 code = bnode_Create(typep, instp, &tb, parms[0], parms[1], parms[2],
377 parms[3], parms[4], notifier,
378 goal ? BSTAT_NORMAL : BSTAT_SHUTDOWN);
381 /* bnode created in 'temporarily shutdown' state;
382 check to see if we are supposed to run this guy,
383 and if so, start the process up */
385 bnode_SetStat(tb, BSTAT_NORMAL); /* set goal, taking effect immediately */
388 bnode_SetStat(tb, BSTAT_SHUTDOWN);
395 if (instp) free(instp);
396 if (typep) free(typep);
397 for(i=0;i<MAXPARMS;i++) if (parms[i]) free(parms[i]);
398 if (tfile) fclose(tfile);
402 /* write a new bozo file */
405 register FILE *tfile;
406 char tbuffer[AFSDIR_PATH_MAX];
407 register afs_int32 code;
410 if (!aname) aname = (char *)bozo_fileName;
411 strcpy(tbuffer, aname);
412 strcat(tbuffer, ".NBZ");
413 tfile = fopen(tbuffer, "w");
414 if (!tfile) return -1;
416 #ifdef BOS_RESTRICTED_MODE
417 fprintf(tfile, "restrictmode %d\n", bozo_isrestricted);
419 fprintf(tfile, "restarttime %d %d %d %d %d\n", bozo_nextRestartKT.mask,
420 bozo_nextRestartKT.day, bozo_nextRestartKT.hour, bozo_nextRestartKT.min,
421 bozo_nextRestartKT.sec);
422 fprintf(tfile, "checkbintime %d %d %d %d %d\n", bozo_nextDayKT.mask,
423 bozo_nextDayKT.day, bozo_nextDayKT.hour, bozo_nextDayKT.min,
425 code = bnode_ApplyInstance(bzwrite, &btemp);
426 if (code || (code = ferror(tfile))) { /* something went wrong */
431 /* close the file, check for errors and snap new file into place */
432 if (fclose(tfile) == EOF) {
436 code = renamefile(tbuffer, aname);
444 static bdrestart(abnode, arock)
445 register struct bnode *abnode;
447 register afs_int32 code;
449 if (abnode->fileGoal != BSTAT_NORMAL || abnode->goal != BSTAT_NORMAL)
450 return 0; /* don't restart stopped bnodes */
452 code = bnode_RestartP(abnode);
454 /* restart the dude */
455 bnode_SetStat(abnode, BSTAT_SHUTDOWN);
456 bnode_WaitStatus(abnode, BSTAT_SHUTDOWN);
457 bnode_SetStat(abnode, BSTAT_NORMAL);
459 bnode_Release(abnode);
460 return 0; /* keep trying all bnodes */
463 #define BOZO_MINSKIP 3600 /* minimum to advance clock */
464 /* lwp to handle system restarts */
465 static BozoDaemon() {
466 register afs_int32 now;
468 /* now initialize the values */
472 now = FT_ApproxTime();
474 #ifdef BOS_RESTRICTED_MODE
475 if (bozo_restdisable) {
476 bozo_Log("Restricted mode disabled by signal\n");
480 if (bozo_newKTs) { /* need to recompute restart times */
481 bozo_newKTs = 0; /* done for a while */
482 nextRestart = ktime_next(&bozo_nextRestartKT, BOZO_MINSKIP);
483 nextDay = ktime_next(&bozo_nextDayKT, BOZO_MINSKIP);
486 /* see if we should do a restart */
487 if (now > nextRestart) {
488 BOZO_ReBozo(0); /* doesn't come back */
491 /* see if we should restart a server */
493 nextDay = ktime_next(&bozo_nextDayKT, BOZO_MINSKIP);
495 /* call the bnode restartp function, and restart all that require it */
496 bnode_ApplyInstance(bdrestart, 0);
502 static tweak_config()
506 int s, sb_max, ipfragttl;
510 f = popen("/usr/sbin/no -o sb_max", "r");
511 s = fscanf(f, "sb_max = %d", &sb_max);
515 f = popen("/usr/sbin/no -o ipfragttl", "r");
516 s = fscanf(f, "ipfragttl = %d", &ipfragttl);
526 sprintf(c, "/usr/sbin/no -o sb_max=%d -o ipfragttl=%d", sb_max, ipfragttl);
533 * This routine causes the calling process to go into the background and
534 * to lose its controlling tty.
536 * It does not close or otherwise alter the standard file descriptors.
538 * It writes warning messages to the standard error output if certain
539 * fundamental errors occur.
541 * This routine requires
543 * #include <sys/types.h>
544 * #include <sys/stat.h>
546 * #include <unistd.h>
547 * #include <stdlib.h>
549 * and has been tested on:
565 * A process is a process group leader if its process ID
566 * (getpid()) and its process group ID (getpgrp()) are the same.
570 * To create a new session (and thereby lose our controlling
571 * terminal) we cannot be a process group leader.
573 * To guarantee we are not a process group leader, we fork and
574 * let the parent process exit.
577 if (getpid() == getpgrp()) {
582 abort(); /* leave footprints */
586 default: /* parent */
593 * By here, we are not a process group leader, so we can make a
594 * new session and become the session leader.
598 pid_t sid = setsid();
601 static char err[] = "bosserver: WARNING: setsid() failed\n";
602 write(STDERR_FILENO, err, sizeof err - 1);
607 * Once we create a new session, the current process is a
608 * session leader without a controlling tty.
610 * On some systems, the first tty device the session leader
611 * opens automatically becomes the controlling tty for the
614 * So, to guarantee we do not acquire a controlling tty, we fork
615 * and let the parent process exit. The child process is not a
616 * session leader, and so it will not acquire a controlling tty
617 * even if it should happen to open a tty device.
620 if (getpid() == getpgrp()) {
625 abort(); /* leave footprints */
629 default: /* parent */
636 * check that we no longer have a controlling tty
642 fd = open("/dev/tty", O_RDONLY);
645 static char err[] = "bosserver: WARNING: /dev/tty still attached\n";
647 write(STDERR_FILENO, err, sizeof err - 1);
651 #endif /* ! AFS_NT40_ENV */
653 /* start a process and monitor it */
655 #include "AFS_component_version_number.c"
658 main (argc, argv,envp)
663 struct rx_service *tservice;
664 register afs_int32 code;
665 struct afsconf_dir *tdir;
667 struct ktc_encryptionKey tkey;
670 char namebuf[AFSDIR_PATH_MAX];
673 struct sigaction nsa;
675 /* for some reason, this permits user-mode RX to run a lot faster.
676 * we do it here in the bosserver, so we don't have to do it
677 * individually in each server.
682 * The following signal action for AIX is necessary so that in case of a
683 * crash (i.e. core is generated) we can include the user's data section
684 * in the core dump. Unfortunately, by default, only a partial core is
685 * generated which, in many cases, isn't too useful.
687 sigemptyset(&nsa.sa_mask);
688 nsa.sa_handler = SIG_DFL;
689 nsa.sa_flags = SA_FULLDUMP;
690 sigaction(SIGSEGV, &nsa, NULL);
691 sigaction(SIGABRT, &nsa, NULL);
693 #ifdef BOS_RESTRICTED_MODE
694 signal(SIGFPE, bozo_insecureme);
698 /* Initialize winsock */
699 if (afs_winsockInit() < 0) {
700 ReportErrorEventAlt(AFSEVT_SVR_WINSOCK_INIT_FAILED, 0, argv[0], 0);
701 fprintf(stderr, "%s: Couldn't initialize winsock.\n", argv[0]);
706 /* Initialize dirpaths */
707 if (!(initAFSDirPath() & AFSDIR_SERVER_PATHS_OK)) {
709 ReportErrorEventAlt(AFSEVT_SVR_NO_INSTALL_DIR, 0, argv[0], 0);
711 fprintf(stderr, "%s: Unable to obtain AFS server directory.\n", argv[0]);
715 /* some path inits */
716 bozo_fileName = AFSDIR_SERVER_BOZCONF_FILEPATH;
718 /* initialize the list of dirpaths that the bosserver has
719 * an interest in monitoring */
722 #if defined(AFS_SGI_ENV)
723 /* offer some protection if AFS isn't loaded */
724 if (syscall(AFS_SYSCALL, AFSOP_ENDLOG) < 0 && errno == ENOPKG) {
725 printf("bosserver: AFS doesn't appear to be configured in O.S..\n");
731 for(code=1;code<argc;code++) {
732 if (strcmp(argv[code], "-noauth")==0) {
733 /* set noauth flag */
736 else if (strcmp(argv[code], "-log")==0) {
737 /* set extra logging flag */
741 else if (strcmp(argv[code], "-syslog")==0) {
742 /* set syslog logging flag */
745 else if (strncmp(argv[code], "-syslog=",8)==0) {
747 DoSyslogFacility = atoi(argv[code]+8);
750 else if (strcmp(argv[code], "-enable_peer_stats")==0) {
751 rx_enablePeerRPCStats();
753 else if (strcmp(argv[code], "-enable_process_stats")==0) {
754 rx_enableProcessRPCStats();
756 #ifdef BOS_RESTRICTED_MODE
757 else if (strcmp(argv[code], "-restricted")==0) {
763 /* hack to support help flag */
766 printf("Usage: bosserver [-noauth] [-log] "
767 "[-syslog[=FACILITY]] "
768 "[-enable_peer_stats] [-enable_process_stats] "
771 printf("Usage: bosserver [-noauth] [-log] "
772 "[-enable_peer_stats] [-enable_process_stats] "
782 if (geteuid() != 0) {
783 printf("bosserver: must be run as root.\n");
790 printf("bosserver: could not init bnode package, code %d\n", code);
794 bnode_Register("fs", &fsbnode_ops, 3);
795 bnode_Register("simple", &ezbnode_ops, 1);
796 bnode_Register("cron", &cronbnode_ops, 2);
798 /* create useful dirs */
801 /* chdir to AFS log directory */
802 chdir(AFSDIR_SERVER_LOGS_DIRPATH);
805 fputs(AFS_GOVERNMENT_MESSAGE, stdout);
809 /* go into the background and remove our controlling tty */
813 #endif /* ! AFS_NT40_ENV */
816 strcpy(namebuf, AFSDIR_BOZLOG_FILE);
817 strcat(namebuf, ".old");
818 renamefile(AFSDIR_BOZLOG_FILE, namebuf); /* try rename first */
819 bozo_logFile = fopen(AFSDIR_BOZLOG_FILE, "a");
821 printf("bosserver: can't initialize log file (%s).\n",
822 AFSDIR_SERVER_BOZLOG_FILEPATH);
825 /* keep log closed normally, so can be removed */
826 fclose(bozo_logFile);
829 openlog("bosserver", LOG_PID, DoSyslogFacility);
833 /* Write current state of directory permissions to log file */
837 code = rx_Init(htons(AFSCONF_NANNYPORT));
839 bozo_Log("can't initialize rx: code=%d\n",code);
845 bozo_Log("Bos giving up, can't initialize rx\n");
849 code = LWP_CreateProcess(BozoDaemon, BOZO_LWP_STACKSIZE, /* priority */ 1,
850 /* parm */0, "bozo-the-clown", &bozo_pid);
852 /* try to read the key from the config file */
853 tdir = afsconf_Open(AFSDIR_SERVER_ETC_DIRPATH);
855 /* try to create local cell config file */
856 struct afsconf_cell tcell;
857 strcpy(tcell.name, "localcell");
858 tcell.numServers = 1;
859 code = gethostname(tcell.hostName[0], MAXHOSTCHARS);
861 bozo_Log("failed to get hostname, code %d\n", errno);
864 if (tcell.hostName[0][0] == 0) {
865 bozo_Log("host name not set, can't start\n");
866 bozo_Log("try the 'hostname' command\n");
869 memset(tcell.hostAddr, 0, sizeof(tcell.hostAddr)); /* not computed */
870 code = afsconf_SetCellInfo(bozo_confdir, AFSDIR_SERVER_ETC_DIRPATH, &tcell);
872 bozo_Log("could not create cell database in '%s' (code %d), quitting\n", AFSDIR_SERVER_ETC_DIRPATH, code);
875 tdir = afsconf_Open(AFSDIR_SERVER_ETC_DIRPATH);
877 bozo_Log("failed to open newly-created cell database, quitting\n");
882 /* read init file, starting up programs */
883 if (code=ReadBozoFile(0)) {
884 bozo_Log("bosserver: Something is wrong (%d) with the bos configuration file %s; aborting\n", code, AFSDIR_SERVER_BOZCONF_FILEPATH);
888 /* opened the cell databse */
890 code = afsconf_GetKey(tdir, 999, &tkey);
892 /* allow super users to manage RX statistics */
893 rx_SetRxStatUserOk(bozo_rxstat_userok);
895 /* have bcrypt key now */
897 afsconf_SetNoAuthFlag(tdir, noAuth);
899 bozo_rxsc[0] = (struct rx_securityClass *) rxnull_NewServerSecurityObject();
900 bozo_rxsc[1] = (struct rx_securityClass *) 0;
901 bozo_rxsc[2] = (struct rx_securityClass *) rxkad_NewServerSecurityObject(
902 0, tdir, afsconf_GetKey, (char *) 0);
904 /* These two lines disallow jumbograms */
905 rx_maxReceiveSize = OLD_MAX_PACKET_SIZE;
906 rxi_nSendFrags = rxi_nRecvFrags = 1;
908 tservice = rx_NewService(/* port */ 0, /* service id */ 1,
909 /*service name */ "bozo", /* security classes */ bozo_rxsc,
910 /* numb sec classes */ 3, BOZO_ExecuteRequest);
911 rx_SetMinProcs(tservice, 2);
912 rx_SetMaxProcs(tservice, 4);
913 rx_SetStackSize(tservice, BOZO_LWP_STACKSIZE); /* so gethostbyname works (in cell stuff) */
915 tservice = rx_NewService(0, RX_STATS_SERVICE_ID, "rpcstats", bozo_rxsc,
916 3, RXSTATS_ExecuteRequest);
917 rx_SetMinProcs(tservice, 2);
918 rx_SetMaxProcs(tservice, 4);
919 rx_StartServer(1); /* donate this process */
922 bozo_Log(a,b,c,d,e,f)
923 char *a, *b, *c, *d, *e, *f; {
929 syslog(LOG_INFO, a, b, c, d, e, f);
933 strcpy(tdate, ctime(&myTime)); /* copy out of static area asap */
936 /* log normally closed, so can be removed */
938 bozo_logFile=fopen(AFSDIR_SERVER_BOZLOG_FILEPATH, "a");
939 if(bozo_logFile == NULL) {
940 printf("bosserver: WARNING: problem with %s", AFSDIR_SERVER_BOZLOG_FILEPATH);
945 fprintf(bozo_logFile, "%s ", tdate);
946 fprintf(bozo_logFile, a, b, c, d, e, f);
947 fflush(bozo_logFile);
949 printf("%s ", tdate);
950 printf(a, b, c, d, e, f);
953 /* close so rm BosLog works */
954 fclose(bozo_logFile);