GNU bug report logs -
#30253
solaris: cp(1) check failures on tmpfs filesystem (Solaris 10 / Solaris 11)
Previous Next
To reply to this bug, email your comments to 30253 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-coreutils <at> gnu.org
:
bug#30253
; Package
coreutils
.
(Thu, 25 Jan 2018 22:35:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Alexander Pyhalov <alp <at> rsu.ru>
:
New bug report received and forwarded. Copy sent to
bug-coreutils <at> gnu.org
.
(Thu, 25 Jan 2018 22:35:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hello.
I have a fix for 'bug 21062 coreutils-8.24 - cp(1) check failures on
tmpfs filesystem (Solaris 10 / Solaris 11)'.
The issue is that when on tmpfs we use acl(), trying to set ACL, it sets
errno to ENOSYS (ACLs not supported).
set_acls still returns 0, but it spoils errno. When we do "cp -a", later
this ENOSYS appears in set_acls() results.
(I still don't quite understand, why return code is not 0).
The easiest fix here is to resetting errno to 0 when we are not going to
return non-zero result immediately
https://github.com/OpenIndiana/oi-userland/blob/oi/hipster/components/sysutils/coreutils/patches/set-permission.c.patch
--
System Administrator of Southern Federal University Computer Center
[set-permission.c.patch (text/x-diff, attachment)]
Information forwarded
to
bug-coreutils <at> gnu.org
:
bug#30253
; Package
coreutils
.
(Sun, 28 Jan 2018 01:00:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 30253 <at> debbugs.gnu.org (full text, mbox):
forcemerge 21062 30253
stop
On 25/01/18 14:34, Alexander Pyhalov wrote:
> Hello.
>
> I have a fix for 'bug 21062 coreutils-8.24 - cp(1) check failures on
> tmpfs filesystem (Solaris 10 / Solaris 11)'.
>
> The issue is that when on tmpfs we use acl(), trying to set ACL, it sets
> errno to ENOSYS (ACLs not supported).
> set_acls still returns 0, but it spoils errno. When we do "cp -a", later
> this ENOSYS appears in set_acls() results.
> (I still don't quite understand, why return code is not 0).
> The easiest fix here is to resetting errno to 0 when we are not going to
> return non-zero result immediately
>
> https://github.com/OpenIndiana/oi-userland/blob/oi/hipster/components/sysutils/coreutils/patches/set-permission.c.patch
Thanks a lot for looking at this.
I also partially analyzed the issue at:
https://lists.gnu.org/archive/html/coreutils/2016-11/msg00095.html
with Andreas' response at:
https://lists.gnu.org/archive/html/coreutils/2016-12/msg00002.html
Your fix suggests there is an issue in the ret and errno handling.
This code is very hard to analyze without stepping through
and looking at the state.
On the face of it, setting errno=0 when returning 0 seems correct,
though looking at the code suggests that errno is never inspected unless ret!=0,
hence this might be masking a case where there is actually a failure and
some other error code is not being set. Your resetting of errno to 0
may just be masking this failure to set an errno?
cheers,
Pádraig.
Forcibly Merged 21062 30253.
Request was from
Pádraig Brady <P <at> draigBrady.com>
to
control <at> debbugs.gnu.org
.
(Sun, 28 Jan 2018 01:00:03 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-coreutils <at> gnu.org
:
bug#30253
; Package
coreutils
.
(Sun, 28 Jan 2018 01:52:02 GMT)
Full text and
rfc822 format available.
Message #13 received at 30253 <at> debbugs.gnu.org (full text, mbox):
Pádraig Brady wrote:
> On the face of it, setting errno=0 when returning 0 seems correct,
I would say just the opposite. Typically, functions that return 0 on success and
-1 (setting errno) on failure, are allowed to set errno to whatever they like on
success. So it should not fix any bugs to set errno to 0 here. My guess is that
the bugs are in the callers, not here in the callees.
Changed bug title to 'solaris: cp(1) check failures on tmpfs filesystem (Solaris 10 / Solaris 11)' from 'Fix for bug 21062 coreutils-8.24 - cp(1) check failures on tmpfs filesystem (Solaris 10 / Solaris 11)'
Request was from
Assaf Gordon <assafgordon <at> gmail.com>
to
control <at> debbugs.gnu.org
.
(Thu, 25 Oct 2018 15:17:01 GMT)
Full text and
rfc822 format available.
This bug report was last modified 6 years and 241 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.