[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

lintian: r611 - in trunk: checks debian



Author: rra
Date: 2006-04-04 22:20:47 +0200 (Tue, 04 Apr 2006)
New Revision: 611

Modified:
   trunk/checks/shared-libs
   trunk/debian/changelog
Log:
* checks/shared-libs:
  + [RA] Limit shlib-without-PT_GNU_STACK-section to only those
    architectures where gcc always adds the section.  Thanks to Frans
    Pop for the report and Bastian Blank for the architecture list.
    (Closes: #357636)

Modified: trunk/checks/shared-libs
===================================================================
--- trunk/checks/shared-libs	2006-04-04 19:23:20 UTC (rev 610)
+++ trunk/checks/shared-libs	2006-04-04 20:20:47 UTC (rev 611)
@@ -41,6 +41,19 @@
         lib/libc5-compat
       );
 
+# The following architectures should always have a STACK setting in shared
+# libraries to disable executable stack.  Other architectures don't always add
+# this section and therefore can't be checked.
+my %stack_arches = map { $_ => 1 }
+    qw( alpha
+	amd64
+	i386
+	m68k
+	powerpc
+	s390
+	sparc
+      );
+
 my $file;
 my $must_call_ldconfig;
 my $postrm = "control/postrm";
@@ -164,10 +177,18 @@
 	    $must_call_ldconfig = $real_file;
 	}
 
-	# executable stack
+	# executable stack.  We can only warn about a missing section on some
+	# architectures.  Only warn if there's an Architecture field; if
+	# that's missing, we'll already be complaining elsewhere.
 	if (exists $objsomething{$cur_file}) {
 	    if (not defined $STACK{$cur_file}) {
-		tag "shlib-without-PT_GNU_STACK-section", $cur_file;
+		if (open(FH, "fields/architecture")) {
+		    my $arch = <FH>;
+		    close FH;
+		    chomp $arch;
+		    tag "shlib-without-PT_GNU_STACK-section", $cur_file
+			if $stack_arches{$arch};
+		}
 	    } elsif ($STACK{$cur_file} ne "rw-") {
 		tag "shlib-with-executable-stack", $cur_file;
 	    }

Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog	2006-04-04 19:23:20 UTC (rev 610)
+++ trunk/debian/changelog	2006-04-04 20:20:47 UTC (rev 611)
@@ -56,6 +56,11 @@
       don't use invoke-rc.d.  Thanks, Lars Wirzenius.  (Closes: #353659)
     + [RA] Find missing ucf dependencies and restructure the code to allow
       easier addition of similar checks.  (Closes: #261891)
+  * checks/shared-libs:
+    + [RA] Limit shlib-without-PT_GNU_STACK-section to only those
+      architectures where gcc always adds the section.  Thanks to Frans
+      Pop for the report and Bastian Blank for the architecture list.
+      (Closes: #357636)
 
   * collection/objdump-info:
     + [RA] Unset CDPATH before running cd to avoid strange effects from



Reply to: