From c16789c315a96655c869943e3023262a466bedcc Mon Sep 17 00:00:00 2001 From: Wichert Akkerman Date: Thu, 11 Jan 2001 17:52:12 +0000 Subject: [PATCH] Fix chown/chmod ordering --- ChangeLog | 5 +++++ scripts/dpkg-statoverride.pl | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index d27dd188..94ed37fb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Thu Jan 11 09:35:00 PST 2001 Wichert Akkerman + + * scripts/dpkg-statoverride.pl: do chown before chmod so we don't + loose setuid bits + Mon Jan 8 15:46:13 PST 2001 Wichert Akkerman * scripts/dpkg-statoverride.{pl,8}: remove --import option now that diff --git a/scripts/dpkg-statoverride.pl b/scripts/dpkg-statoverride.pl index 68e4db68..58fd5148 100755 --- a/scripts/dpkg-statoverride.pl +++ b/scripts/dpkg-statoverride.pl @@ -114,10 +114,10 @@ if ($mode eq "add") { if ($doupdate) { if (not -f $file) { - print STDERR "waring: --update given but $file does not exist\n"; + print STDERR "warning: --update given but $file does not exist\n"; } else { - chmod (oct($mode),$file) || warn "failed to chmod $file: $!\n"; chown ($uid,$gid,$file) || warn "failed to chown $file: $!\n"; + chmod (oct($mode),$file) || warn "failed to chmod $file: $!\n"; } } } elsif ($mode eq "remove") { -- 2.39.5