mirror of
https://github.com/Project-OSS-Revival/alien.git
synced 2026-04-24 14:00:17 +00:00
In rpm permission fixup code, avoid processing symlinks since that would result in the file the link points to being "fixed". Closes: #535586
This commit is contained in:
@@ -239,6 +239,9 @@ sub unpack {
|
|||||||
while (<GETPERMS>) {
|
while (<GETPERMS>) {
|
||||||
chomp;
|
chomp;
|
||||||
my ($mode, $owner, $group, $file) = split(/ /, $_, 4);
|
my ($mode, $owner, $group, $file) = split(/ /, $_, 4);
|
||||||
|
|
||||||
|
next if -l "$workdir/$file";
|
||||||
|
|
||||||
$mode = $mode & 07777; # remove filetype
|
$mode = $mode & 07777; # remove filetype
|
||||||
my $uid = getpwnam($owner);
|
my $uid = getpwnam($owner);
|
||||||
if (! defined $uid || $uid != 0) {
|
if (! defined $uid || $uid != 0) {
|
||||||
@@ -258,12 +261,10 @@ sub unpack {
|
|||||||
if (defined($owninfo{$file}) && ($mode & 07000 > 0)) {
|
if (defined($owninfo{$file}) && ($mode & 07000 > 0)) {
|
||||||
$modeinfo{$file} = sprintf "%lo", $mode;
|
$modeinfo{$file} = sprintf "%lo", $mode;
|
||||||
}
|
}
|
||||||
next unless -e "$workdir/$file"; # skip broken links
|
|
||||||
if ($> == 0) {
|
if ($> == 0) {
|
||||||
$this->do("chown", "$uid:$gid", "$workdir/$file")
|
$this->do("chown", "$uid:$gid", "$workdir/$file")
|
||||||
|| die "failed chowning $file to $uid\:$gid\: $!";
|
|| die "failed chowning $file to $uid\:$gid\: $!";
|
||||||
}
|
}
|
||||||
next if -l "$workdir/$file"; # skip links
|
|
||||||
$this->do("chmod", sprintf("%lo", $mode), "$workdir/$file")
|
$this->do("chmod", sprintf("%lo", $mode), "$workdir/$file")
|
||||||
|| die "failed changing mode of $file to $mode\: $!";
|
|| die "failed changing mode of $file to $mode\: $!";
|
||||||
}
|
}
|
||||||
|
|||||||
2
debian/changelog
vendored
2
debian/changelog
vendored
@@ -1,6 +1,8 @@
|
|||||||
alien (8.77) UNRELEASED; urgency=low
|
alien (8.77) UNRELEASED; urgency=low
|
||||||
|
|
||||||
* Don't allow whitespace in package version when parsing debian/changelog.
|
* Don't allow whitespace in package version when parsing debian/changelog.
|
||||||
|
* In rpm permission fixup code, avoid processing symlinks since that
|
||||||
|
would result in the file the link points to being "fixed". Closes: #535586
|
||||||
|
|
||||||
-- Joey Hess <joeyh@debian.org> Wed, 17 Jun 2009 13:06:53 -0400
|
-- Joey Hess <joeyh@debian.org> Wed, 17 Jun 2009 13:06:53 -0400
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user