From 62e6fc36b129729a571264bfb661114dce12bc2e Mon Sep 17 00:00:00 2001 From: Jeffrey Altman Date: Wed, 2 Aug 2006 19:18:42 +0000 Subject: [PATCH] viced-sane-acls-bit-20060802 Add VICED_CAPABILITY_SANEACLS bit and -saneacls option to viced to enable it. --- src/fsint/common.xg | 3 ++- src/viced/afsfileprocs.c | 2 ++ src/viced/viced.c | 4 ++++ src/viced/viced.h | 1 + 4 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/fsint/common.xg b/src/fsint/common.xg index 3f057472e..cb3b43626 100644 --- a/src/fsint/common.xg +++ b/src/fsint/common.xg @@ -174,12 +174,13 @@ typedef afs_int32 serverList; typedef afs_uint32 cacheConfig<>; const AFSCAPABILITIESMAX = 196; -typedef afs_int32 Capabilities; +typedef afs_uint32 Capabilities; /* Viced Capability Flags */ const VICED_CAPABILITY_ERRORTRANS = 0x0001; const VICED_CAPABILITY_64BITFILES = 0x0002; const VICED_CAPABILITY_WRITELOCKACL = 0x0004; +const VICED_CAPABILITY_SANEACLS = 0x0008; /* Cache Manager Capability Flags */ const CLIENT_CAPABILITY_ERRORTRANS = 0x0001; diff --git a/src/viced/afsfileprocs.c b/src/viced/afsfileprocs.c index eef1b2047..cd6fb5fcf 100644 --- a/src/viced/afsfileprocs.c +++ b/src/viced/afsfileprocs.c @@ -6033,6 +6033,8 @@ SRXAFS_GetCapabilities(struct rx_call * acall, Capabilities * capabilities) #if defined(AFS_64BIT_ENV) && defined(AFS_LARGEFILE_ENV) dataBuffP[0] |= VICED_CAPABILITY_64BITFILES; #endif + if (saneacls) + dataBuffP[0] |= VICED_CAPABILITY_SANEACLS; capabilities->Capabilities_len = dataBytes / sizeof(afs_int32); capabilities->Capabilities_val = dataBuffP; diff --git a/src/viced/viced.c b/src/viced/viced.c index 948b5a50c..4b00a99bd 100644 --- a/src/viced/viced.c +++ b/src/viced/viced.c @@ -200,6 +200,7 @@ int busy_threshold = 600; int abort_threshold = 10; int udpBufSize = 0; /* UDP buffer size for receive */ int sendBufSize = 16384; /* send buffer size */ +int saneacls = 0; /* Sane ACLs Flag */ struct timeval tp; @@ -1385,6 +1386,9 @@ ParseArgs(int argc, char *argv[]) /* set syslog logging flag */ mrafsStyleLogs = 1; } + else if (strcmp(argv[i], "-saneacls") == 0) { + saneacls = 1; + } else { return (-1); } diff --git a/src/viced/viced.h b/src/viced/viced.h index d8c837cad..e6e08a107 100644 --- a/src/viced/viced.h +++ b/src/viced/viced.h @@ -181,6 +181,7 @@ struct AFSStatistics { }; extern int busyonrst; +extern int saneacls; #define RESTART_ORDINARY 1 #define RESTART_FAST 2 -- 2.39.5