("$Header$");
#include <sys/types.h>
+#include <string.h>
#ifdef AFS_NT40_ENV
#include <time.h>
#include <fcntl.h>
#include <sys/file.h>
#include <netinet/in.h>
#endif
-#ifdef HAVE_STRING_H
-#include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
#include <rx/xdr.h>
#include <afs/afsint.h>
#include <stdio.h>
struct afsconf_dir *tdir;
static afs_int32 runningCalls = 0;
int DoLogging = 0;
-#define MAXLWP 16
+int debuglevel = 0;
+#define MAXLWP 128
int lwps = 9;
int udpBufSize = 0; /* UDP buffer size for receive */
int rxBind = 0;
+int rxkadDisableDotCheck = 0;
#define ADDRSPERSITE 16 /* Same global is in rx/rx_user.c */
afs_uint32 SHostAddrs[ADDRSPERSITE];
}
/* background daemon for timing out transactions */
-static void
-BKGLoop()
+static void*
+BKGLoop(void *unused)
{
struct timeval tv;
int loop = 0;
ReOpenLog(AFSDIR_SERVER_VOLSERLOG_FILEPATH);
}
}
+
+ return NULL;
}
/* Background daemon for sleeping so the volserver does not become I/O bound */
afs_int32 TTsleep, TTrun;
-static void
-BKGSleep()
+static void *
+BKGSleep(void *unused)
{
struct volser_trans *tt;
VTRANS_UNLOCK;
}
}
+ return NULL;
}
#ifndef AFS_NT40_ENV
int rxpackets = 100;
char commandLine[150];
int i;
- int rxJumbograms = 1; /* default is to send and receive jumbograms. */
+ int rxJumbograms = 0; /* default is to send and receive jumbograms. */
int rxMaxMTU = -1;
int bufSize = 0; /* temp variable to read in udp socket buf size */
afs_uint32 host = ntohl(INADDR_ANY);
goto usage;
} else if (strcmp(argv[code], "-rxbind") == 0) {
rxBind = 1;
+ } else if (strcmp(argv[code], "-allow-dotted-principals") == 0) {
+ rxkadDisableDotCheck = 1;
+ } else if (strcmp(argv[code], "-d") == 0) {
+ if ((code + 1) >= argc) {
+ fprintf(stderr, "missing argument for -d\n");
+ return -1;
+ }
+ debuglevel = atoi(argv[++code]);
+ LogLevel = debuglevel;
} else if (strcmp(argv[code], "-p") == 0) {
lwps = atoi(argv[++code]);
if (lwps > MAXLWP) {
printf("Warning: auditlog %s not writable, ignored.\n", fileName);
} else if (strcmp(argv[code], "-nojumbo") == 0) {
rxJumbograms = 0;
+ } else if (strcmp(argv[code], "-jumbo") == 0) {
+ rxJumbograms = 1;
} else if (!strcmp(argv[code], "-rxmaxmtu")) {
if ((code + 1) >= argc) {
fprintf(stderr, "missing argument for -rxmaxmtu\n");
usage:
#ifndef AFS_NT40_ENV
printf("Usage: volserver [-log] [-p <number of processes>] "
- "[-auditlog <log path>] "
- "[-nojumbo] [-rxmaxmtu <bytes>] [-rxbind] "
+ "[-auditlog <log path>] [-d <debug level>] "
+ "[-nojumbo] [-jumbo] [-rxmaxmtu <bytes>] [-rxbind] [-allow-dotted-principals] "
"[-udpsize <size of socket buffer in bytes>] "
"[-syslog[=FACILITY]] "
"[-enable_peer_stats] [-enable_process_stats] "
"[-help]\n");
#else
printf("Usage: volserver [-log] [-p <number of processes>] "
- "[-auditlog <log path>] "
- "[-nojumbo] [-rxmaxmtu <bytes>] [-rxbind] "
+ "[-auditlog <log path>] [-d <debug level>] "
+ "[-nojumbo] [-jumbo] [-rxmaxmtu <bytes>] [-rxbind] [-allow-dotted-principals] "
"[-udpsize <size of socket buffer in bytes>] "
"[-enable_peer_stats] [-enable_process_stats] "
"[-help]\n");
rx_SetUdpBufSize(udpBufSize); /* set the UDP buffer size for receive */
if (rxBind) {
afs_int32 ccode;
-#ifndef AFS_NT40_ENV
if (AFSDIR_SERVER_NETRESTRICT_FILEPATH ||
AFSDIR_SERVER_NETINFO_FILEPATH) {
char reason[1024];
AFSDIR_SERVER_NETINFO_FILEPATH,
AFSDIR_SERVER_NETRESTRICT_FILEPATH);
} else
-#endif
{
ccode = rx_getAllAddr(SHostAddrs, ADDRSPERSITE);
}
if (lwps < 4)
lwps = 4;
rx_SetMaxProcs(service, lwps);
-#ifdef AFS_SGI_ENV
- rx_SetStackSize(service, 49152);
+#if defined(AFS_XBSD_ENV)
+ rx_SetStackSize(service, (128 * 1024));
+#elif defined(AFS_SGI_ENV)
+ rx_SetStackSize(service, (48 * 1024));
#else
- rx_SetStackSize(service, 32768);
+ rx_SetStackSize(service, (32 * 1024));
#endif
+ if (rxkadDisableDotCheck) {
+ rx_SetSecurityConfiguration(service, RXS_CONFIG_FLAGS,
+ (void *)RXS_CONFIG_FLAGS_DISABLE_DOTCHECK);
+ }
+
service =
rx_NewService(0, RX_STATS_SERVICE_ID, "rpcstats", securityObjects, 3,
RXSTATS_ExecuteRequest);
osi_audit(VS_FinishEvent, (-1), AUD_END);
Abort("StartServer returned?");
+ return 0; /* not reached */
}