viced-sane-acls-bit-20060802
authorJeffrey Altman <jaltman@secure-endpoints.com>
Wed, 2 Aug 2006 19:18:42 +0000 (19:18 +0000)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Wed, 2 Aug 2006 19:18:42 +0000 (19:18 +0000)
Add VICED_CAPABILITY_SANEACLS bit and -saneacls option to viced to
enable it.

src/fsint/common.xg
src/viced/afsfileprocs.c
src/viced/viced.c
src/viced/viced.h

index 3f05747..cb3b436 100644 (file)
@@ -174,12 +174,13 @@ typedef afs_int32 serverList<AFSMAXCELLHOSTS>;
 typedef afs_uint32 cacheConfig<>;
 
 const AFSCAPABILITIESMAX = 196;
-typedef afs_int32 Capabilities<AFSCAPABILITIESMAX>;
+typedef afs_uint32 Capabilities<AFSCAPABILITIESMAX>;
 
 /* 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;
index eef1b20..cd6fb5f 100644 (file)
@@ -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;
index 948b5a5..4b00a99 100644 (file)
@@ -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);
        }
index d8c837c..e6e08a1 100644 (file)
@@ -181,6 +181,7 @@ struct AFSStatistics {
 };
 
 extern int busyonrst;
+extern int saneacls;
 
 #define RESTART_ORDINARY 1
 #define RESTART_FAST 2