]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
* Don't create the unused /etc/openafs/AFSLog file. (Closes: #120097)
authorRuss Allbery <rra@debian.org>
Fri, 19 Aug 2005 01:55:57 +0000 (01:55 +0000)
committerRuss Allbery <rra@debian.org>
Fri, 19 Aug 2005 01:55:57 +0000 (01:55 +0000)
debian/changelog
debian/patches/afslog [new file with mode: 0644]
src/afsd/afsd.c

index 5e81cf8f8471dd2fedb575e92e0790c59c636c5c..058ceb4104ac995f7b6658795ff6b1330549adf6 100644 (file)
@@ -7,6 +7,7 @@ openafs (1.3.87-2) unstable; urgency=low
     Gelato for analysis and patches.  (Closes: #322638)
   * Detect AFS caches on non-ext2/ext3 file systems and abort AFS client
     initialization.  (Closes: #249315)
+  * Don't create the unused /etc/openafs/AFSLog file.  (Closes: #120097)
   * Redo how library object files are found for the PAM module build to
     avoid assuming C locale character set behavior.  (Closes: #323582)
   * Remove the openafs-client warning against dynroot for the first system
diff --git a/debian/patches/afslog b/debian/patches/afslog
new file mode 100644 (file)
index 0000000..ec5ea5a
--- /dev/null
@@ -0,0 +1,84 @@
+Submitted upstream as #18662, but deferred until after the 1.4 release
+for upstream.  Fixes Debian bug #120097.
+
+--- openafs-1.3.87.orig/src/afsd/afsd.c
++++ openafs-1.3.87/src/afsd/afsd.c
+@@ -47,7 +47,8 @@
+   *                system problems, which can only be ameliorated by changing
+   *                NINODE (or equivalent) and rebuilding the kernel.
+   *              This option is now disabled.
+-  *   -logfile   Place where to put the logfile (default in <cache>/etc/AFSLog.
++  *   -logfile   [OBSOLETE] Place where to put the logfile (default in
++  *                <cache>/etc/AFSLog.
+   *   -waitclose make close calls always synchronous (slows em down, tho)
+   *   -files_per_subdir [n]   number of files per cache subdir. (def=2048)
+   *   -shutdown  Shutdown afs daemons
+@@ -184,7 +185,6 @@
+ #define CACHEINFOFILE   "cacheinfo"
+-#define       AFSLOGFILE      "AFSLog"
+ #define       DCACHEFILE      "CacheItems"
+ #define       VOLINFOFILE     "VolumeItems"
+ #define CELLINFOFILE  "CellItems"
+@@ -236,7 +236,6 @@
+ char fullpn_DCacheFile[1024]; /*Full pathname of DCACHEFILE */
+ char fullpn_VolInfoFile[1024];        /*Full pathname of VOLINFOFILE */
+ char fullpn_CellInfoFile[1024];       /*Full pathanem of CELLINFOFILE */
+-char fullpn_AFSLogFile[1024]; /*Full pathname of AFSLOGFILE */
+ char fullpn_CacheInfo[1024];  /*Full pathname of CACHEINFO */
+ char fullpn_VFile[1024];      /*Full pathname of data cache files */
+ char *vFilePtr;                       /*Ptr to the number part of above pathname */
+@@ -1441,10 +1440,9 @@
+       strcpy(confDir, as->parms[17].items->data);
+     }
+     sprintf(fullpn_CacheInfo, "%s/%s", confDir, CACHEINFOFILE);
+-    sprintf(fullpn_AFSLogFile, "%s/%s", confDir, AFSLOGFILE);
+     if (as->parms[18].items) {
+       /* -logfile */
+-      strcpy(fullpn_AFSLogFile, as->parms[18].items->data);
++        printf("afsd: Ignoring obsolete -logfile flag\n");
+     }
+     if (as->parms[19].items) {
+       /* -waitclose */
+@@ -1561,18 +1559,6 @@
+       exit(1);
+     }
+-    if ((logfd = fopen(fullpn_AFSLogFile, "r+")) == 0) {
+-      if (afsd_verbose)
+-          printf("%s: Creating '%s'\n", rn, fullpn_AFSLogFile);
+-      if (CreateCacheFile(fullpn_AFSLogFile, NULL)) {
+-          printf
+-              ("%s: Can't create '%s' (You may want to use the -logfile option)\n",
+-               rn, fullpn_AFSLogFile);
+-          exit(1);
+-      }
+-    } else
+-      fclose(logfd);
+-
+     /* do some random computations in memcache case to get things to work
+      * reasonably no matter which parameters you set.
+      */
+@@ -1978,21 +1964,6 @@
+       call_syscall(AFSOP_VOLUMEINFO, fullpn_VolInfoFile);
+     /*
+-     * Pass the kernel the name of the afs logging file holding the volume
+-     * information.
+-     */
+-    if (afsd_debug)
+-      printf("%s: Calling AFSOP_AFSLOG: volume info file is '%s'\n", rn,
+-             fullpn_AFSLogFile);
+-#if defined(AFS_SGI_ENV)
+-    /* permit explicit -logfile argument to enable logging on memcache systems */
+-    if (!(cacheFlags & AFSCALL_INIT_MEMCACHE) || as->parms[18].items)
+-#else
+-    if (!(cacheFlags & AFSCALL_INIT_MEMCACHE))        /* ... nor this ... */
+-#endif
+-      call_syscall(AFSOP_AFSLOG, fullpn_AFSLogFile);
+-
+-    /*
+      * Give the kernel the names of the AFS files cached on the workstation's
+      * disk.
+      */
index 2d98c5f71dc61f1d15f82177cf7d46d2e8e11dd9..05b3032b8514802b8983594a96224a5e356d1a5f 100644 (file)
@@ -47,7 +47,8 @@
   *                system problems, which can only be ameliorated by changing
   *                NINODE (or equivalent) and rebuilding the kernel.
   *               This option is now disabled.
-  *    -logfile   Place where to put the logfile (default in <cache>/etc/AFSLog.
+  *    -logfile   [OBSOLETE] Place where to put the logfile (default in
+  *                <cache>/etc/AFSLog.
   *    -waitclose make close calls always synchronous (slows em down, tho)
   *    -files_per_subdir [n]   number of files per cache subdir. (def=2048)
   *    -shutdown  Shutdown afs daemons
@@ -184,7 +185,6 @@ kern_return_t DiskArbDiskAppearedWithMountpointPing_auto(char *, unsigned int,
 
 
 #define CACHEINFOFILE   "cacheinfo"
-#define        AFSLOGFILE      "AFSLog"
 #define        DCACHEFILE      "CacheItems"
 #define        VOLINFOFILE     "VolumeItems"
 #define CELLINFOFILE   "CellItems"
@@ -236,7 +236,6 @@ char confDir[1024];         /*Where the workstation AFS configuration lives */
 char fullpn_DCacheFile[1024];  /*Full pathname of DCACHEFILE */
 char fullpn_VolInfoFile[1024]; /*Full pathname of VOLINFOFILE */
 char fullpn_CellInfoFile[1024];        /*Full pathanem of CELLINFOFILE */
-char fullpn_AFSLogFile[1024];  /*Full pathname of AFSLOGFILE */
 char fullpn_CacheInfo[1024];   /*Full pathname of CACHEINFO */
 char fullpn_VFile[1024];       /*Full pathname of data cache files */
 char *vFilePtr;                        /*Ptr to the number part of above pathname */
@@ -1441,10 +1440,9 @@ mainproc(as, arock)
        strcpy(confDir, as->parms[17].items->data);
     }
     sprintf(fullpn_CacheInfo, "%s/%s", confDir, CACHEINFOFILE);
-    sprintf(fullpn_AFSLogFile, "%s/%s", confDir, AFSLOGFILE);
     if (as->parms[18].items) {
        /* -logfile */
-       strcpy(fullpn_AFSLogFile, as->parms[18].items->data);
+        printf("afsd: Ignoring obsolete -logfile flag\n");
     }
     if (as->parms[19].items) {
        /* -waitclose */
@@ -1561,18 +1559,6 @@ mainproc(as, arock)
        exit(1);
     }
 
-    if ((logfd = fopen(fullpn_AFSLogFile, "r+")) == 0) {
-       if (afsd_verbose)
-           printf("%s: Creating '%s'\n", rn, fullpn_AFSLogFile);
-       if (CreateCacheFile(fullpn_AFSLogFile, NULL)) {
-           printf
-               ("%s: Can't create '%s' (You may want to use the -logfile option)\n",
-                rn, fullpn_AFSLogFile);
-           exit(1);
-       }
-    } else
-       fclose(logfd);
-
     /* do some random computations in memcache case to get things to work
      * reasonably no matter which parameters you set.
      */
@@ -1977,21 +1963,6 @@ mainproc(as, arock)
     if (!(cacheFlags & AFSCALL_INIT_MEMCACHE)) 
        call_syscall(AFSOP_VOLUMEINFO, fullpn_VolInfoFile);
 
-    /*
-     * Pass the kernel the name of the afs logging file holding the volume
-     * information.
-     */
-    if (afsd_debug)
-       printf("%s: Calling AFSOP_AFSLOG: volume info file is '%s'\n", rn,
-              fullpn_AFSLogFile);
-#if defined(AFS_SGI_ENV)
-    /* permit explicit -logfile argument to enable logging on memcache systems */
-    if (!(cacheFlags & AFSCALL_INIT_MEMCACHE) || as->parms[18].items)
-#else
-    if (!(cacheFlags & AFSCALL_INIT_MEMCACHE)) /* ... nor this ... */
-#endif
-       call_syscall(AFSOP_AFSLOG, fullpn_AFSLogFile);
-
     /*
      * Give the kernel the names of the AFS files cached on the workstation's
      * disk.