GNU bug report logs -
#13447
ln "" foo gives misleading error message
Previous Next
Reported by: Ken Irving <ken.irving <at> alaska.edu>
Date: Tue, 15 Jan 2013 08:32:01 UTC
Severity: normal
Tags: notabug
Done: Bob Proulx <bob <at> proulx.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
On 01/15/2013 10:44 AM, Bob Proulx wrote:
> Jim Meyering wrote:
>> Pádraig Brady wrote:
>>> Interestingly I notice that solaris for example allows a NULL old_path.
>>
>> That Solaris behavior is contrary to POSIX 2008
>> http://pubs.opengroup.org/onlinepubs/9699919799/functions/symlink.html
>
> Where does it say this? I read it through in detail but I didn't see
> that it required a diagnostic to be emitted in the case that value is
> am empty string. What did I miss?
Right, the only 3 statements about path1 are:
* The string pointed to by path1 shall be treated only as a
character string and shall not be validated as a pathname.
* [ENAMETOOLONG]
[...] or the length of the path1 argument is longer than {SYMLINK_MAX}.
* [...] in fact, the file named by the path1 argument need not exist
when the link is created.
I'd read this as:
a) there can be any character in the string but a NULL (obviously).
b) the maximum length is limited to SYMLINK_MAX.
Nothing more.
BUT:
Some CU tools already catch zero-length file names (du and wc),
and a comment in the code states that FTS has problems with it
[src/du.c:1043]:
/* Report and skip any empty file names before invoking fts.
This works around a glitch in fts, which fails immediately
(without looking at the other file names) when given an empty
file name. */
Have a nice day,
Berny
This bug report was last modified 12 years and 188 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.