summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--autoscripts/postinst-suid8
-rw-r--r--autoscripts/postrm-suid4
-rw-r--r--debian/changelog15
-rwxr-xr-xdebian/rules1
-rwxr-xr-xdh_debstd1
-rwxr-xr-xdh_suidregister66
-rw-r--r--dh_suidregister.162
-rw-r--r--doc/TODO2
-rw-r--r--doc/from-debstd1
-rwxr-xr-xexamples/rules2
-rwxr-xr-xexamples/rules.indep2
-rwxr-xr-xexamples/rules.multi4
-rwxr-xr-xexamples/rules.multi22
13 files changed, 44 insertions, 126 deletions
diff --git a/autoscripts/postinst-suid b/autoscripts/postinst-suid
deleted file mode 100644
index 820d69a..0000000
--- a/autoscripts/postinst-suid
+++ /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
index 340736a..0000000
--- a/autoscripts/postrm-suid
+++ /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
diff --git a/debian/changelog b/debian/changelog
index 3537551..670a257 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -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
diff --git a/debian/rules b/debian/rules
index 08a474e..23de85d 100755
--- a/debian/rules
+++ b/debian/rules
@@ -98,7 +98,6 @@ binary-indep: build
./dh_link
./dh_compress
./dh_fixperms
- ./dh_suidregister
./dh_installdeb
./dh_gencontrol
./dh_md5sums
diff --git a/dh_debstd b/dh_debstd
index 5577150..6d2290c 100755
--- 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");
diff --git a/dh_suidregister b/dh_suidregister
index 08cc324..bbadddf 100755
--- a/dh_suidregister
+++ b/dh_suidregister
@@ -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.");
}
diff --git a/dh_suidregister.1 b/dh_suidregister.1
index 09da512..0ec8953 100644
--- a/dh_suidregister.1
+++ b/dh_suidregister.1
@@ -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>
diff --git a/doc/TODO b/doc/TODO
index fa5fc03..102acd3 100644
--- 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.
diff --git a/doc/from-debstd b/doc/from-debstd
index 5d4fc56..3cd179b 100644
--- a/doc/from-debstd
+++ b/doc/from-debstd
@@ -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
diff --git a/examples/rules b/examples/rules
index 19b5777..7eef799 100755
--- a/examples/rules
+++ b/examples/rules
@@ -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
diff --git a/examples/rules.indep b/examples/rules.indep
index 0c3e6e1..71e0a52 100755
--- a/examples/rules.indep
+++ b/examples/rules.indep
@@ -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
diff --git a/examples/rules.multi b/examples/rules.multi
index 6ba2bc8..0dc703f 100755
--- a/examples/rules.multi
+++ b/examples/rules.multi
@@ -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
diff --git a/examples/rules.multi2 b/examples/rules.multi2
index 0af60ee..0684ca6 100755
--- a/examples/rules.multi2
+++ b/examples/rules.multi2
@@ -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