From 0d28301dd9501b589255d98aed6fa56b9f0059cf Mon Sep 17 00:00:00 2001 From: Wichert Akkerman Date: Thu, 30 Nov 2000 02:48:51 +0000 Subject: [PATCH] more dpkg-statoverride fixes --- ChangeLog | 6 ++++-- scripts/dpkg-statoverride.pl | 12 ++++++------ 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index c06419b2..25dbbab9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,7 +1,9 @@ Thu Nov 30 02:45:42 CET 2000 Wichert Akkerman - * scripts/dpkg-statoverride.{pl,8}: add new --import option to - import settings from /etc/suid.conf + * scripts/dpkg-statoverride.{pl,8}: + + add new --import option to import settings from /etc/suid.conf + + fix ENOENT issues + + use %owner consistently isntead of %owner and %user Wed Nov 29 17:56:43 CET 2000 Wichert Akkerman diff --git a/scripts/dpkg-statoverride.pl b/scripts/dpkg-statoverride.pl index 6b20e431..d7e3118f 100755 --- a/scripts/dpkg-statoverride.pl +++ b/scripts/dpkg-statoverride.pl @@ -102,7 +102,7 @@ if ($mode eq "add") { $file= $ARGV[3]; $file =~ m/\n/ && &badusage("file may not contain newlines"); - if (defined $user{$file}) { + if (defined $owner{$file}) { print STDERR "An override for \"$file\" already exists, "; if ($doforce) { print STDERR "but --force specified so lets ignore it.\n"; @@ -111,7 +111,7 @@ if ($mode eq "add") { exit(3); } } - $user{$file}=$user; + $owner{$file}=$user; $group{$file}=$group; $mode{$file}=$mode; $dowrite=1; @@ -127,11 +127,11 @@ if ($mode eq "add") { } elsif ($mode eq "remove") { @ARGV==1 || &badusage("--remove needs one arguments"); $file=$ARGV[0]; - if (not defined $user{$file}) { + if (not defined $owner{$file}) { print "No override present."; exit(0); } - delete $user{$file}; + delete $owner{$file}; delete $group{$file}; delete $mode{$file}; $dowrite=1; @@ -140,7 +140,7 @@ if ($mode eq "add") { @ARGV==2 || &badusage("--import needs two arguments"); $pkg=$ARGV[0]; $file=$ARGV[1]; - if (defined $user{$file}) { + if (defined $owner{$file}) { print STDERR "An override for \"$file\" already exists, "; if ($doforce) { print STDERR "but --force specified so lets ignore it.\n"; @@ -158,7 +158,7 @@ if ($mode eq "add") { next if ($sm_pkg eq $pkg); $sm_user="#$sm_user" if ($sm_user =~ m/^\d*$/); $sm_group="#$sm_group" if ($sm_group =~ m/^\d*$/); - $user{$fm_file}=$sm_user; + $owner{$fm_file}=$sm_user; $group{$fm_file}=$sm_group; if ( -x "/usr/sbin/suidunregister") { @args = ("suidunregister", "$file"); -- 2.39.5