* directory or online at http://www.openafs.org/dl/license10.html
*/
+#include <afsconfig.h>
#include <afs/param.h>
+
+RCSID("$Header$");
+
#include <afs/stds.h>
#include <sys/types.h>
#include <sys/stat.h>
extern int RXSTATS_ExecuteRequest();
extern int afsconf_GetKey();
extern struct bnode_ops fsbnode_ops, ezbnode_ops, cronbnode_ops;
+
+void bozo_Log();
+
struct afsconf_dir *bozo_confdir = 0; /* bozo configuration dir */
static char *bozo_pid;
struct rx_securityClass *bozo_rxsc[3];
/* see if we should do a restart */
if (now > nextRestart) {
- BOZO_ReBozo(0); /* doesn't come back */
+ SBOZO_ReBozo(0); /* doesn't come back */
}
/* see if we should restart a server */
int noAuth = 0;
struct ktc_encryptionKey tkey;
int i;
- pid_t newSessionID;
char namebuf[AFSDIR_PATH_MAX];
-
+#ifndef AFS_NT40_ENV
+ int nofork = 0;
+#endif
#ifdef AFS_AIX32_ENV
struct sigaction nsa;
DoSyslog = 1;
DoSyslogFacility = atoi(argv[code]+8);
}
+ else if (strcmp(argv[code], "-nofork")==0) {
+ nofork = 1;
+ }
#endif
else if (strcmp(argv[code], "-enable_peer_stats")==0) {
rx_enablePeerRPCStats();
printf("Usage: bosserver [-noauth] [-log] "
"[-syslog[=FACILITY]] "
"[-enable_peer_stats] [-enable_process_stats] "
+ "[-nofork] "
"[-help]\n");
#else
printf("Usage: bosserver [-noauth] [-log] "
/* go into the background and remove our controlling tty */
#ifndef AFS_NT40_ENV
+ if (!nofork)
background();
#endif /* ! AFS_NT40_ENV */
bozo_Log("try the 'hostname' command\n");
exit(1);
}
- bzero(tcell.hostAddr, sizeof(tcell.hostAddr)); /* not computed */
+ memset(tcell.hostAddr, 0, sizeof(tcell.hostAddr)); /* not computed */
code = afsconf_SetCellInfo(bozo_confdir, AFSDIR_SERVER_ETC_DIRPATH, &tcell);
if (code) {
bozo_Log("could not create cell database in '%s' (code %d), quitting\n", AFSDIR_SERVER_ETC_DIRPATH, code);
bozo_rxsc[2] = (struct rx_securityClass *) rxkad_NewServerSecurityObject(
0, tdir, afsconf_GetKey, (char *) 0);
- /* These two lines disallow jumbograms */
- rx_maxReceiveSize = OLD_MAX_PACKET_SIZE;
- rxi_nSendFrags = rxi_nRecvFrags = 1;
+ /* Disable jumbograms */
+ rx_SetNoJumbo();
tservice = rx_NewService(/* port */ 0, /* service id */ 1,
/*service name */ "bozo", /* security classes */ bozo_rxsc,
rx_StartServer(1); /* donate this process */
}
+void
bozo_Log(a,b,c,d,e,f)
char *a, *b, *c, *d, *e, *f; {
char tdate[26];