]> git.donarmstrong.com Git - debhelper.git/commitdiff
r407: * suidmanager is obsolete now, and so is dh_suidmanager. Instead,
authorjoey <joey>
Wed, 10 Jan 2001 22:21:55 +0000 (22:21 +0000)
committerjoey <joey>
Wed, 10 Jan 2001 22:21:55 +0000 (22:21 +0000)
     packages that contain suid binaries should include the binaries suid in
     the .deb, and dpkg-statoverride can override this. If this is done
     to a program that previously used suidmanager, though, you need to
     conflict with suidmanager (<< 0.50).
   * Made dh_suidmanager check to see if it would have done anything before.
     If so, it states that it is obsolete, and refer users to the man
     page, which now explains the situation, and then aborts the build.
     If it would have done nothing before, it just outputs a warning that
     it is an obsolete program.

13 files changed:
autoscripts/postinst-suid [deleted file]
autoscripts/postrm-suid [deleted file]
debian/changelog
debian/rules
dh_debstd
dh_suidregister
dh_suidregister.1
doc/TODO
doc/from-debstd
examples/rules
examples/rules.indep
examples/rules.multi
examples/rules.multi2

diff --git a/autoscripts/postinst-suid b/autoscripts/postinst-suid
deleted file mode 100644 (file)
index 820d69a..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-if [ "$1" = "configure" ]; then
-       if command -v suidregister >/dev/null 2>&1 && [ -e /etc/suid.conf ]; then
-               suidregister -s #PACKAGE# /#FILE# #OWNER# #GROUP# #PERMS#
-       elif [ -e /#FILE# ]; then
-               chown #OWNER#.#GROUP# /#FILE#
-               chmod #PERMS# /#FILE#
-       fi
-fi
diff --git a/autoscripts/postrm-suid b/autoscripts/postrm-suid
deleted file mode 100644 (file)
index 340736a..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-if [ "$1" = remove -a -e /etc/suid.conf ] && \
-   command -v suidunregister >/dev/null 2>&1; then
-        suidunregister -s #PACKAGE# /#FILE#
-fi
index 353755120b35288cbfaca66059ff776a59c189ed..670a257e29c2d81c422e4cde3e7906abb4875010 100644 (file)
@@ -1,3 +1,18 @@
+debhelper (2.2.12) unstable; urgency=medium
+
+  * suidmanager is obsolete now, and so is dh_suidmanager. Instead,
+    packages that contain suid binaries should include the binaries suid in
+    the .deb, and dpkg-statoverride can override this. If this is done
+    to a program that previously used suidmanager, though, you need to
+    conflict with suidmanager (<< 0.50).
+  * Made dh_suidmanager check to see if it would have done anything before.
+    If so, it states that it is obsolete, and refer users to the man
+    page, which now explains the situation, and then aborts the build.
+    If it would have done nothing before, it just outputs a warning that
+    it is an obsolete program.
+
+ -- Joey Hess <joeyh@debian.org>  Wed, 10 Jan 2001 13:17:50 -0800
+
 debhelper (2.2.11) unstable; urgency=medium
 
   * Fixed dh_installwm. Oops. Closes: #81124 
index 08a474e2b46f4c9ba1eee63cb91fa6807a2f0588..23de85d45eed7eed4951bc059abc93542bf5a3ab 100755 (executable)
@@ -98,7 +98,6 @@ binary-indep: build
        ./dh_link
        ./dh_compress
        ./dh_fixperms
-       ./dh_suidregister
        ./dh_installdeb
        ./dh_gencontrol
        ./dh_md5sums
index 5577150b10f48e8cb4b4f628e455ea2f0e196cb0..6d2290c479c06aa7311ffe1249e52632e6a1c8a1 100755 (executable)
--- a/dh_debstd
+++ b/dh_debstd
@@ -177,7 +177,6 @@ if (! $ds{NOCOMPRESS}) {
 }
 
 doit("dh_fixperms");
-doit("dh_suidregister");
 doit("dh_shlibdeps");
 doit("dh_gencontrol");
 doit("dh_makeshlibs");
index 08cc324845b11c1733b43e26a6ed15ed0ef84893..bbadddf87991e4074dd547807fa42109e0026924 100755 (executable)
@@ -1,18 +1,19 @@
 #!/usr/bin/perl -w
 #
-# If no parameters are given, and no debian/suid files exists, scan for 
-# suid/sgid files and suidregister them. 
-#
-# If there are parameters, or there is a debian/suid, register the files
-# listed there.
+# Obsolete.
 
 use Debian::Debhelper::Dh_Lib;
 init();
 
+my $notused=1;
+
 foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
        $TMP=tmpdir($PACKAGE);
        $suid=pkgfile($PACKAGE,"suid");
 
+       # All this code is here just to see if we would have done something
+       # before..
+
        @files=();
        if ($suid) {
                @files=filearray($suid, $TMP);
@@ -26,56 +27,15 @@ foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
                # No files specified (and no empty debian/suid file), so
                # guess what files to process.
                @files=split(/\n/,`find $TMP -type f -perm +6000`);
-
-               # We will strip the debian working directory off of the
-               # filenames.
-               $tostrip="$TMP/";
-       }
-       else {
-               # We will strip leading /'s, so the user can feed this
-               # program either absolute filenames, or relative filenames,
-               # and it will do the right thing either way.
-               $tostrip="/";
        }
 
-       # Register files with suidregister.
-       foreach $file (@files) {
-               # Strip leading $tostrip from $file.
-               $file=~s/^$tostrip//;
-
-               if (! -e "$TMP/$file") {
-                       error("\"$TMP/$file\" does not exist.");
-               }
-               
-               # Create the sed string that will be used to 
-               # fill in the blanks in the autoscript files.
-               # Fill with the owner, group, and perms of the file.
-               (undef,undef,$mode,undef,$uid,$gid,undef) = stat("$TMP/$file");
-               # Now come up with the user and group names for the uid and gid.
-               $user=getpwuid($uid);
-               if (! defined $user) {
-                       warning("$file has odd uid $uid, not in /etc/passwd");
-                       $user=$uid;
-               }
-               $group=getgrgid($gid);
-               if (! defined $group) {
-                       warning("$file has odd gid $gid not in /etc/group");
-                       $group=$gid;
-               }
-               # Note that I have to print mode in ocal, stripping file type.
-               $sedstr=sprintf("s:#FILE#:$file:;s/#PACKAGE#/$PACKAGE/;s/#OWNER#/$user/;s/#GROUP#/$group/;s/#PERMS#/%#o/",
-                               $mode & 07777);
-
-               autoscript($PACKAGE,"postinst","postinst-suid",$sedstr);
-               autoscript($PACKAGE,"postrm","postrm-suid","$sedstr");
+       if (@files) {
+               # So we would have registered some files before.
+               error("This program should no longer be used. Please read the dh_suidregister(1) man page.");
        }
+}
 
-       # Remove suid bits from files. This is delayed to this point, because
-       # of a situation with hard linked files if it is done earlier.
-       # See changelog for 2.0.77.
-       foreach $file (@files) {
-               if ( -e "$TMP/$file") {
-                       doit("chmod","a-s","$TMP/$file");
-               }
-       }
+# Although they called it, it's not going to do anything.
+if ($notused) {
+       warning("This program is obsolete and may be safely removed from your rules file.");
 }
index 09da5123c0303ce03fef29111bdd7ffaa3fc1fb3..0ec8953864d036d49f5401682a97add9200c14e9 100644 (file)
@@ -1,61 +1,29 @@
 .TH DH_SUIDREGISTER 1 "" "Debhelper Commands" "Debhelper Commands"
 .SH NAME
-dh_suidregister \- set up package to register files with suidregister
+dh_suidregister \- obsolete suid registration program
 .SH SYNOPSIS
-.B dh_suidregister
-.I "[debhelper options] [-A] [file ...]"
+Do not run
 .SH "DESCRIPTION"
-dh_suidregister is a debhelper program that is responsible for modifying the
-postinst and postrm scripts of a package so the package will register files
-with
+This program used to register suid and sgid files with 
 .BR suidregister (1)
-when it is installed.
+, but with the introduction of
+.BR dpkg-statoverride (8)
+, registration of files in this way is unnecessary, and even harmful, so 
+this program no longer does anything, and you can remove it from any rules
+file that uses it.
 .P
-Any filenames specified as parameters will be registered in the first
-package dh_suidregister is told to act on. By default, this is the first
-binary package in debian/control, but if you use -p, -i, or -a flags,
-it will be the first package specified by those flags.
+If your package registered things with suidregister before, you need to
+make sure that you add a versioned conflict, as follows:
+  Conflicts: suidmanager (<< 0.50)
 .P
-Files named debian/package.suid can list other files to be registered.
-.P
-If neither of these methods is used to specify files, dh_suidregister will
-scan the package build directory for files that have suid permissions, and
-will automatically register all files it finds.
-.P
-Note that this program modifies your postinst and postrm files. See
-.BR dh_installdeb (1)
-for an explanation of how this works.
-.P
-Also note that all files registered by this program will *not* be suid in the
-resulting .deb file. The postinst of the package will set their permissions
-(even if the user doesn't have suidmanager installed).
-.SH OPTIONS
-.TP
-.B debhelper options
-See
-.BR debhelper (1)
-for a list of options common to all debhelper commands.
-.TP
-.B \-A, \--all
-Register any files specified by command line parameters in ALL packages
-acted on. I doubt anyone will find this useful, it's here for consitency
-with other debhelper programs.
-.TP
-.B file ...
-Register these files in the first package acted on. (Or in all packages if
--A is specified.)
-.SH NOTES
-dh_suidregister does not make anything suid. It merely records the
-permissions binaries already have. If you need to make something suid, you
-must do so manually before calling dh_suidregister.
-.SH ENVIRONMENT
-See
-.BR debhelper (1)
-for a list of environment variables that affect all debhelper commands.
+This is not done automatically. If your program did not previously use
+suidregister, you do not have to add the conflict.
 .SH "SEE ALSO"
 .TP
 .BR debhelper (1)
 .TP
 .BR suidregister (8)
+.TP
+.BR dpkg-statoverride (8)
 .SH AUTHOR
 Joey Hess <joeyh@debian.org>
index fa5fc0339bdc995923df799d1459bc27c10769ae..102acd3f70f844fbf4dcd52e7c96217f72994c3d 100644 (file)
--- a/doc/TODO
+++ b/doc/TODO
@@ -49,4 +49,4 @@ Deprecated:
   see what other switches are not being used, and maybe remove some of
   them. I'd also like to depercate/remove debian/compress files, -X is
   a better idea.
-
+* dh_suidmanager. Once nothing in the archive uses it.
index 5d4fc5683b3cfb728e215eb6a3449e963e156c59..3cd179b453dd3fd6de2637aa66bc5a235ece1a8b 100644 (file)
@@ -36,7 +36,6 @@ actually doing anything to your package. The list will look similar to this:
        dh_strip
        dh_compress
        dh_fixperms
-       dh_suidregister
        dh_shlibdeps
        dh_gencontrol
        dh_makeshlibs
index 19b5777a4c35362d87206b07255edcfa9a4eea75..7eef799e93e2a7f55afbc22b0844ddfde1b83508 100755 (executable)
@@ -64,8 +64,6 @@ binary-arch: build install
        dh_strip
        dh_compress
        dh_fixperms
-       # You may want to make some executables suid here.
-       dh_suidregister
 #      dh_makeshlibs
        dh_installdeb
 #      dh_perl
index 0c3e6e15dda25414c2c2b91a1ea7e178aa53cf17..71e0a52df139018ddba617c00e71e1ee3a72d1f6 100755 (executable)
@@ -61,8 +61,6 @@ binary-indep: build install
        dh_link
        dh_compress
        dh_fixperms
-       # You may want to make some executables suid here.
-       dh_suidregister
        dh_installdeb
 #      dh_perl
        dh_gencontrol
index 6ba2bc88c8f40e4a5239fb8e8bc6263f080b99d0..0dc703fc3c4053a8e21a82f473a7dca2005e524f 100755 (executable)
@@ -66,8 +66,6 @@ binary-indep: build install
        dh_link -i
        dh_compress -i
        dh_fixperms -i
-       # You may want to make some executables suid here.
-       dh_suidregister -i
        dh_installdeb -i
 #      dh_perl -i
        dh_gencontrol -i
@@ -97,8 +95,6 @@ binary-arch: build install
        dh_link -a
        dh_compress -a
        dh_fixperms -a
-       # You may want to make some executables suid here.
-       dh_suidregister -a
 #      dh_makeshlibs -a
        dh_installdeb -a
 #      dh_perl -a
index 0af60eea422dbfdc48eae79ace4acea26bc60559..0684ca6f384f1ad364b6af104a84866ac8fbff3f 100755 (executable)
@@ -70,8 +70,6 @@ binary-common:
        dh_link
        dh_compress
        dh_fixperms
-       # You may want to make some executables suid here.
-       dh_suidregister
 #      dh_makeshlibs
        dh_installdeb
 #      dh_perl