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;
58 struct afsconf_dir *bozo_confdir = 0; /* bozo configuration dir */
59 static char *bozo_pid;
60 struct rx_securityClass *bozo_rxsc[3];
61 const char *bozo_fileName;
63 extern int rx_stackSize; /* for rx_SetStackSize macro */
68 int DoSyslogFacility = LOG_DAEMON;
70 static afs_int32 nextRestart;
71 static afs_int32 nextDay;
73 struct ktime bozo_nextRestartKT, bozo_nextDayKT;
75 #ifdef BOS_RESTRICTED_MODE
76 int bozo_isrestricted=0;
77 int bozo_restdisable=0;
79 void bozo_insecureme(int sig)
81 signal(SIGFPE, bozo_insecureme);
91 /* check whether caller is authorized to manage RX statistics */
92 int bozo_rxstat_userok(struct rx_call *call)
94 return afsconf_SuperUser(bozo_confdir, call, NULL);
97 /* restart bozo process */
101 /* exit with restart code; SCM integrator process will restart bosserver */
102 int status = BOSEXIT_RESTART;
104 /* if noauth flag is set, pass "-noauth" to new bosserver */
105 if (afsconf_GetNoAuthFlag(bozo_confdir)) {
106 status |= BOSEXIT_NOAUTH_FLAG;
108 /* if logging is on, pass "-log" to new bosserver */
110 status |= BOSEXIT_LOGGING_FLAG;
114 /* exec new bosserver process */
118 argv[i] = (char *)AFSDIR_SERVER_BOSVR_FILEPATH;
121 /* if noauth flag is set, pass "-noauth" to new bosserver */
122 if (afsconf_GetNoAuthFlag(bozo_confdir)) {
126 /* if logging is on, pass "-log" to new bosserver */
133 /* if syslog logging is on, pass "-syslog" to new bosserver */
135 char *arg=(char *)malloc(40); /* enough for -syslog=# */
136 if ( DoSyslogFacility != LOG_DAEMON ) {
137 snprintf(arg, 40, "-syslog=%d", DoSyslogFacility);
139 strcpy(arg, "-syslog");
146 /* null-terminate argument list */
149 /* close random fd's */
150 for (i = 3; i < 64; i++) {
154 execv(argv[0], argv); /* should not return */
156 #endif /* AFS_NT40_ENV */
159 /* make sure a dir exists */
160 static int MakeDir(register char *adir)
163 register afs_int32 code;
164 if (stat(adir, &tstat) < 0 || (tstat.st_mode & S_IFMT) != S_IFDIR) {
167 reqPerm = GetRequiredDirPerm (adir);
168 if (reqPerm == -1) reqPerm = 0777;
170 /* underlying filesystem may not support directory protection */
173 code = mkdir(adir, reqPerm);
180 /* create all the bozo dirs */
181 static int CreateDirs()
183 MakeDir(AFSDIR_USR_DIRPATH);
184 MakeDir(AFSDIR_SERVER_AFS_DIRPATH);
185 MakeDir(AFSDIR_SERVER_BIN_DIRPATH);
186 MakeDir(AFSDIR_SERVER_ETC_DIRPATH);
187 MakeDir(AFSDIR_SERVER_LOCAL_DIRPATH);
188 MakeDir(AFSDIR_SERVER_DB_DIRPATH);
189 MakeDir(AFSDIR_SERVER_LOGS_DIRPATH);
191 MakeDir(AFSDIR_CLIENT_VICE_DIRPATH);
192 MakeDir(AFSDIR_CLIENT_ETC_DIRPATH);
194 symlink(AFSDIR_SERVER_THISCELL_FILEPATH, AFSDIR_CLIENT_THISCELL_FILEPATH);
195 symlink(AFSDIR_SERVER_CELLSERVDB_FILEPATH, AFSDIR_CLIENT_CELLSERVDB_FILEPATH);
196 #endif /* AFS_NT40_ENV */
200 /* strip the \\n from the end of the line, if it is present */
201 static int StripLine(register char *abuffer)
205 tp = abuffer + strlen(abuffer); /* starts off pointing at the null */
206 if(tp == abuffer) return 0; /* null string, no last character to check */
207 tp--; /* aim at last character */
208 if (*tp == '\n') *tp = 0;
212 /* write one bnode's worth of entry into the file */
213 static bzwrite(register struct bnode *abnode, register struct bztemp *at)
216 char tbuffer[BOZO_BSSIZE];
217 register afs_int32 code;
219 if (abnode->notifier)
220 fprintf(at->file, "bnode %s %s %d %s\n",
221 abnode->type->name, abnode->name, abnode->fileGoal, abnode->notifier);
223 fprintf(at->file, "bnode %s %s %d\n", abnode->type->name, abnode->name, abnode->fileGoal);
225 code = bnode_GetParm(abnode, i, tbuffer, BOZO_BSSIZE);
227 if (code != BZDOM) return code;
230 fprintf(at->file, "parm %s\n", tbuffer);
232 fprintf(at->file, "end\n");
237 int ReadBozoFile(char *aname)
239 register FILE *tfile;
240 char tbuffer[BOZO_BSSIZE];
242 char *instp, *typep, *notifier, *notp;
243 register afs_int32 code;
244 afs_int32 ktmask, ktday, kthour, ktmin, ktsec;
247 char *parms[MAXPARMS];
248 #ifdef BOS_RESTRICTED_MODE
252 /* rename BozoInit to BosServer for the user */
254 /* if BozoInit exists and BosConfig doesn't, try a rename */
255 if (access(AFSDIR_SERVER_BOZINIT_FILEPATH, 0) == 0
256 && access(AFSDIR_SERVER_BOZCONF_FILEPATH, 0) != 0) {
257 code = renamefile(AFSDIR_SERVER_BOZINIT_FILEPATH, AFSDIR_SERVER_BOZCONF_FILEPATH);
259 perror("bosconfig rename");
261 #ifdef BOS_NEW_CONFIG
262 if (access(AFSDIR_SERVER_BOZCONFNEW_FILEPATH, 0) == 0) {
263 code = renamefile(AFSDIR_SERVER_BOZCONFNEW_FILEPATH,
264 AFSDIR_SERVER_BOZCONF_FILEPATH);
266 perror("bosconfig rename");
271 /* setup default times we want to do restarts */
272 bozo_nextRestartKT.mask = KTIME_HOUR | KTIME_MIN | KTIME_DAY;
273 bozo_nextRestartKT.hour = 4; /* 4 am */
274 bozo_nextRestartKT.min = 0;
275 bozo_nextRestartKT.day = 0; /* Sunday */
276 bozo_nextDayKT.mask = KTIME_HOUR | KTIME_MIN;
277 bozo_nextDayKT.hour = 5;
278 bozo_nextDayKT.min = 0;
280 for(code=0;code<MAXPARMS;code++)
282 instp = typep = notifier = NULL;
284 if (!aname) aname = (char *)bozo_fileName;
285 tfile = fopen(aname, "r");
288 instp = (char *) malloc(BOZO_BSSIZE);
289 typep = (char *) malloc(BOZO_BSSIZE);
290 notifier = notp = (char *) malloc(BOZO_BSSIZE);
292 /* ok, read lines giving parms and such from the file */
293 tp = fgets(tbuffer, sizeof(tbuffer), tfile);
294 if (tp == (char *) 0) break; /* all done */
296 if (strncmp(tbuffer, "restarttime", 11) == 0) {
297 code = sscanf(tbuffer, "restarttime %d %d %d %d %d",
298 &ktmask, &ktday, &kthour, &ktmin, &ktsec);
303 /* otherwise we've read in the proper ktime structure; now assign
304 it and continue processing */
305 bozo_nextRestartKT.mask = ktmask;
306 bozo_nextRestartKT.day = ktday;
307 bozo_nextRestartKT.hour = kthour;
308 bozo_nextRestartKT.min = ktmin;
309 bozo_nextRestartKT.sec = ktsec;
313 if (strncmp(tbuffer, "checkbintime", 12) == 0) {
314 code = sscanf(tbuffer, "checkbintime %d %d %d %d %d",
315 &ktmask, &ktday, &kthour, &ktmin, &ktsec);
320 /* otherwise we've read in the proper ktime structure; now assign
321 it and continue processing */
322 bozo_nextDayKT.mask = ktmask; /* time to restart the system */
323 bozo_nextDayKT.day = ktday;
324 bozo_nextDayKT.hour = kthour;
325 bozo_nextDayKT.min = ktmin;
326 bozo_nextDayKT.sec = ktsec;
330 #ifdef BOS_RESTRICTED_MODE
331 if (strncmp(tbuffer, "restrictmode", 12) == 0) {
332 code = sscanf(tbuffer, "restrictmode %d",
338 if (rmode !=0 && rmode != 1) {
342 bozo_isrestricted=rmode;
347 if (strncmp("bnode", tbuffer, 5) != 0) {
352 code = sscanf(tbuffer, "bnode %s %s %d %s", typep, instp, &goal, notifier);
356 } else if (code == 3)
359 for(i=0;i<MAXPARMS;i++) {
360 /* now read the parms, until we see an "end" line */
361 tp = fgets(tbuffer, sizeof(tbuffer), tfile);
367 if (!strncmp(tbuffer, "end", 3)) break;
368 if (strncmp(tbuffer, "parm ", 5)) {
370 goto fail; /* no "parm " either */
372 if (!parms[i]) /* make sure there's space */
373 parms[i] = (char *) malloc(BOZO_BSSIZE);
374 strcpy(parms[i], tbuffer+5); /* remember the parameter for later */
377 /* ok, we have the type and parms, now create the object */
378 code = bnode_Create(typep, instp, &tb, parms[0], parms[1], parms[2],
379 parms[3], parms[4], notifier,
380 goal ? BSTAT_NORMAL : BSTAT_SHUTDOWN);
383 /* bnode created in 'temporarily shutdown' state;
384 check to see if we are supposed to run this guy,
385 and if so, start the process up */
387 bnode_SetStat(tb, BSTAT_NORMAL); /* set goal, taking effect immediately */
390 bnode_SetStat(tb, BSTAT_SHUTDOWN);
397 if (instp) free(instp);
398 if (typep) free(typep);
399 for(i=0;i<MAXPARMS;i++) if (parms[i]) free(parms[i]);
400 if (tfile) fclose(tfile);
404 /* write a new bozo file */
405 int WriteBozoFile(char *aname)
407 register FILE *tfile;
408 char tbuffer[AFSDIR_PATH_MAX];
409 register afs_int32 code;
412 if (!aname) aname = (char *)bozo_fileName;
413 strcpy(tbuffer, aname);
414 strcat(tbuffer, ".NBZ");
415 tfile = fopen(tbuffer, "w");
416 if (!tfile) return -1;
418 #ifdef BOS_RESTRICTED_MODE
419 fprintf(tfile, "restrictmode %d\n", bozo_isrestricted);
421 fprintf(tfile, "restarttime %d %d %d %d %d\n", bozo_nextRestartKT.mask,
422 bozo_nextRestartKT.day, bozo_nextRestartKT.hour, bozo_nextRestartKT.min,
423 bozo_nextRestartKT.sec);
424 fprintf(tfile, "checkbintime %d %d %d %d %d\n", bozo_nextDayKT.mask,
425 bozo_nextDayKT.day, bozo_nextDayKT.hour, bozo_nextDayKT.min,
427 code = bnode_ApplyInstance(bzwrite, &btemp);
428 if (code || (code = ferror(tfile))) { /* something went wrong */
433 /* close the file, check for errors and snap new file into place */
434 if (fclose(tfile) == EOF) {
438 code = renamefile(tbuffer, aname);
446 static int bdrestart(register struct bnode *abnode, char *arock)
448 register afs_int32 code;
450 if (abnode->fileGoal != BSTAT_NORMAL || abnode->goal != BSTAT_NORMAL)
451 return 0; /* don't restart stopped bnodes */
453 code = bnode_RestartP(abnode);
455 /* restart the dude */
456 bnode_SetStat(abnode, BSTAT_SHUTDOWN);
457 bnode_WaitStatus(abnode, BSTAT_SHUTDOWN);
458 bnode_SetStat(abnode, BSTAT_NORMAL);
460 bnode_Release(abnode);
461 return 0; /* keep trying all bnodes */
464 #define BOZO_MINSKIP 3600 /* minimum to advance clock */
465 /* lwp to handle system restarts */
466 static int BozoDaemon()
468 register afs_int32 now;
470 /* now initialize the values */
474 now = FT_ApproxTime();
476 #ifdef BOS_RESTRICTED_MODE
477 if (bozo_restdisable) {
478 bozo_Log("Restricted mode disabled by signal\n");
482 if (bozo_newKTs) { /* need to recompute restart times */
483 bozo_newKTs = 0; /* done for a while */
484 nextRestart = ktime_next(&bozo_nextRestartKT, BOZO_MINSKIP);
485 nextDay = ktime_next(&bozo_nextDayKT, BOZO_MINSKIP);
488 /* see if we should do a restart */
489 if (now > nextRestart) {
490 SBOZO_ReBozo(0); /* doesn't come back */
493 /* see if we should restart a server */
495 nextDay = ktime_next(&bozo_nextDayKT, BOZO_MINSKIP);
497 /* call the bnode restartp function, and restart all that require it */
498 bnode_ApplyInstance(bdrestart, 0);
504 static int tweak_config()
508 int s, sb_max, ipfragttl;
512 f = popen("/usr/sbin/no -o sb_max", "r");
513 s = fscanf(f, "sb_max = %d", &sb_max);
517 f = popen("/usr/sbin/no -o ipfragttl", "r");
518 s = fscanf(f, "ipfragttl = %d", &ipfragttl);
528 sprintf(c, "/usr/sbin/no -o sb_max=%d -o ipfragttl=%d", sb_max, ipfragttl);
535 * This routine causes the calling process to go into the background and
536 * to lose its controlling tty.
538 * It does not close or otherwise alter the standard file descriptors.
540 * It writes warning messages to the standard error output if certain
541 * fundamental errors occur.
543 * This routine requires
545 * #include <sys/types.h>
546 * #include <sys/stat.h>
548 * #include <unistd.h>
549 * #include <stdlib.h>
551 * and has been tested on:
563 static void background(void)
566 * A process is a process group leader if its process ID
567 * (getpid()) and its process group ID (getpgrp()) are the same.
571 * To create a new session (and thereby lose our controlling
572 * terminal) we cannot be a process group leader.
574 * To guarantee we are not a process group leader, we fork and
575 * let the parent process exit.
578 if (getpid() == getpgrp()) {
583 abort(); /* leave footprints */
587 default: /* parent */
594 * By here, we are not a process group leader, so we can make a
595 * new session and become the session leader.
599 pid_t sid = setsid();
602 static char err[] = "bosserver: WARNING: setsid() failed\n";
603 write(STDERR_FILENO, err, sizeof err - 1);
608 * Once we create a new session, the current process is a
609 * session leader without a controlling tty.
611 * On some systems, the first tty device the session leader
612 * opens automatically becomes the controlling tty for the
615 * So, to guarantee we do not acquire a controlling tty, we fork
616 * and let the parent process exit. The child process is not a
617 * session leader, and so it will not acquire a controlling tty
618 * even if it should happen to open a tty device.
621 if (getpid() == getpgrp()) {
626 abort(); /* leave footprints */
630 default: /* parent */
637 * check that we no longer have a controlling tty
643 fd = open("/dev/tty", O_RDONLY);
646 static char err[] = "bosserver: WARNING: /dev/tty still attached\n";
648 write(STDERR_FILENO, err, sizeof err - 1);
652 #endif /* ! AFS_NT40_ENV */
654 /* start a process and monitor it */
656 #include "AFS_component_version_number.c"
658 int main (int argc, char **argv, char **envp)
660 struct rx_service *tservice;
661 register afs_int32 code;
662 struct afsconf_dir *tdir;
664 struct ktc_encryptionKey tkey;
666 char namebuf[AFSDIR_PATH_MAX];
671 struct sigaction nsa;
673 /* for some reason, this permits user-mode RX to run a lot faster.
674 * we do it here in the bosserver, so we don't have to do it
675 * individually in each server.
680 * The following signal action for AIX is necessary so that in case of a
681 * crash (i.e. core is generated) we can include the user's data section
682 * in the core dump. Unfortunately, by default, only a partial core is
683 * generated which, in many cases, isn't too useful.
685 sigemptyset(&nsa.sa_mask);
686 nsa.sa_handler = SIG_DFL;
687 nsa.sa_flags = SA_FULLDUMP;
688 sigaction(SIGSEGV, &nsa, NULL);
689 sigaction(SIGABRT, &nsa, NULL);
691 #ifdef BOS_RESTRICTED_MODE
692 signal(SIGFPE, bozo_insecureme);
696 /* Initialize winsock */
697 if (afs_winsockInit() < 0) {
698 ReportErrorEventAlt(AFSEVT_SVR_WINSOCK_INIT_FAILED, 0, argv[0], 0);
699 fprintf(stderr, "%s: Couldn't initialize winsock.\n", argv[0]);
704 /* Initialize dirpaths */
705 if (!(initAFSDirPath() & AFSDIR_SERVER_PATHS_OK)) {
707 ReportErrorEventAlt(AFSEVT_SVR_NO_INSTALL_DIR, 0, argv[0], 0);
709 fprintf(stderr, "%s: Unable to obtain AFS server directory.\n", argv[0]);
713 /* some path inits */
714 bozo_fileName = AFSDIR_SERVER_BOZCONF_FILEPATH;
716 /* initialize the list of dirpaths that the bosserver has
717 * an interest in monitoring */
720 #if defined(AFS_SGI_ENV)
721 /* offer some protection if AFS isn't loaded */
722 if (syscall(AFS_SYSCALL, AFSOP_ENDLOG) < 0 && errno == ENOPKG) {
723 printf("bosserver: AFS doesn't appear to be configured in O.S..\n");
729 for(code=1;code<argc;code++) {
730 if (strcmp(argv[code], "-noauth")==0) {
731 /* set noauth flag */
734 else if (strcmp(argv[code], "-log")==0) {
735 /* set extra logging flag */
739 else if (strcmp(argv[code], "-syslog")==0) {
740 /* set syslog logging flag */
743 else if (strncmp(argv[code], "-syslog=",8)==0) {
745 DoSyslogFacility = atoi(argv[code]+8);
747 else if (strcmp(argv[code], "-nofork")==0) {
751 else if (strcmp(argv[code], "-enable_peer_stats")==0) {
752 rx_enablePeerRPCStats();
754 else if (strcmp(argv[code], "-enable_process_stats")==0) {
755 rx_enableProcessRPCStats();
757 #ifdef BOS_RESTRICTED_MODE
758 else if (strcmp(argv[code], "-restricted")==0) {
764 /* hack to support help flag */
767 printf("Usage: bosserver [-noauth] [-log] "
768 "[-syslog[=FACILITY]] "
769 "[-enable_peer_stats] [-enable_process_stats] "
773 printf("Usage: bosserver [-noauth] [-log] "
774 "[-enable_peer_stats] [-enable_process_stats] "
784 if (geteuid() != 0) {
785 printf("bosserver: must be run as root.\n");
792 printf("bosserver: could not init bnode package, code %d\n", code);
796 bnode_Register("fs", &fsbnode_ops, 3);
797 bnode_Register("simple", &ezbnode_ops, 1);
798 bnode_Register("cron", &cronbnode_ops, 2);
800 /* create useful dirs */
803 /* chdir to AFS log directory */
804 chdir(AFSDIR_SERVER_LOGS_DIRPATH);
807 fputs(AFS_GOVERNMENT_MESSAGE, stdout);
811 /* go into the background and remove our controlling tty */
816 #endif /* ! AFS_NT40_ENV */
819 strcpy(namebuf, AFSDIR_BOZLOG_FILE);
820 strcat(namebuf, ".old");
821 renamefile(AFSDIR_BOZLOG_FILE, namebuf); /* try rename first */
822 bozo_logFile = fopen(AFSDIR_BOZLOG_FILE, "a");
824 printf("bosserver: can't initialize log file (%s).\n",
825 AFSDIR_SERVER_BOZLOG_FILEPATH);
828 /* keep log closed normally, so can be removed */
829 fclose(bozo_logFile);
832 openlog("bosserver", LOG_PID, DoSyslogFacility);
836 /* Write current state of directory permissions to log file */
840 code = rx_Init(htons(AFSCONF_NANNYPORT));
842 bozo_Log("can't initialize rx: code=%d\n",code);
848 bozo_Log("Bos giving up, can't initialize rx\n");
852 code = LWP_CreateProcess(BozoDaemon, BOZO_LWP_STACKSIZE, /* priority */ 1,
853 /* parm */0, "bozo-the-clown", &bozo_pid);
855 /* try to read the key from the config file */
856 tdir = afsconf_Open(AFSDIR_SERVER_ETC_DIRPATH);
858 /* try to create local cell config file */
859 struct afsconf_cell tcell;
860 strcpy(tcell.name, "localcell");
861 tcell.numServers = 1;
862 code = gethostname(tcell.hostName[0], MAXHOSTCHARS);
864 bozo_Log("failed to get hostname, code %d\n", errno);
867 if (tcell.hostName[0][0] == 0) {
868 bozo_Log("host name not set, can't start\n");
869 bozo_Log("try the 'hostname' command\n");
872 memset(tcell.hostAddr, 0, sizeof(tcell.hostAddr)); /* not computed */
873 code = afsconf_SetCellInfo(bozo_confdir, AFSDIR_SERVER_ETC_DIRPATH, &tcell);
875 bozo_Log("could not create cell database in '%s' (code %d), quitting\n", AFSDIR_SERVER_ETC_DIRPATH, code);
878 tdir = afsconf_Open(AFSDIR_SERVER_ETC_DIRPATH);
880 bozo_Log("failed to open newly-created cell database, quitting\n");
885 /* read init file, starting up programs */
886 if (code=ReadBozoFile(0)) {
887 bozo_Log("bosserver: Something is wrong (%d) with the bos configuration file %s; aborting\n", code, AFSDIR_SERVER_BOZCONF_FILEPATH);
891 /* opened the cell databse */
893 code = afsconf_GetKey(tdir, 999, &tkey);
895 /* allow super users to manage RX statistics */
896 rx_SetRxStatUserOk(bozo_rxstat_userok);
898 /* have bcrypt key now */
900 afsconf_SetNoAuthFlag(tdir, noAuth);
902 bozo_rxsc[0] = rxnull_NewServerSecurityObject();
903 bozo_rxsc[1] = (struct rx_securityClass *) 0;
904 bozo_rxsc[2] = rxkad_NewServerSecurityObject(
905 0, tdir, afsconf_GetKey, NULL);
907 /* Disable jumbograms */
910 tservice = rx_NewService(/* port */ 0, /* service id */ 1,
911 /*service name */ "bozo", /* security classes */ bozo_rxsc,
912 /* numb sec classes */ 3, BOZO_ExecuteRequest);
913 rx_SetMinProcs(tservice, 2);
914 rx_SetMaxProcs(tservice, 4);
915 rx_SetStackSize(tservice, BOZO_LWP_STACKSIZE); /* so gethostbyname works (in cell stuff) */
917 tservice = rx_NewService(0, RX_STATS_SERVICE_ID, "rpcstats", bozo_rxsc,
918 3, RXSTATS_ExecuteRequest);
919 rx_SetMinProcs(tservice, 2);
920 rx_SetMaxProcs(tservice, 4);
921 rx_StartServer(1); /* donate this process */
924 void bozo_Log(char *a, char *b, char *c, char *d, char *e, char *f)
931 syslog(LOG_INFO, a, b, c, d, e, f);
935 strcpy(tdate, ctime(&myTime)); /* copy out of static area asap */
938 /* log normally closed, so can be removed */
940 bozo_logFile=fopen(AFSDIR_SERVER_BOZLOG_FILEPATH, "a");
941 if(bozo_logFile == NULL) {
942 printf("bosserver: WARNING: problem with %s", AFSDIR_SERVER_BOZLOG_FILEPATH);
947 fprintf(bozo_logFile, "%s ", tdate);
948 fprintf(bozo_logFile, a, b, c, d, e, f);
949 fflush(bozo_logFile);
951 printf("%s ", tdate);
952 printf(a, b, c, d, e, f);
955 /* close so rm BosLog works */
956 fclose(bozo_logFile);