};
extern int afs_fakestat_enable;
+extern int afs_rmtsys_enable;
extern int afsd_dynamic_vcaches;
/*
afs_int32 afs_numcachefiles = -1;
afs_int32 afs_numfilesperdir = -1;
char afs_cachebasedir[1024];
+afs_int32 afs_rmtsys_enable = 0;
afs_int32 afs_rx_deadtime = AFS_RXDEADTIME;
afs_int32 afs_rx_harddead = AFS_HARDDEADTIME;
rx_MyMaxSendSize = rx_maxReceiveSizeUser = rx_maxReceiveSize = parm2;
} else if (parm == AFSOP_SET_RXMAXFRAGS) {
rxi_nSendFrags = rxi_nRecvFrags = parm2;
+ } else if (parm == AFSOP_SET_RMTSYS_FLAG) {
+ afs_rmtsys_enable = parm2;
+ code = 0;
} else {
code = EINVAL;
}
#include "rx/rx_globals.h"
#include "token.h"
+extern int afs_rmtsys_enable;
struct VenusFid afs_rootFid;
afs_int32 afs_waitForever = 0;
short afs_waitForeverCount = 0;
return EINVAL;
num = count;
}
- if (afs_cr_gid(*acred) == RMTUSER_REQ ||
- afs_cr_gid(*acred) == RMTUSER_REQ_PRIV) { /* Handles all exporters */
+ if (afs_rmtsys_enable && (afs_cr_gid(*acred) == RMTUSER_REQ ||
+ afs_cr_gid(*acred) == RMTUSER_REQ_PRIV)) { /* Handles all exporters */
if (allpags && afs_cr_gid(*acred) != RMTUSER_REQ_PRIV) {
return EPERM;
}
if (afsd_verbose)
printf("%s: Forking 'rmtsys' daemon.\n", rn);
afsd_fork(0, rmtsysd_thread, NULL);
+ code = afsd_syscall(AFSOP_SET_RMTSYS_FLAG, 1);
+ if (code)
+ printf("%s: Error enabling rmtsys support.\n", rn);
}
#endif /* !UKERNEL */
/*
case AFSOP_SET_BACKUPTREE:
case AFSOP_BUCKETPCT:
case AFSOP_GO:
+ case AFSOP_SET_RMTSYS_FLAG:
params[0] = CAST_SYSCALL_PARAM((va_arg(ap, int)));
break;
case AFSOP_SET_THISCELL:
#define AFSOP_SET_RXMAXMTU 40 /* set rx_MyMaxSendSize,rx_maxReceiveSizeUser,rx_maxReceiveSize */
#define AFSOP_BKG_HANDLER 41 /* userspace-capable Bkg daemon */
#define AFSOP_SET_RXMAXFRAGS 43 /* set rxi_nSendFrags, rxi_nRecvFrags */
+#define AFSOP_SET_RMTSYS_FLAG 44 /* set flag if rmtsys is enabled */
/* The range 20-30 is reserved for AFS system offsets in the afs_syscall */
#define AFSCALL_PIOCTL 20