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(call)
95 return afsconf_SuperUser(bozo_confdir, call, (char *)0);
98 /* 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 */
161 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 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 StripLine(abuffer)
202 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(abnode, at)
214 register struct bnode *abnode;
215 register struct bztemp *at; {
217 char tbuffer[BOZO_BSSIZE];
218 register afs_int32 code;
220 if (abnode->notifier)
221 fprintf(at->file, "bnode %s %s %d %s\n",
222 abnode->type->name, abnode->name, abnode->fileGoal, abnode->notifier);
224 fprintf(at->file, "bnode %s %s %d\n", abnode->type->name, abnode->name, abnode->fileGoal);
226 code = bnode_GetParm(abnode, i, tbuffer, BOZO_BSSIZE);
228 if (code != BZDOM) return code;
231 fprintf(at->file, "parm %s\n", tbuffer);
233 fprintf(at->file, "end\n");
240 register FILE *tfile;
241 char tbuffer[BOZO_BSSIZE];
243 char *instp, *typep, *notifier, *notp;
244 register afs_int32 code;
245 afs_int32 ktmask, ktday, kthour, ktmin, ktsec;
248 char *parms[MAXPARMS];
249 #ifdef BOS_RESTRICTED_MODE
253 /* rename BozoInit to BosServer for the user */
255 /* if BozoInit exists and BosConfig doesn't, try a rename */
256 if (access(AFSDIR_SERVER_BOZINIT_FILEPATH, 0) == 0
257 && access(AFSDIR_SERVER_BOZCONF_FILEPATH, 0) != 0) {
258 code = renamefile(AFSDIR_SERVER_BOZINIT_FILEPATH, AFSDIR_SERVER_BOZCONF_FILEPATH);
260 perror("bosconfig rename");
262 #ifdef BOS_NEW_CONFIG
263 if (access(AFSDIR_SERVER_BOZCONFNEW_FILEPATH, 0) == 0) {
264 code = renamefile(AFSDIR_SERVER_BOZCONFNEW_FILEPATH,
265 AFSDIR_SERVER_BOZCONF_FILEPATH);
267 perror("bosconfig rename");
272 /* setup default times we want to do restarts */
273 bozo_nextRestartKT.mask = KTIME_HOUR | KTIME_MIN | KTIME_DAY;
274 bozo_nextRestartKT.hour = 4; /* 4 am */
275 bozo_nextRestartKT.min = 0;
276 bozo_nextRestartKT.day = 0; /* Sunday */
277 bozo_nextDayKT.mask = KTIME_HOUR | KTIME_MIN;
278 bozo_nextDayKT.hour = 5;
279 bozo_nextDayKT.min = 0;
281 for(code=0;code<MAXPARMS;code++)
282 parms[code] = (char *) 0;
283 instp = typep = notifier = (char *) 0;
285 if (!aname) aname = (char *)bozo_fileName;
286 tfile = fopen(aname, "r");
289 instp = (char *) malloc(BOZO_BSSIZE);
290 typep = (char *) malloc(BOZO_BSSIZE);
291 notifier = notp = (char *) malloc(BOZO_BSSIZE);
293 /* ok, read lines giving parms and such from the file */
294 tp = fgets(tbuffer, sizeof(tbuffer), tfile);
295 if (tp == (char *) 0) break; /* all done */
297 if (strncmp(tbuffer, "restarttime", 11) == 0) {
298 code = sscanf(tbuffer, "restarttime %d %d %d %d %d",
299 &ktmask, &ktday, &kthour, &ktmin, &ktsec);
304 /* otherwise we've read in the proper ktime structure; now assign
305 it and continue processing */
306 bozo_nextRestartKT.mask = ktmask;
307 bozo_nextRestartKT.day = ktday;
308 bozo_nextRestartKT.hour = kthour;
309 bozo_nextRestartKT.min = ktmin;
310 bozo_nextRestartKT.sec = ktsec;
314 if (strncmp(tbuffer, "checkbintime", 12) == 0) {
315 code = sscanf(tbuffer, "checkbintime %d %d %d %d %d",
316 &ktmask, &ktday, &kthour, &ktmin, &ktsec);
321 /* otherwise we've read in the proper ktime structure; now assign
322 it and continue processing */
323 bozo_nextDayKT.mask = ktmask; /* time to restart the system */
324 bozo_nextDayKT.day = ktday;
325 bozo_nextDayKT.hour = kthour;
326 bozo_nextDayKT.min = ktmin;
327 bozo_nextDayKT.sec = ktsec;
331 #ifdef BOS_RESTRICTED_MODE
332 if (strncmp(tbuffer, "restrictmode", 12) == 0) {
333 code = sscanf(tbuffer, "restrictmode %d",
339 if (rmode !=0 && rmode != 1) {
343 bozo_isrestricted=rmode;
348 if (strncmp("bnode", tbuffer, 5) != 0) {
353 code = sscanf(tbuffer, "bnode %s %s %d %s", typep, instp, &goal, notifier);
357 } else if (code == 3)
358 notifier = (char *)0;
360 for(i=0;i<MAXPARMS;i++) {
361 /* now read the parms, until we see an "end" line */
362 tp = fgets(tbuffer, sizeof(tbuffer), tfile);
368 if (!strncmp(tbuffer, "end", 3)) break;
369 if (strncmp(tbuffer, "parm ", 5)) {
371 goto fail; /* no "parm " either */
373 if (!parms[i]) /* make sure there's space */
374 parms[i] = (char *) malloc(BOZO_BSSIZE);
375 strcpy(parms[i], tbuffer+5); /* remember the parameter for later */
378 /* ok, we have the type and parms, now create the object */
379 code = bnode_Create(typep, instp, &tb, parms[0], parms[1], parms[2],
380 parms[3], parms[4], notifier,
381 goal ? BSTAT_NORMAL : BSTAT_SHUTDOWN);
384 /* bnode created in 'temporarily shutdown' state;
385 check to see if we are supposed to run this guy,
386 and if so, start the process up */
388 bnode_SetStat(tb, BSTAT_NORMAL); /* set goal, taking effect immediately */
391 bnode_SetStat(tb, BSTAT_SHUTDOWN);
398 if (instp) free(instp);
399 if (typep) free(typep);
400 for(i=0;i<MAXPARMS;i++) if (parms[i]) free(parms[i]);
401 if (tfile) fclose(tfile);
405 /* write a new bozo file */
408 register FILE *tfile;
409 char tbuffer[AFSDIR_PATH_MAX];
410 register afs_int32 code;
413 if (!aname) aname = (char *)bozo_fileName;
414 strcpy(tbuffer, aname);
415 strcat(tbuffer, ".NBZ");
416 tfile = fopen(tbuffer, "w");
417 if (!tfile) return -1;
419 #ifdef BOS_RESTRICTED_MODE
420 fprintf(tfile, "restrictmode %d\n", bozo_isrestricted);
422 fprintf(tfile, "restarttime %d %d %d %d %d\n", bozo_nextRestartKT.mask,
423 bozo_nextRestartKT.day, bozo_nextRestartKT.hour, bozo_nextRestartKT.min,
424 bozo_nextRestartKT.sec);
425 fprintf(tfile, "checkbintime %d %d %d %d %d\n", bozo_nextDayKT.mask,
426 bozo_nextDayKT.day, bozo_nextDayKT.hour, bozo_nextDayKT.min,
428 code = bnode_ApplyInstance(bzwrite, &btemp);
429 if (code || (code = ferror(tfile))) { /* something went wrong */
434 /* close the file, check for errors and snap new file into place */
435 if (fclose(tfile) == EOF) {
439 code = renamefile(tbuffer, aname);
447 static bdrestart(abnode, arock)
448 register struct bnode *abnode;
450 register afs_int32 code;
452 if (abnode->fileGoal != BSTAT_NORMAL || abnode->goal != BSTAT_NORMAL)
453 return 0; /* don't restart stopped bnodes */
455 code = bnode_RestartP(abnode);
457 /* restart the dude */
458 bnode_SetStat(abnode, BSTAT_SHUTDOWN);
459 bnode_WaitStatus(abnode, BSTAT_SHUTDOWN);
460 bnode_SetStat(abnode, BSTAT_NORMAL);
462 bnode_Release(abnode);
463 return 0; /* keep trying all bnodes */
466 #define BOZO_MINSKIP 3600 /* minimum to advance clock */
467 /* lwp to handle system restarts */
468 static BozoDaemon() {
469 register afs_int32 now;
471 /* now initialize the values */
475 now = FT_ApproxTime();
477 #ifdef BOS_RESTRICTED_MODE
478 if (bozo_restdisable) {
479 bozo_Log("Restricted mode disabled by signal\n");
483 if (bozo_newKTs) { /* need to recompute restart times */
484 bozo_newKTs = 0; /* done for a while */
485 nextRestart = ktime_next(&bozo_nextRestartKT, BOZO_MINSKIP);
486 nextDay = ktime_next(&bozo_nextDayKT, BOZO_MINSKIP);
489 /* see if we should do a restart */
490 if (now > nextRestart) {
491 SBOZO_ReBozo(0); /* doesn't come back */
494 /* see if we should restart a server */
496 nextDay = ktime_next(&bozo_nextDayKT, BOZO_MINSKIP);
498 /* call the bnode restartp function, and restart all that require it */
499 bnode_ApplyInstance(bdrestart, 0);
505 static tweak_config()
509 int s, sb_max, ipfragttl;
513 f = popen("/usr/sbin/no -o sb_max", "r");
514 s = fscanf(f, "sb_max = %d", &sb_max);
518 f = popen("/usr/sbin/no -o ipfragttl", "r");
519 s = fscanf(f, "ipfragttl = %d", &ipfragttl);
529 sprintf(c, "/usr/sbin/no -o sb_max=%d -o ipfragttl=%d", sb_max, ipfragttl);
536 * This routine causes the calling process to go into the background and
537 * to lose its controlling tty.
539 * It does not close or otherwise alter the standard file descriptors.
541 * It writes warning messages to the standard error output if certain
542 * fundamental errors occur.
544 * This routine requires
546 * #include <sys/types.h>
547 * #include <sys/stat.h>
549 * #include <unistd.h>
550 * #include <stdlib.h>
552 * and has been tested on:
568 * A process is a process group leader if its process ID
569 * (getpid()) and its process group ID (getpgrp()) are the same.
573 * To create a new session (and thereby lose our controlling
574 * terminal) we cannot be a process group leader.
576 * To guarantee we are not a process group leader, we fork and
577 * let the parent process exit.
580 if (getpid() == getpgrp()) {
585 abort(); /* leave footprints */
589 default: /* parent */
596 * By here, we are not a process group leader, so we can make a
597 * new session and become the session leader.
601 pid_t sid = setsid();
604 static char err[] = "bosserver: WARNING: setsid() failed\n";
605 write(STDERR_FILENO, err, sizeof err - 1);
610 * Once we create a new session, the current process is a
611 * session leader without a controlling tty.
613 * On some systems, the first tty device the session leader
614 * opens automatically becomes the controlling tty for the
617 * So, to guarantee we do not acquire a controlling tty, we fork
618 * and let the parent process exit. The child process is not a
619 * session leader, and so it will not acquire a controlling tty
620 * even if it should happen to open a tty device.
623 if (getpid() == getpgrp()) {
628 abort(); /* leave footprints */
632 default: /* parent */
639 * check that we no longer have a controlling tty
645 fd = open("/dev/tty", O_RDONLY);
648 static char err[] = "bosserver: WARNING: /dev/tty still attached\n";
650 write(STDERR_FILENO, err, sizeof err - 1);
654 #endif /* ! AFS_NT40_ENV */
656 /* start a process and monitor it */
658 #include "AFS_component_version_number.c"
661 main (argc, argv,envp)
666 struct rx_service *tservice;
667 register afs_int32 code;
668 struct afsconf_dir *tdir;
670 struct ktc_encryptionKey tkey;
672 char namebuf[AFSDIR_PATH_MAX];
677 struct sigaction nsa;
679 /* for some reason, this permits user-mode RX to run a lot faster.
680 * we do it here in the bosserver, so we don't have to do it
681 * individually in each server.
686 * The following signal action for AIX is necessary so that in case of a
687 * crash (i.e. core is generated) we can include the user's data section
688 * in the core dump. Unfortunately, by default, only a partial core is
689 * generated which, in many cases, isn't too useful.
691 sigemptyset(&nsa.sa_mask);
692 nsa.sa_handler = SIG_DFL;
693 nsa.sa_flags = SA_FULLDUMP;
694 sigaction(SIGSEGV, &nsa, NULL);
695 sigaction(SIGABRT, &nsa, NULL);
697 #ifdef BOS_RESTRICTED_MODE
698 signal(SIGFPE, bozo_insecureme);
702 /* Initialize winsock */
703 if (afs_winsockInit() < 0) {
704 ReportErrorEventAlt(AFSEVT_SVR_WINSOCK_INIT_FAILED, 0, argv[0], 0);
705 fprintf(stderr, "%s: Couldn't initialize winsock.\n", argv[0]);
710 /* Initialize dirpaths */
711 if (!(initAFSDirPath() & AFSDIR_SERVER_PATHS_OK)) {
713 ReportErrorEventAlt(AFSEVT_SVR_NO_INSTALL_DIR, 0, argv[0], 0);
715 fprintf(stderr, "%s: Unable to obtain AFS server directory.\n", argv[0]);
719 /* some path inits */
720 bozo_fileName = AFSDIR_SERVER_BOZCONF_FILEPATH;
722 /* initialize the list of dirpaths that the bosserver has
723 * an interest in monitoring */
726 #if defined(AFS_SGI_ENV)
727 /* offer some protection if AFS isn't loaded */
728 if (syscall(AFS_SYSCALL, AFSOP_ENDLOG) < 0 && errno == ENOPKG) {
729 printf("bosserver: AFS doesn't appear to be configured in O.S..\n");
735 for(code=1;code<argc;code++) {
736 if (strcmp(argv[code], "-noauth")==0) {
737 /* set noauth flag */
740 else if (strcmp(argv[code], "-log")==0) {
741 /* set extra logging flag */
745 else if (strcmp(argv[code], "-syslog")==0) {
746 /* set syslog logging flag */
749 else if (strncmp(argv[code], "-syslog=",8)==0) {
751 DoSyslogFacility = atoi(argv[code]+8);
753 else if (strcmp(argv[code], "-nofork")==0) {
757 else if (strcmp(argv[code], "-enable_peer_stats")==0) {
758 rx_enablePeerRPCStats();
760 else if (strcmp(argv[code], "-enable_process_stats")==0) {
761 rx_enableProcessRPCStats();
763 #ifdef BOS_RESTRICTED_MODE
764 else if (strcmp(argv[code], "-restricted")==0) {
770 /* hack to support help flag */
773 printf("Usage: bosserver [-noauth] [-log] "
774 "[-syslog[=FACILITY]] "
775 "[-enable_peer_stats] [-enable_process_stats] "
779 printf("Usage: bosserver [-noauth] [-log] "
780 "[-enable_peer_stats] [-enable_process_stats] "
790 if (geteuid() != 0) {
791 printf("bosserver: must be run as root.\n");
798 printf("bosserver: could not init bnode package, code %d\n", code);
802 bnode_Register("fs", &fsbnode_ops, 3);
803 bnode_Register("simple", &ezbnode_ops, 1);
804 bnode_Register("cron", &cronbnode_ops, 2);
806 /* create useful dirs */
809 /* chdir to AFS log directory */
810 chdir(AFSDIR_SERVER_LOGS_DIRPATH);
813 fputs(AFS_GOVERNMENT_MESSAGE, stdout);
817 /* go into the background and remove our controlling tty */
822 #endif /* ! AFS_NT40_ENV */
825 strcpy(namebuf, AFSDIR_BOZLOG_FILE);
826 strcat(namebuf, ".old");
827 renamefile(AFSDIR_BOZLOG_FILE, namebuf); /* try rename first */
828 bozo_logFile = fopen(AFSDIR_BOZLOG_FILE, "a");
830 printf("bosserver: can't initialize log file (%s).\n",
831 AFSDIR_SERVER_BOZLOG_FILEPATH);
834 /* keep log closed normally, so can be removed */
835 fclose(bozo_logFile);
838 openlog("bosserver", LOG_PID, DoSyslogFacility);
842 /* Write current state of directory permissions to log file */
846 code = rx_Init(htons(AFSCONF_NANNYPORT));
848 bozo_Log("can't initialize rx: code=%d\n",code);
854 bozo_Log("Bos giving up, can't initialize rx\n");
858 code = LWP_CreateProcess(BozoDaemon, BOZO_LWP_STACKSIZE, /* priority */ 1,
859 /* parm */0, "bozo-the-clown", &bozo_pid);
861 /* try to read the key from the config file */
862 tdir = afsconf_Open(AFSDIR_SERVER_ETC_DIRPATH);
864 /* try to create local cell config file */
865 struct afsconf_cell tcell;
866 strcpy(tcell.name, "localcell");
867 tcell.numServers = 1;
868 code = gethostname(tcell.hostName[0], MAXHOSTCHARS);
870 bozo_Log("failed to get hostname, code %d\n", errno);
873 if (tcell.hostName[0][0] == 0) {
874 bozo_Log("host name not set, can't start\n");
875 bozo_Log("try the 'hostname' command\n");
878 memset(tcell.hostAddr, 0, sizeof(tcell.hostAddr)); /* not computed */
879 code = afsconf_SetCellInfo(bozo_confdir, AFSDIR_SERVER_ETC_DIRPATH, &tcell);
881 bozo_Log("could not create cell database in '%s' (code %d), quitting\n", AFSDIR_SERVER_ETC_DIRPATH, code);
884 tdir = afsconf_Open(AFSDIR_SERVER_ETC_DIRPATH);
886 bozo_Log("failed to open newly-created cell database, quitting\n");
891 /* read init file, starting up programs */
892 if (code=ReadBozoFile(0)) {
893 bozo_Log("bosserver: Something is wrong (%d) with the bos configuration file %s; aborting\n", code, AFSDIR_SERVER_BOZCONF_FILEPATH);
897 /* opened the cell databse */
899 code = afsconf_GetKey(tdir, 999, &tkey);
901 /* allow super users to manage RX statistics */
902 rx_SetRxStatUserOk(bozo_rxstat_userok);
904 /* have bcrypt key now */
906 afsconf_SetNoAuthFlag(tdir, noAuth);
908 bozo_rxsc[0] = (struct rx_securityClass *) rxnull_NewServerSecurityObject();
909 bozo_rxsc[1] = (struct rx_securityClass *) 0;
910 bozo_rxsc[2] = (struct rx_securityClass *) rxkad_NewServerSecurityObject(
911 0, tdir, afsconf_GetKey, (char *) 0);
913 /* Disable jumbograms */
916 tservice = rx_NewService(/* port */ 0, /* service id */ 1,
917 /*service name */ "bozo", /* security classes */ bozo_rxsc,
918 /* numb sec classes */ 3, BOZO_ExecuteRequest);
919 rx_SetMinProcs(tservice, 2);
920 rx_SetMaxProcs(tservice, 4);
921 rx_SetStackSize(tservice, BOZO_LWP_STACKSIZE); /* so gethostbyname works (in cell stuff) */
923 tservice = rx_NewService(0, RX_STATS_SERVICE_ID, "rpcstats", bozo_rxsc,
924 3, RXSTATS_ExecuteRequest);
925 rx_SetMinProcs(tservice, 2);
926 rx_SetMaxProcs(tservice, 4);
927 rx_StartServer(1); /* donate this process */
931 bozo_Log(a,b,c,d,e,f)
932 char *a, *b, *c, *d, *e, *f; {
938 syslog(LOG_INFO, a, b, c, d, e, f);
942 strcpy(tdate, ctime(&myTime)); /* copy out of static area asap */
945 /* log normally closed, so can be removed */
947 bozo_logFile=fopen(AFSDIR_SERVER_BOZLOG_FILEPATH, "a");
948 if(bozo_logFile == NULL) {
949 printf("bosserver: WARNING: problem with %s", AFSDIR_SERVER_BOZLOG_FILEPATH);
954 fprintf(bozo_logFile, "%s ", tdate);
955 fprintf(bozo_logFile, a, b, c, d, e, f);
956 fflush(bozo_logFile);
958 printf("%s ", tdate);
959 printf(a, b, c, d, e, f);
962 /* close so rm BosLog works */
963 fclose(bozo_logFile);