From 15b26b3ddbb649fe97b2055b589e82de921ab96d Mon Sep 17 00:00:00 2001 From: Wichert Akkerman Date: Thu, 30 Nov 2000 02:30:23 +0000 Subject: [PATCH] fix some stupid errors. silly perl syntax.. --- scripts/dpkg-statoverride.pl | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/scripts/dpkg-statoverride.pl b/scripts/dpkg-statoverride.pl index 0d49fbe3..90b4267d 100755 --- a/scripts/dpkg-statoverride.pl +++ b/scripts/dpkg-statoverride.pl @@ -145,25 +145,26 @@ if ($mode eq "add") { print STDERR "aborting\n"; exit(3); } - SUIDCONF=open("/etc/suid.conf") || &quit("error opening /etc/suid.conf"); - while () { - chomp; - ($sm_pkg,$sm_file,$sm_user,$sm_group)=split; - next ($sm_file != $pkg) next; - last if ($sm_pkg==$pkg); - $sm_user="#$sm_user") if ($sm_user =~ m/^\d*$/); - $sm_group="#$sm_group") if ($sm_group =~ m/^\d*$/); - $user{$fm_file}=$sm_user; - $group{$fm_file}=$sm_group; - if { -x /usr/sbin/suidunregister) { - @args = ("suidunregister", "$file"); - system(@args) == 0 || &quit("system @args failed: $?"); - } - $dowrite=1; - last; + } + open(SUIDCONF,"/etc/suid.conf") || &quit("error opening /etc/suid.conf"); + while () { + next if (m/^\w*#/); + chomp; + ($sm_pkg,$sm_file,$sm_user,$sm_group)=split; + next if ($sm_file ne $file); + 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; + $group{$fm_file}=$sm_group; + if ( -x "/usr/sbin/suidunregister") { + @args = ("suidunregister", "$file"); + system(@args) == 0 || &quit("suidunregister failed"); } - close(SUIDCONF); + $dowrite=1; + last; } + close(SUIDCONF); } elsif ($mode eq "list") { my (@list,@ilist,$pattern,$file); -- 2.39.5