[Debootloaders-devel] r197 - in trunk/silo/debian: . patches

ag-guest at alioth.debian.org ag-guest at alioth.debian.org
Mon Aug 13 15:46:15 UTC 2007


Author: ag-guest
Date: 2007-08-13 15:46:15 +0000 (Mon, 13 Aug 2007)
New Revision: 197

Added:
   trunk/silo/debian/patches/11-silocheck_non-failure_on_stat.patch
Modified:
   trunk/silo/debian/changelog
   trunk/silo/debian/patches/series
Log:
* Add 11-silocheck_non-failure_on_stat.patch to avoid silent failure
  of silocheck when an unresolved symlink is encountered under /dev.


Modified: trunk/silo/debian/changelog
===================================================================
--- trunk/silo/debian/changelog	2007-08-13 13:50:58 UTC (rev 196)
+++ trunk/silo/debian/changelog	2007-08-13 15:46:15 UTC (rev 197)
@@ -12,8 +12,10 @@
   * Create a new non-native upstream tarball with the same version,
     but we need to bump it for dak to accept it. (Closes: #337303)
   * Fix lintian warning "debian-rules-uses-pwd line 32".
+  * Add 11-silocheck_non-failure_on_stat.patch to avoid silent failure
+    of silocheck when an unresolved symlink is encountered under /dev.
 
- -- Aurélien GÉRÔME <ag at roxor.cx>  Mon, 13 Aug 2007 15:14:00 +0200
+ -- Aurélien GÉRÔME <ag at roxor.cx>  Mon, 13 Aug 2007 17:35:30 +0200
 
 silo (1.4.13-1) unstable; urgency=low
 

Added: trunk/silo/debian/patches/11-silocheck_non-failure_on_stat.patch
===================================================================
--- trunk/silo/debian/patches/11-silocheck_non-failure_on_stat.patch	                        (rev 0)
+++ trunk/silo/debian/patches/11-silocheck_non-failure_on_stat.patch	2007-08-13 15:46:15 UTC (rev 197)
@@ -0,0 +1,24 @@
+diff -ruN a/silo/silocheck.c b/silo/silocheck.c
+--- a/silo/silocheck.c        2006-06-01 17:24:53.000000000 +0000
++++ b/silo/silocheck.c       2007-08-13 15:26:21.000000000 +0000
+@@ -22,6 +22,7 @@
+ #include "../second/fs/ufs.c"
+ #endif
+
++#include <errno.h>
+ #include <stdio.h>
+ #include <stdarg.h>
+ #include <string.h>
+@@ -254,7 +255,11 @@
+     p = strchr (name, 0);
+     while ((dir = readdir(dp)) != NULL) {
+         strcpy(p,dir->d_name);
+-        if (stat(name,&s) < 0) return NULL;
++        /*
++         * It is possible that we got an unresolved symlink under /dev.
++         * Such a file will make silocheck fail and we do not want this.
++         */
++        if (stat(name,&s) < 0 && errno != ENOENT) return NULL;
+         if (S_ISBLK(s.st_mode) && s.st_rdev == number) return name;
+     }
+     return NULL;

Modified: trunk/silo/debian/patches/series
===================================================================
--- trunk/silo/debian/patches/series	2007-08-13 13:50:58 UTC (rev 196)
+++ trunk/silo/debian/patches/series	2007-08-13 15:46:15 UTC (rev 197)
@@ -1 +1,2 @@
 10-silo_new_ufs_superblock.patch
+11-silocheck_non-failure_on_stat.patch




More information about the Debootloaders-devel mailing list