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

lintian: r31 - in trunk: checks debian testset testset/binary/debian



Author: jeroen
Date: 2004-02-12 20:43:26 +0100 (Thu, 12 Feb 2004)
New Revision: 31

Modified:
   trunk/checks/menu-format
   trunk/checks/menu-format.desc
   trunk/debian/changelog
   trunk/testset/binary/debian/changelog
   trunk/testset/binary/debian/menu
   trunk/testset/info_tags.binary
   trunk/testset/tags.binary
Log:
checks/menu-format
+ Added three checks for correct su-to-root usage (Closes: #188095)
  (based on patch by Bill Allombert <ballombe@debian.org>)


Modified: trunk/checks/menu-format
===================================================================
--- trunk/checks/menu-format	2004-02-12 15:09:40 UTC (rev 30)
+++ trunk/checks/menu-format	2004-02-12 19:43:26 UTC (rev 31)
@@ -290,6 +290,26 @@
 	    print "W: $pkg $type: menu-item-contains-unknown-tag $tag /usr/lib/menu/$menufile:$linecount\n";
 	}
     }
+    
+    if (exists($vals{'command'})) {
+	my @com=split(' ',$vals{'command'});
+	if ($com[0] eq "su-to-root") {
+	    print "E: $pkg $type: su-to-root-without-usr-sbin /usr/lib/menu/$menufile:$linecount\n";
+	} elsif ($com[0] eq "/usr/bin/su-to-root") {
+	    print "E: $pkg $type: su-to-root-with-usr-bin /usr/lib/menu/$menufile:$linecount\n";
+	} elsif ($com[0] eq "/usr/sbin/su-to-root") {
+	    shift @com;
+	    # This is _so_ going to break on every parameter added to
+	    # su-to-root... But alas --Jeroen
+	    if (defined($com[0]) && $com[0] eq '-p') {
+		shift @com;
+		shift @com;
+	    }
+	    if (! defined($com[0]) || $com[0] ne '-c') {
+		print "E: $pkg $type: su-to-root-without--c /usr/lib/menu/$menufile:$linecount\n";
+	    }
+	}
+    }
 	
     if (exists($vals{'icon'})) {
 	VerifyIcon($menufile, $linecount, $vals{'icon'});

Modified: trunk/checks/menu-format.desc
===================================================================
--- trunk/checks/menu-format.desc	2004-02-12 15:09:40 UTC (rev 30)
+++ trunk/checks/menu-format.desc	2004-02-12 19:43:26 UTC (rev 31)
@@ -124,3 +124,28 @@
  window managers and standard tools accept the file then probably it's the
  latter; please notify &maint; either directly or via the bug tracking
  system.
+
+Tag: su-to-root-without--c
+Type: error
+Info: The menu item command uses su-to-root without the -c flag. This is
+ a syntax error, see su-to-root(1) for more information.
+
+Tag: su-to-root-with-usr-bin
+Type: error
+Info: The menu item command use su-to-root using /usr/bin/su-to-root.
+ Usually, using absolute pathnames is bad. In this specific case however, you
+ should use the absolute pathname of /usr/sbin/su-to-root.
+ .
+ The reason for this is that the old Woody menu package had su-to-root
+ exclusively in /usr/sbin, which is not in a regular user's $PATH.
+ Therefore, the absolute pathname to su-to-root is still required for Sarge
+ packages.
+
+Tag: su-to-root-without-usr-sbin
+Type: error
+Info: The menu item command use su-to-root without the full
+ /usr/sbin/su-to-root path. The Woody version of menu does not have a
+ su-to-root in a user's $PATH, unlike Sarge's version of menu.
+ .
+ Therefore, the absolute pathname to su-to-root is still required for Sarge
+ packages.

Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog	2004-02-12 15:09:40 UTC (rev 30)
+++ trunk/debian/changelog	2004-02-12 19:43:26 UTC (rev 31)
@@ -33,6 +33,8 @@
    * checks/menu-format
      + Drop menu-icon-has-bad-colors, it doesn't apply anymore (Closes: #199341)
      + Menu sub-policy 3.6.0 added two sections (Closes: #207529)
+     + Added three checks for correct su-to-root usage (Closes: #188095)
+       (based on patch by Bill Allombert <ballombe@debian.org>)
    * checks/scripts
      + Recognise the 'tcl' interpreter, not the same as tclsh (Closes: #230182)
 
@@ -52,7 +54,7 @@
      + fix testing of dependencies to eliminate false
        positives of missing-debconf-dependency (Closes: #195201)
 
- -- Jeroen van Wolffelaar <jeroen@wolffelaar.nl>  Thu, 12 Feb 2004 02:56:27 +0100
+ -- Jeroen van Wolffelaar <jeroen@wolffelaar.nl>  Thu, 12 Feb 2004 19:52:00 +0100
 
 lintian (1.22.9) unstable; urgency=low
 

Modified: trunk/testset/binary/debian/changelog
===================================================================
--- trunk/testset/binary/debian/changelog	2004-02-12 15:09:40 UTC (rev 30)
+++ trunk/testset/binary/debian/changelog	2004-02-12 19:43:26 UTC (rev 31)
@@ -1,3 +1,9 @@
+binary (3) unstable; urgency=unlimited
+
+  * Add some bogus menu entries using su-to-root in a bogus way
+
+ -- Jeroen van Wolffelaar <jeroen@wolffelaar.nl>  Thu, 12 Feb 2004 20:11:22 +0100
+
 binary (2) unstable; urgency=low
 
   * Added an INSTALL document which policy 6.3 suggests not to do

Modified: trunk/testset/binary/debian/menu
===================================================================
--- trunk/testset/binary/debian/menu	2004-02-12 15:09:40 UTC (rev 30)
+++ trunk/testset/binary/debian/menu	2004-02-12 19:43:26 UTC (rev 31)
@@ -1 +1,5 @@
 ?package(binary):needs=text title="Hello World" command="/usr/bin/hello"
+?package(binary):needs=text section="Apps/System" title="Run cfdisk (0)" command="/usr/sbin/su-to-root cfdisk"
+?package(binary):needs=text section="Apps/System" title="Run cfdisk (1)" command="/usr/sbin/su-to-root -p cfdisk"
+?package(binary):needs=text section="Apps/System" title="Run cfdisk (2)" command="su-to-root -c cfdisk"
+?package(binary):needs=text section="Apps/System" title="Run cfdisk (3)" command="/usr/bin/su-to-root cfdisk"

Modified: trunk/testset/info_tags.binary
===================================================================
--- trunk/testset/info_tags.binary	2004-02-12 15:09:40 UTC (rev 30)
+++ trunk/testset/info_tags.binary	2004-02-12 19:43:26 UTC (rev 31)
@@ -70,6 +70,32 @@
 N:   to the root menu. Note that if you specify an empty section, this
 N:   error will pop up, as it will if you specify a section of "/".
 N:
+E: binary: su-to-root-without--c /usr/lib/menu/binary:2
+N:
+N:   The menu item command uses su-to-root without the -c flag. This is a
+N:   syntax error, see su-to-root(1) for more information.
+N:
+E: binary: su-to-root-without--c /usr/lib/menu/binary:3
+E: binary: su-to-root-without-usr-sbin /usr/lib/menu/binary:4
+N:
+N:   The menu item command use su-to-root without the full
+N:   /usr/sbin/su-to-root path. The Woody version of menu does not have a
+N:   su-to-root in a user's $PATH, unlike Sarge's version of menu.
+N:   
+N:   Therefore, the absolute pathname to su-to-root is still required for
+N:   Sarge packages.
+N:
+E: binary: su-to-root-with-usr-bin /usr/lib/menu/binary:5
+N:
+N:   The menu item command use su-to-root using /usr/bin/su-to-root.
+N:   Usually, using absolute pathnames is bad. In this specific case
+N:   however, you should use the absolute pathname of /usr/sbin/su-to-root.
+N:   
+N:   The reason for this is that the old Woody menu package had su-to-root
+N:   exclusively in /usr/sbin, which is not in a regular user's $PATH.
+N:   Therefore, the absolute pathname to su-to-root is still required for
+N:   Sarge packages.
+N:
 E: binary: unstripped-binary-or-object ./usr/bin/hello
 N:
 N:   The package installs an unstripped binary or object file.

Modified: trunk/testset/tags.binary
===================================================================
--- trunk/testset/tags.binary	2004-02-12 15:09:40 UTC (rev 30)
+++ trunk/testset/tags.binary	2004-02-12 19:43:26 UTC (rev 31)
@@ -7,6 +7,10 @@
 E: binary: suidregister-used-in-maintainer-script postinst
 W: binary: menu-item-missing-important-tag section /usr/lib/menu/binary:1
 E: binary: menu-item-adds-to-root-menu /usr/lib/menu/binary:1
+E: binary: su-to-root-without--c /usr/lib/menu/binary:2
+E: binary: su-to-root-without--c /usr/lib/menu/binary:3
+E: binary: su-to-root-without-usr-sbin /usr/lib/menu/binary:4
+E: binary: su-to-root-with-usr-bin /usr/lib/menu/binary:5
 E: binary: unstripped-binary-or-object ./usr/bin/hello
 E: binary: statically-linked-binary ./usr/bin/hello-static
 E: binary: changelog-file-not-compressed changelog



Reply to: