fixed regression where df -l <device> as regular user cause Permission
denied (#520630, introduced by fix for rhbz #497830)
This commit is contained in:
parent
79c2ad7ebe
commit
2c2fd97500
17
coreutils-7.5-df-localdevice.patch
Normal file
17
coreutils-7.5-df-localdevice.patch
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
diff -urNp coreutils-7.5-orig/src/df.c coreutils-7.5/src/df.c
|
||||||
|
--- coreutils-7.5-orig/src/df.c 2009-08-15 17:25:32.000000000 +0200
|
||||||
|
+++ coreutils-7.5/src/df.c 2009-09-03 16:37:25.000000000 +0200
|
||||||
|
@@ -995,7 +995,12 @@ main (int argc, char **argv)
|
||||||
|
for (i = optind; i < argc; ++i)
|
||||||
|
{
|
||||||
|
int fd = open (argv[i], O_RDONLY | O_NOCTTY);
|
||||||
|
- if (fd < 0 || fstat (fd, &stats[i - optind]))
|
||||||
|
+ if (0 <= fd && !fstat (fd, &stats[i - optind])
|
||||||
|
+ && !stat (argv[i], &stats[i - optind]))
|
||||||
|
+ {
|
||||||
|
+ /* open() may have failed for normal user but stat() works */
|
||||||
|
+ }
|
||||||
|
+ else
|
||||||
|
{
|
||||||
|
error (0, errno, "%s", quote (argv[i]));
|
||||||
|
exit_status = EXIT_FAILURE;
|
@ -1,7 +1,7 @@
|
|||||||
Summary: A set of basic GNU tools commonly used in shell scripts
|
Summary: A set of basic GNU tools commonly used in shell scripts
|
||||||
Name: coreutils
|
Name: coreutils
|
||||||
Version: 7.5
|
Version: 7.5
|
||||||
Release: 3%{?dist}
|
Release: 4%{?dist}
|
||||||
License: GPLv3+
|
License: GPLv3+
|
||||||
Group: System Environment/Base
|
Group: System Environment/Base
|
||||||
Url: http://www.gnu.org/software/coreutils/
|
Url: http://www.gnu.org/software/coreutils/
|
||||||
@ -25,6 +25,7 @@ Patch2: coreutils-7.5-ls-inode.patch
|
|||||||
Patch100: coreutils-6.10-configuration.patch
|
Patch100: coreutils-6.10-configuration.patch
|
||||||
Patch101: coreutils-6.10-manpages.patch
|
Patch101: coreutils-6.10-manpages.patch
|
||||||
Patch102: coreutils-7.4-sttytcsadrain.patch
|
Patch102: coreutils-7.4-sttytcsadrain.patch
|
||||||
|
Patch103: coreutils-7.5-df-localdevice.patch
|
||||||
|
|
||||||
# sh-utils
|
# sh-utils
|
||||||
Patch703: sh-utils-2.0.11-dateman.patch
|
Patch703: sh-utils-2.0.11-dateman.patch
|
||||||
@ -116,6 +117,7 @@ Libraries for coreutils package.
|
|||||||
%patch100 -p1 -b .configure
|
%patch100 -p1 -b .configure
|
||||||
%patch101 -p1 -b .manpages
|
%patch101 -p1 -b .manpages
|
||||||
%patch102 -p1 -b .tcsadrain
|
%patch102 -p1 -b .tcsadrain
|
||||||
|
%patch103 -p1 -b .localdevice
|
||||||
|
|
||||||
# sh-utils
|
# sh-utils
|
||||||
%patch703 -p1 -b .dateman
|
%patch703 -p1 -b .dateman
|
||||||
@ -331,6 +333,11 @@ fi
|
|||||||
%{_libdir}/coreutils
|
%{_libdir}/coreutils
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Sep 03 2009 Ondrej Vasik <ovasik@redhat.com> - 7.5-4
|
||||||
|
- fixed regression where df -l <device> as regular user
|
||||||
|
cause "Permission denied" (#520630, introduced by fix for
|
||||||
|
rhbz #497830)
|
||||||
|
|
||||||
* Fri Aug 28 2009 Ondrej Vasik <ovasik@redhat.com> - 7.5-3
|
* Fri Aug 28 2009 Ondrej Vasik <ovasik@redhat.com> - 7.5-3
|
||||||
- ls -i: print consistent inode numbers also for mount points
|
- ls -i: print consistent inode numbers also for mount points
|
||||||
(#453709)
|
(#453709)
|
||||||
|
Loading…
Reference in New Issue
Block a user