GNU bug report logs - #34876
[bug-coreutils] ln 8.31 on Solaris 10 is partially broken

Previous Next

Package: coreutils;

Reported by: "Nelson H. F. Beebe" <beebe <at> math.utah.edu>

Date: Fri, 15 Mar 2019 23:44:01 UTC

Severity: normal

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 34876 in the body.
You can then email your comments to 34876 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-coreutils <at> gnu.org:
bug#34876; Package coreutils. (Fri, 15 Mar 2019 23:44:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Nelson H. F. Beebe" <beebe <at> math.utah.edu>:
New bug report received and forwarded. Copy sent to bug-coreutils <at> gnu.org. (Fri, 15 Mar 2019 23:44:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: "Nelson H. F. Beebe" <beebe <at> math.utah.edu>
To: bug-coreutils <at> gnu.org
Cc: bowman <at> math.utah.edu, beebe <at> math.utah.edu
Subject: [bug-coreutils] ln 8.31 on Solaris 10 is partially broken
Date: Fri, 15 Mar 2019 17:43:43 -0600
There appears to be a problem on Solaris 10 (and possibly related
Solaris family members) with ln in coreutils-8.31:

With the new ln:

> rm foo bar ; touch foo bar && ls -ld foo bar && ln -f foo bar
rm: cannot remove 'foo': No such file or directory
rm: cannot remove 'bar': No such file or directory
-rw-rw-r-- 1 bowman sysstaff 0 Mar 15 15:55 bar
-rw-rw-r-- 1 bowman sysstaff 0 Mar 15 15:55 foo
ln: failed to access 'bar/foo': Not a directory

The correct behavior should be:

> rm foo bar ; touch foo bar && ls -ld foo bar && ln -f foo bar ; ls -ld foo bar
rm: cannot remove 'foo': No such file or directory
rm: cannot remove 'bar': No such file or directory
-rw-rw-r-- 1 bowman sysstaff 0 Mar 15 15:57 bar
-rw-rw-r-- 1 bowman sysstaff 0 Mar 15 15:57 foo
-rw-rw-r-- 2 bowman sysstaff 0 Mar 15 15:57 bar
-rw-rw-r-- 2 bowman sysstaff 0 Mar 15 15:57 foo

The same problem may be responsible for this failure in today's
build of gawk-4.2.64:

	make[2]: Entering directory '/local/build/cc/gawk-4.2.64/awklib'
	rm -f pwcat.c
	ln -s ./eg/lib/pwcat.c .
	ln: failed to create symbolic link '.': Invalid argument

When I reset PATH to have /bin in front, the ln command succeeded.

-------------------------------------------------------------------------------
- Nelson H. F. Beebe                    Tel: +1 801 581 5254                  -
- University of Utah                    FAX: +1 801 581 4148                  -
- Department of Mathematics, 110 LCB    Internet e-mail: beebe <at> math.utah.edu  -
- 155 S 1400 E RM 233                       beebe <at> acm.org  beebe <at> computer.org -
- Salt Lake City, UT 84112-0090, USA    URL: http://www.math.utah.edu/~beebe/ -
-------------------------------------------------------------------------------




Reply sent to Paul Eggert <eggert <at> cs.ucla.edu>:
You have taken responsibility. (Sat, 16 Mar 2019 18:28:01 GMT) Full text and rfc822 format available.

Notification sent to "Nelson H. F. Beebe" <beebe <at> math.utah.edu>:
bug acknowledged by developer. (Sat, 16 Mar 2019 18:28:02 GMT) Full text and rfc822 format available.

Message #10 received at 34876-done <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: "Nelson H. F. Beebe" <beebe <at> math.utah.edu>, 34876-done <at> debbugs.gnu.org
Cc: bowman <at> math.utah.edu
Subject: Re: bug#34876: [bug-coreutils] ln 8.31 on Solaris 10 is partially
 broken
Date: Sat, 16 Mar 2019 11:27:10 -0700
[Message part 1 (text/plain, inline)]
Nelson H. F. Beebe wrote:

> touch foo bar && ls -ld foo bar && ln -f foo bar
> ...
> -rw-rw-r-- 1 bowman sysstaff 0 Mar 15 15:55 bar
> -rw-rw-r-- 1 bowman sysstaff 0 Mar 15 15:55 foo
> ln: failed to access 'bar/foo': Not a directory

Thanks for reporting that. It's a serious error on Solaris 10, or on any 
platform lacking support for the O_DIRECTORY flag standardized in POSIX.1-2008.

I installed the attached patch. We should probably generate a new coreutils 
release soon.

[0001-ln-port-to-platforms-lacking-O_DIRECTORY.patch (text/x-patch, attachment)]

Information forwarded to bug-coreutils <at> gnu.org:
bug#34876; Package coreutils. (Sat, 16 Mar 2019 21:09:01 GMT) Full text and rfc822 format available.

Message #13 received at 34876 <at> debbugs.gnu.org (full text, mbox):

From: Pádraig Brady <P <at> draigBrady.com>
To: 34876 <at> debbugs.gnu.org, eggert <at> cs.ucla.edu, beebe <at> math.utah.edu
Subject: Re: bug#34876: [bug-coreutils] ln 8.31 on Solaris 10 is partially
 broken
Date: Sat, 16 Mar 2019 14:08:37 -0700
On 16/03/19 11:27, Paul Eggert wrote:
> Nelson H. F. Beebe wrote:
> 
>> touch foo bar && ls -ld foo bar && ln -f foo bar
>> ...
>> -rw-rw-r-- 1 bowman sysstaff 0 Mar 15 15:55 bar
>> -rw-rw-r-- 1 bowman sysstaff 0 Mar 15 15:55 foo
>> ln: failed to access 'bar/foo': Not a directory
> 
> Thanks for reporting that. It's a serious error on Solaris 10, or on any 
> platform lacking support for the O_DIRECTORY flag standardized in POSIX.1-2008.
> 
> I installed the attached patch.

Looks good thanks.

> We should probably generate a new coreutils release soon.

Well not if just Solaris 10 is impacted I think.
Old FreeBSD may be affected, but I only see ln failures
on Solaris 10, from all the systems we tested on.
Anything Linux based had O_DIRECTORY since 1998.

thanks,
Pádraig




Information forwarded to bug-coreutils <at> gnu.org:
bug#34876; Package coreutils. (Sat, 16 Mar 2019 21:25:02 GMT) Full text and rfc822 format available.

Message #16 received at 34876 <at> debbugs.gnu.org (full text, mbox):

From: Pádraig Brady <P <at> draigBrady.com>
To: 34876 <at> debbugs.gnu.org, eggert <at> cs.ucla.edu, beebe <at> math.utah.edu
Subject: Re: bug#34876: [bug-coreutils] ln 8.31 on Solaris 10 is partially
 broken
Date: Sat, 16 Mar 2019 14:24:43 -0700
On 16/03/19 14:08, Pádraig Brady wrote:
> On 16/03/19 11:27, Paul Eggert wrote:
>> Nelson H. F. Beebe wrote:
>>
>>> touch foo bar && ls -ld foo bar && ln -f foo bar
>>> ...
>>> -rw-rw-r-- 1 bowman sysstaff 0 Mar 15 15:55 bar
>>> -rw-rw-r-- 1 bowman sysstaff 0 Mar 15 15:55 foo
>>> ln: failed to access 'bar/foo': Not a directory
>>
>> Thanks for reporting that. It's a serious error on Solaris 10, or on any 
>> platform lacking support for the O_DIRECTORY flag standardized in POSIX.1-2008.
>>
>> I installed the attached patch.
> 
> Looks good thanks.
> 
>> We should probably generate a new coreutils release soon.
> 
> Well not if just Solaris 10 is impacted I think.
> Old FreeBSD may be affected, but I only see ln failures

Very old FreeBSD https://github.com/freebsd/freebsd/commit/9ab7de87

> on Solaris 10, from all the systems we tested on.
> Anything Linux based had O_DIRECTORY since 1998.

I pushed a NEWS entry for the fix:
https://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commitdiff;h=v8.31-5-g4a21102

cheers,
Pádraig





bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 14 Apr 2019 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 5 years and 12 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.