summaryrefslogtreecommitdiff
path: root/dh_suidregister
blob: 6a1efafa727687556148d91ce918247bdc14d697 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/usr/bin/perl -w
#
# 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);
	}

	if (($PACKAGE eq $dh{FIRSTPACKAGE} || $dh{PARAMS_ALL}) && @ARGV) {
		push @files, @ARGV;
	}

	if (! @files && ! $suid) {
		# No files specified (and no empty debian/suid file), so
		# guess what files to process.
		@files=split(/\n/,`find $TMP -type f -perm +6000`);
	}

	if (@files) {
		# So we would have registered some files before.
		error("This program should no longer be used, but you need to add a conflicts with \"suidmanager (<< 0.50)\". Please read the dh_suidregister(1) man page.");
	}
}

# 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.");
}