#include <rx/xdr.h>
#include <afs/afsint.h>
-#include <afs/afs_assert.h>
#include <afs/prs_fs.h>
#include <afs/nfs.h>
#include <lwp.h>
return afsconf_SuperUser(tdir, call, NULL);
}
+/**
+ * Return true if this name is a member of the local realm.
+ */
+static int
+vol_IsLocalRealmMatch(void *rock, char *name, char *inst, char *cell)
+{
+ struct afsconf_dir *dir = (struct afsconf_dir *)rock;
+ afs_int32 islocal = 0; /* default to no */
+ int code;
+
+ code = afsconf_IsLocalRealmMatch(dir, &islocal, name, inst, cell);
+ if (code) {
+ ViceLog(0,
+ ("Failed local realm check; code=%d, name=%s, inst=%s, cell=%s\n",
+ code, name, inst, cell));
+ }
+ return islocal;
+}
+
#include "AFS_component_version_number.c"
int
main(int argc, char **argv)
exit(1);
}
rxMaxMTU = atoi(argv[++code]);
- if ((rxMaxMTU < RX_MIN_PACKET_SIZE) ||
- (rxMaxMTU > RX_MAX_PACKET_DATA_SIZE)) {
- printf("rxMaxMTU %d invalid; must be between %d-%" AFS_SIZET_FMT "\n",
- rxMaxMTU, RX_MIN_PACKET_SIZE,
- RX_MAX_PACKET_DATA_SIZE);
- exit(1);
- }
} else if (strcmp(argv[code], "-sleep") == 0) {
sscanf(argv[++code], "%d/%d", &TTsleep, &TTrun);
if ((TTsleep < 0) || (TTrun <= 0)) {
rx_SetNoJumbo();
}
if (rxMaxMTU != -1) {
- rx_SetMaxMTU(rxMaxMTU);
+ if (rx_SetMaxMTU(rxMaxMTU) != 0) {
+ fprintf(stderr, "rxMaxMTU %d is invalid\n", rxMaxMTU);
+ VS_EXIT(1);
+ }
}
rx_GetIFInfo();
rx_SetRxDeadTime(420);
AFSDIR_SERVER_ETC_DIRPATH);
VS_EXIT(1);
}
+
+ /* initialize audit user check */
+ osi_audit_set_user_check(tdir, vol_IsLocalRealmMatch);
+
afsconf_GetKey(tdir, 999, &tkey);
afsconf_BuildServerSecurityObjects(tdir, &securityClasses, &numClasses);
if (securityClasses[0] == NULL)