]> err.no Git - dpkg/commitdiff
fix some stupid errors. silly perl syntax..
authorWichert Akkerman <wakkerma@debian.org>
Thu, 30 Nov 2000 02:30:23 +0000 (02:30 +0000)
committerWichert Akkerman <wakkerma@debian.org>
Thu, 30 Nov 2000 02:30:23 +0000 (02:30 +0000)
scripts/dpkg-statoverride.pl

index 0d49fbe387da9e4b11ef0542c15ab5143075dedf..90b4267d32520afc00593cf865ec4ddae385e3ef 100755 (executable)
@@ -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 (<SUIDCONF>) {
-                       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 (<SUIDCONF>) {
+               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);