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>
17 #include <sys/types.h>
28 #include <WINNT/afsevent.h>
31 #include <netinet/in.h>
33 #endif /* AFS_NT40_ENV */
34 #include <afs/cellconfig.h>
37 #include <rx/rx_globals.h>
42 #include <afs/ktime.h>
43 #include <afs/afsutil.h>
44 #include <afs/fileutil.h>
45 #include <afs/procmgmt.h> /* signal(), kill(), wait(), etc. */
46 #if defined(AFS_SGI_ENV)
47 #include <afs/afs_args.h>
51 #define BOZO_LWP_STACKSIZE 16000
52 extern int BOZO_ExecuteRequest();
53 extern int RXSTATS_ExecuteRequest();
54 extern int afsconf_GetKey();
55 extern struct bnode_ops fsbnode_ops, ezbnode_ops, cronbnode_ops;
59 struct afsconf_dir *bozo_confdir = 0; /* bozo configuration dir */
60 static char *bozo_pid;
61 struct rx_securityClass *bozo_rxsc[3];
62 const char *bozo_fileName;
64 extern int rx_stackSize; /* for rx_SetStackSize macro */
69 int DoSyslogFacility = LOG_DAEMON;
71 static afs_int32 nextRestart;
72 static afs_int32 nextDay;
74 struct ktime bozo_nextRestartKT, bozo_nextDayKT;
76 #ifdef BOS_RESTRICTED_MODE
77 int bozo_isrestricted = 0;
78 int bozo_restdisable = 0;
81 bozo_insecureme(int sig)
83 signal(SIGFPE, bozo_insecureme);
84 bozo_isrestricted = 0;
93 /* check whether caller is authorized to manage RX statistics */
95 bozo_rxstat_userok(struct rx_call *call)
97 return afsconf_SuperUser(bozo_confdir, call, NULL);
100 /* restart bozo process */
105 /* exit with restart code; SCM integrator process will restart bosserver */
106 int status = BOSEXIT_RESTART;
108 /* if noauth flag is set, pass "-noauth" to new bosserver */
109 if (afsconf_GetNoAuthFlag(bozo_confdir)) {
110 status |= BOSEXIT_NOAUTH_FLAG;
112 /* if logging is on, pass "-log" to new bosserver */
114 status |= BOSEXIT_LOGGING_FLAG;
118 /* exec new bosserver process */
122 argv[i] = (char *)AFSDIR_SERVER_BOSVR_FILEPATH;
125 /* if noauth flag is set, pass "-noauth" to new bosserver */
126 if (afsconf_GetNoAuthFlag(bozo_confdir)) {
130 /* if logging is on, pass "-log" to new bosserver */
136 /* if syslog logging is on, pass "-syslog" to new bosserver */
138 char *arg = (char *)malloc(40); /* enough for -syslog=# */
139 if (DoSyslogFacility != LOG_DAEMON) {
140 snprintf(arg, 40, "-syslog=%d", DoSyslogFacility);
142 strcpy(arg, "-syslog");
149 /* null-terminate argument list */
152 /* close random fd's */
153 for (i = 3; i < 64; i++) {
157 execv(argv[0], argv); /* should not return */
159 #endif /* AFS_NT40_ENV */
162 /* make sure a dir exists */
164 MakeDir(register char *adir)
167 register afs_int32 code;
168 if (stat(adir, &tstat) < 0 || (tstat.st_mode & S_IFMT) != S_IFDIR) {
171 reqPerm = GetRequiredDirPerm(adir);
175 /* underlying filesystem may not support directory protection */
178 code = mkdir(adir, reqPerm);
185 /* create all the bozo dirs */
190 (AFSDIR_USR_DIRPATH, AFSDIR_CLIENT_ETC_DIRPATH,
191 strlen(AFSDIR_USR_DIRPATH)))
194 (AFSDIR_USR_DIRPATH, AFSDIR_SERVER_BIN_DIRPATH,
195 strlen(AFSDIR_USR_DIRPATH)))) {
196 MakeDir(AFSDIR_USR_DIRPATH);
199 (AFSDIR_SERVER_AFS_DIRPATH, AFSDIR_SERVER_BIN_DIRPATH,
200 strlen(AFSDIR_SERVER_AFS_DIRPATH))) {
201 MakeDir(AFSDIR_SERVER_AFS_DIRPATH);
203 MakeDir(AFSDIR_SERVER_BIN_DIRPATH);
204 MakeDir(AFSDIR_SERVER_ETC_DIRPATH);
205 MakeDir(AFSDIR_SERVER_LOCAL_DIRPATH);
206 MakeDir(AFSDIR_SERVER_DB_DIRPATH);
207 MakeDir(AFSDIR_SERVER_LOGS_DIRPATH);
210 (AFSDIR_CLIENT_VICE_DIRPATH, AFSDIR_CLIENT_ETC_DIRPATH,
211 strlen(AFSDIR_CLIENT_VICE_DIRPATH))) {
212 MakeDir(AFSDIR_CLIENT_VICE_DIRPATH);
214 MakeDir(AFSDIR_CLIENT_ETC_DIRPATH);
216 symlink(AFSDIR_SERVER_THISCELL_FILEPATH, AFSDIR_CLIENT_THISCELL_FILEPATH);
217 symlink(AFSDIR_SERVER_CELLSERVDB_FILEPATH,
218 AFSDIR_CLIENT_CELLSERVDB_FILEPATH);
219 #endif /* AFS_NT40_ENV */
223 /* strip the \\n from the end of the line, if it is present */
225 StripLine(register char *abuffer)
229 tp = abuffer + strlen(abuffer); /* starts off pointing at the null */
231 return 0; /* null string, no last character to check */
232 tp--; /* aim at last character */
238 /* write one bnode's worth of entry into the file */
240 bzwrite(register struct bnode *abnode, register struct bztemp *at)
243 char tbuffer[BOZO_BSSIZE];
244 register afs_int32 code;
246 if (abnode->notifier)
247 fprintf(at->file, "bnode %s %s %d %s\n", abnode->type->name,
248 abnode->name, abnode->fileGoal, abnode->notifier);
250 fprintf(at->file, "bnode %s %s %d\n", abnode->type->name,
251 abnode->name, abnode->fileGoal);
253 code = bnode_GetParm(abnode, i, tbuffer, BOZO_BSSIZE);
259 fprintf(at->file, "parm %s\n", tbuffer);
261 fprintf(at->file, "end\n");
267 ReadBozoFile(char *aname)
269 register FILE *tfile;
270 char tbuffer[BOZO_BSSIZE];
272 char *instp, *typep, *notifier, *notp;
273 register afs_int32 code;
274 afs_int32 ktmask, ktday, kthour, ktmin, ktsec;
277 char *parms[MAXPARMS];
278 #ifdef BOS_RESTRICTED_MODE
282 /* rename BozoInit to BosServer for the user */
284 /* if BozoInit exists and BosConfig doesn't, try a rename */
285 if (access(AFSDIR_SERVER_BOZINIT_FILEPATH, 0) == 0
286 && access(AFSDIR_SERVER_BOZCONF_FILEPATH, 0) != 0) {
288 renamefile(AFSDIR_SERVER_BOZINIT_FILEPATH,
289 AFSDIR_SERVER_BOZCONF_FILEPATH);
291 perror("bosconfig rename");
293 #ifdef BOS_NEW_CONFIG
294 if (access(AFSDIR_SERVER_BOZCONFNEW_FILEPATH, 0) == 0) {
296 renamefile(AFSDIR_SERVER_BOZCONFNEW_FILEPATH,
297 AFSDIR_SERVER_BOZCONF_FILEPATH);
299 perror("bosconfig rename");
304 /* setup default times we want to do restarts */
305 bozo_nextRestartKT.mask = KTIME_HOUR | KTIME_MIN | KTIME_DAY;
306 bozo_nextRestartKT.hour = 4; /* 4 am */
307 bozo_nextRestartKT.min = 0;
308 bozo_nextRestartKT.day = 0; /* Sunday */
309 bozo_nextDayKT.mask = KTIME_HOUR | KTIME_MIN;
310 bozo_nextDayKT.hour = 5;
311 bozo_nextDayKT.min = 0;
313 for (code = 0; code < MAXPARMS; code++)
315 instp = typep = notifier = NULL;
318 aname = (char *)bozo_fileName;
319 tfile = fopen(aname, "r");
322 instp = (char *)malloc(BOZO_BSSIZE);
323 typep = (char *)malloc(BOZO_BSSIZE);
324 notifier = notp = (char *)malloc(BOZO_BSSIZE);
326 /* ok, read lines giving parms and such from the file */
327 tp = fgets(tbuffer, sizeof(tbuffer), tfile);
329 break; /* all done */
331 if (strncmp(tbuffer, "restarttime", 11) == 0) {
333 sscanf(tbuffer, "restarttime %d %d %d %d %d", &ktmask, &ktday,
334 &kthour, &ktmin, &ktsec);
339 /* otherwise we've read in the proper ktime structure; now assign
340 * it and continue processing */
341 bozo_nextRestartKT.mask = ktmask;
342 bozo_nextRestartKT.day = ktday;
343 bozo_nextRestartKT.hour = kthour;
344 bozo_nextRestartKT.min = ktmin;
345 bozo_nextRestartKT.sec = ktsec;
349 if (strncmp(tbuffer, "checkbintime", 12) == 0) {
351 sscanf(tbuffer, "checkbintime %d %d %d %d %d", &ktmask,
352 &ktday, &kthour, &ktmin, &ktsec);
357 /* otherwise we've read in the proper ktime structure; now assign
358 * it and continue processing */
359 bozo_nextDayKT.mask = ktmask; /* time to restart the system */
360 bozo_nextDayKT.day = ktday;
361 bozo_nextDayKT.hour = kthour;
362 bozo_nextDayKT.min = ktmin;
363 bozo_nextDayKT.sec = ktsec;
366 #ifdef BOS_RESTRICTED_MODE
367 if (strncmp(tbuffer, "restrictmode", 12) == 0) {
368 code = sscanf(tbuffer, "restrictmode %d", &rmode);
373 if (rmode != 0 && rmode != 1) {
377 bozo_isrestricted = rmode;
382 if (strncmp("bnode", tbuffer, 5) != 0) {
388 sscanf(tbuffer, "bnode %s %s %d %s", typep, instp, &goal,
393 } else if (code == 3)
396 for (i = 0; i < MAXPARMS; i++) {
397 /* now read the parms, until we see an "end" line */
398 tp = fgets(tbuffer, sizeof(tbuffer), tfile);
404 if (!strncmp(tbuffer, "end", 3))
406 if (strncmp(tbuffer, "parm ", 5)) {
408 goto fail; /* no "parm " either */
410 if (!parms[i]) /* make sure there's space */
411 parms[i] = (char *)malloc(BOZO_BSSIZE);
412 strcpy(parms[i], tbuffer + 5); /* remember the parameter for later */
415 /* ok, we have the type and parms, now create the object */
417 bnode_Create(typep, instp, &tb, parms[0], parms[1], parms[2],
418 parms[3], parms[4], notifier,
419 goal ? BSTAT_NORMAL : BSTAT_SHUTDOWN);
423 /* bnode created in 'temporarily shutdown' state;
424 * check to see if we are supposed to run this guy,
425 * and if so, start the process up */
427 bnode_SetStat(tb, BSTAT_NORMAL); /* set goal, taking effect immediately */
429 bnode_SetStat(tb, BSTAT_SHUTDOWN);
440 for (i = 0; i < MAXPARMS; i++)
448 /* write a new bozo file */
450 WriteBozoFile(char *aname)
452 register FILE *tfile;
453 char tbuffer[AFSDIR_PATH_MAX];
454 register afs_int32 code;
458 aname = (char *)bozo_fileName;
459 strcpy(tbuffer, aname);
460 strcat(tbuffer, ".NBZ");
461 tfile = fopen(tbuffer, "w");
465 #ifdef BOS_RESTRICTED_MODE
466 fprintf(tfile, "restrictmode %d\n", bozo_isrestricted);
468 fprintf(tfile, "restarttime %d %d %d %d %d\n", bozo_nextRestartKT.mask,
469 bozo_nextRestartKT.day, bozo_nextRestartKT.hour,
470 bozo_nextRestartKT.min, bozo_nextRestartKT.sec);
471 fprintf(tfile, "checkbintime %d %d %d %d %d\n", bozo_nextDayKT.mask,
472 bozo_nextDayKT.day, bozo_nextDayKT.hour, bozo_nextDayKT.min,
474 code = bnode_ApplyInstance(bzwrite, &btemp);
475 if (code || (code = ferror(tfile))) { /* something went wrong */
480 /* close the file, check for errors and snap new file into place */
481 if (fclose(tfile) == EOF) {
485 code = renamefile(tbuffer, aname);
494 bdrestart(register struct bnode *abnode, char *arock)
496 register afs_int32 code;
498 if (abnode->fileGoal != BSTAT_NORMAL || abnode->goal != BSTAT_NORMAL)
499 return 0; /* don't restart stopped bnodes */
501 code = bnode_RestartP(abnode);
503 /* restart the dude */
504 bnode_SetStat(abnode, BSTAT_SHUTDOWN);
505 bnode_WaitStatus(abnode, BSTAT_SHUTDOWN);
506 bnode_SetStat(abnode, BSTAT_NORMAL);
508 bnode_Release(abnode);
509 return 0; /* keep trying all bnodes */
512 #define BOZO_MINSKIP 3600 /* minimum to advance clock */
513 /* lwp to handle system restarts */
517 register afs_int32 now;
519 /* now initialize the values */
523 now = FT_ApproxTime();
525 #ifdef BOS_RESTRICTED_MODE
526 if (bozo_restdisable) {
527 bozo_Log("Restricted mode disabled by signal\n");
528 bozo_restdisable = 0;
531 if (bozo_newKTs) { /* need to recompute restart times */
532 bozo_newKTs = 0; /* done for a while */
533 nextRestart = ktime_next(&bozo_nextRestartKT, BOZO_MINSKIP);
534 nextDay = ktime_next(&bozo_nextDayKT, BOZO_MINSKIP);
537 /* see if we should do a restart */
538 if (now > nextRestart) {
539 SBOZO_ReBozo(0); /* doesn't come back */
542 /* see if we should restart a server */
544 nextDay = ktime_next(&bozo_nextDayKT, BOZO_MINSKIP);
546 /* call the bnode restartp function, and restart all that require it */
547 bnode_ApplyInstance(bdrestart, 0);
558 int s, sb_max, ipfragttl;
562 f = popen("/usr/sbin/no -o sb_max", "r");
563 s = fscanf(f, "sb_max = %d", &sb_max);
567 f = popen("/usr/sbin/no -o ipfragttl", "r");
568 s = fscanf(f, "ipfragttl = %d", &ipfragttl);
578 sprintf(c, "/usr/sbin/no -o sb_max=%d -o ipfragttl=%d", sb_max,
586 * This routine causes the calling process to go into the background and
587 * to lose its controlling tty.
589 * It does not close or otherwise alter the standard file descriptors.
591 * It writes warning messages to the standard error output if certain
592 * fundamental errors occur.
594 * This routine requires
596 * #include <sys/types.h>
597 * #include <sys/stat.h>
599 * #include <unistd.h>
600 * #include <stdlib.h>
602 * and has been tested on:
618 * A process is a process group leader if its process ID
619 * (getpid()) and its process group ID (getpgrp()) are the same.
623 * To create a new session (and thereby lose our controlling
624 * terminal) we cannot be a process group leader.
626 * To guarantee we are not a process group leader, we fork and
627 * let the parent process exit.
630 if (getpid() == getpgrp()) {
635 abort(); /* leave footprints */
639 default: /* parent */
646 * By here, we are not a process group leader, so we can make a
647 * new session and become the session leader.
651 pid_t sid = setsid();
654 static char err[] = "bosserver: WARNING: setsid() failed\n";
655 write(STDERR_FILENO, err, sizeof err - 1);
660 * Once we create a new session, the current process is a
661 * session leader without a controlling tty.
663 * On some systems, the first tty device the session leader
664 * opens automatically becomes the controlling tty for the
667 * So, to guarantee we do not acquire a controlling tty, we fork
668 * and let the parent process exit. The child process is not a
669 * session leader, and so it will not acquire a controlling tty
670 * even if it should happen to open a tty device.
673 if (getpid() == getpgrp()) {
678 abort(); /* leave footprints */
682 default: /* parent */
689 * check that we no longer have a controlling tty
695 fd = open("/dev/tty", O_RDONLY);
699 "bosserver: WARNING: /dev/tty still attached\n";
701 write(STDERR_FILENO, err, sizeof err - 1);
705 #endif /* ! AFS_NT40_ENV */
707 /* start a process and monitor it */
709 #include "AFS_component_version_number.c"
712 main(int argc, char **argv, char **envp)
714 struct rx_service *tservice;
715 register afs_int32 code;
716 struct afsconf_dir *tdir;
718 struct ktc_encryptionKey tkey;
720 char namebuf[AFSDIR_PATH_MAX];
725 struct sigaction nsa;
727 /* for some reason, this permits user-mode RX to run a lot faster.
728 * we do it here in the bosserver, so we don't have to do it
729 * individually in each server.
734 * The following signal action for AIX is necessary so that in case of a
735 * crash (i.e. core is generated) we can include the user's data section
736 * in the core dump. Unfortunately, by default, only a partial core is
737 * generated which, in many cases, isn't too useful.
739 sigemptyset(&nsa.sa_mask);
740 nsa.sa_handler = SIG_DFL;
741 nsa.sa_flags = SA_FULLDUMP;
742 sigaction(SIGSEGV, &nsa, NULL);
743 sigaction(SIGABRT, &nsa, NULL);
745 #ifdef BOS_RESTRICTED_MODE
746 signal(SIGFPE, bozo_insecureme);
750 /* Initialize winsock */
751 if (afs_winsockInit() < 0) {
752 ReportErrorEventAlt(AFSEVT_SVR_WINSOCK_INIT_FAILED, 0, argv[0], 0);
753 fprintf(stderr, "%s: Couldn't initialize winsock.\n", argv[0]);
758 /* Initialize dirpaths */
759 if (!(initAFSDirPath() & AFSDIR_SERVER_PATHS_OK)) {
761 ReportErrorEventAlt(AFSEVT_SVR_NO_INSTALL_DIR, 0, argv[0], 0);
763 fprintf(stderr, "%s: Unable to obtain AFS server directory.\n",
768 /* some path inits */
769 bozo_fileName = AFSDIR_SERVER_BOZCONF_FILEPATH;
771 /* initialize the list of dirpaths that the bosserver has
772 * an interest in monitoring */
775 #if defined(AFS_SGI_ENV)
776 /* offer some protection if AFS isn't loaded */
777 if (syscall(AFS_SYSCALL, AFSOP_ENDLOG) < 0 && errno == ENOPKG) {
778 printf("bosserver: AFS doesn't appear to be configured in O.S..\n");
784 for (code = 1; code < argc; code++) {
785 if (strcmp(argv[code], "-noauth") == 0) {
786 /* set noauth flag */
788 } else if (strcmp(argv[code], "-log") == 0) {
789 /* set extra logging flag */
793 else if (strcmp(argv[code], "-syslog") == 0) {
794 /* set syslog logging flag */
796 } else if (strncmp(argv[code], "-syslog=", 8) == 0) {
798 DoSyslogFacility = atoi(argv[code] + 8);
799 } else if (strcmp(argv[code], "-nofork") == 0) {
803 else if (strcmp(argv[code], "-enable_peer_stats") == 0) {
804 rx_enablePeerRPCStats();
805 } else if (strcmp(argv[code], "-enable_process_stats") == 0) {
806 rx_enableProcessRPCStats();
808 #ifdef BOS_RESTRICTED_MODE
809 else if (strcmp(argv[code], "-restricted") == 0) {
810 bozo_isrestricted = 1;
815 /* hack to support help flag */
818 printf("Usage: bosserver [-noauth] [-log] "
819 "[-syslog[=FACILITY]] "
820 "[-enable_peer_stats] [-enable_process_stats] "
821 "[-nofork] " "[-help]\n");
823 printf("Usage: bosserver [-noauth] [-log] "
824 "[-enable_peer_stats] [-enable_process_stats] "
834 if (geteuid() != 0) {
835 printf("bosserver: must be run as root.\n");
842 printf("bosserver: could not init bnode package, code %d\n", code);
846 bnode_Register("fs", &fsbnode_ops, 3);
847 bnode_Register("simple", &ezbnode_ops, 1);
848 bnode_Register("cron", &cronbnode_ops, 2);
850 /* create useful dirs */
853 /* chdir to AFS log directory */
854 chdir(AFSDIR_SERVER_LOGS_DIRPATH);
857 fputs(AFS_GOVERNMENT_MESSAGE, stdout);
861 /* go into the background and remove our controlling tty */
866 #endif /* ! AFS_NT40_ENV */
869 strcpy(namebuf, AFSDIR_BOZLOG_FILE);
870 strcat(namebuf, ".old");
871 renamefile(AFSDIR_BOZLOG_FILE, namebuf); /* try rename first */
872 bozo_logFile = fopen(AFSDIR_BOZLOG_FILE, "a");
874 printf("bosserver: can't initialize log file (%s).\n",
875 AFSDIR_SERVER_BOZLOG_FILEPATH);
878 /* keep log closed normally, so can be removed */
879 fclose(bozo_logFile);
882 openlog("bosserver", LOG_PID, DoSyslogFacility);
886 /* Write current state of directory permissions to log file */
889 for (i = 0; i < 10; i++) {
890 code = rx_Init(htons(AFSCONF_NANNYPORT));
892 bozo_Log("can't initialize rx: code=%d\n", code);
898 bozo_Log("Bos giving up, can't initialize rx\n");
902 code = LWP_CreateProcess(BozoDaemon, BOZO_LWP_STACKSIZE, /* priority */ 1,
903 (void *) /*parm */ 0, "bozo-the-clown",
906 /* try to read the key from the config file */
907 tdir = afsconf_Open(AFSDIR_SERVER_ETC_DIRPATH);
909 /* try to create local cell config file */
910 struct afsconf_cell tcell;
911 strcpy(tcell.name, "localcell");
912 tcell.numServers = 1;
913 code = gethostname(tcell.hostName[0], MAXHOSTCHARS);
915 bozo_Log("failed to get hostname, code %d\n", errno);
918 if (tcell.hostName[0][0] == 0) {
919 bozo_Log("host name not set, can't start\n");
920 bozo_Log("try the 'hostname' command\n");
923 memset(tcell.hostAddr, 0, sizeof(tcell.hostAddr)); /* not computed */
925 afsconf_SetCellInfo(bozo_confdir, AFSDIR_SERVER_ETC_DIRPATH,
929 ("could not create cell database in '%s' (code %d), quitting\n",
930 AFSDIR_SERVER_ETC_DIRPATH, code);
933 tdir = afsconf_Open(AFSDIR_SERVER_ETC_DIRPATH);
936 ("failed to open newly-created cell database, quitting\n");
941 /* read init file, starting up programs */
942 if (code = ReadBozoFile(0)) {
944 ("bosserver: Something is wrong (%d) with the bos configuration file %s; aborting\n",
945 code, AFSDIR_SERVER_BOZCONF_FILEPATH);
949 /* opened the cell databse */
951 code = afsconf_GetKey(tdir, 999, &tkey);
953 /* allow super users to manage RX statistics */
954 rx_SetRxStatUserOk(bozo_rxstat_userok);
956 /* have bcrypt key now */
958 afsconf_SetNoAuthFlag(tdir, noAuth);
960 bozo_rxsc[0] = rxnull_NewServerSecurityObject();
961 bozo_rxsc[1] = (struct rx_securityClass *)0;
963 rxkad_NewServerSecurityObject(0, tdir, afsconf_GetKey, NULL);
965 /* Disable jumbograms */
968 tservice = rx_NewService( /* port */ 0, /* service id */ 1,
969 /*service name */ "bozo",
970 /* security classes */
972 /* numb sec classes */ 3, BOZO_ExecuteRequest);
973 rx_SetMinProcs(tservice, 2);
974 rx_SetMaxProcs(tservice, 4);
975 rx_SetStackSize(tservice, BOZO_LWP_STACKSIZE); /* so gethostbyname works (in cell stuff) */
978 rx_NewService(0, RX_STATS_SERVICE_ID, "rpcstats", bozo_rxsc, 3,
979 RXSTATS_ExecuteRequest);
980 rx_SetMinProcs(tservice, 2);
981 rx_SetMaxProcs(tservice, 4);
982 rx_StartServer(1); /* donate this process */
986 bozo_Log(char *a, char *b, char *c, char *d, char *e, char *f)
993 syslog(LOG_INFO, a, b, c, d, e, f);
997 strcpy(tdate, ctime(&myTime)); /* copy out of static area asap */
1000 /* log normally closed, so can be removed */
1002 bozo_logFile = fopen(AFSDIR_SERVER_BOZLOG_FILEPATH, "a");
1003 if (bozo_logFile == NULL) {
1004 printf("bosserver: WARNING: problem with %s",
1005 AFSDIR_SERVER_BOZLOG_FILEPATH);
1010 fprintf(bozo_logFile, "%s ", tdate);
1011 fprintf(bozo_logFile, a, b, c, d, e, f);
1012 fflush(bozo_logFile);
1014 printf("%s ", tdate);
1015 printf(a, b, c, d, e, f);
1018 /* close so rm BosLog works */
1019 fclose(bozo_logFile);