From: Wichert Akkerman Date: Thu, 30 Nov 2000 02:30:23 +0000 (+0000) Subject: fix some stupid errors. silly perl syntax.. X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=15b26b3ddbb649fe97b2055b589e82de921ab96d;p=dpkg fix some stupid errors. silly perl syntax.. --- 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);