<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src-test2/lib/libc/stdlib/realpath.c, branch release/11.2.0</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src-test2/atom?h=release%2F11.2.0</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src-test2/atom?h=release%2F11.2.0'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/'/>
<updated>2018-03-29T02:50:57Z</updated>
<entry>
<title>Revert r330897:</title>
<updated>2018-03-29T02:50:57Z</updated>
<author>
<name>Eitan Adler</name>
<email>eadler@FreeBSD.org</email>
</author>
<published>2018-03-29T02:50:57Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=4ab2e064d7950be84256d671a7ae93f87cc6aa36'/>
<id>urn:sha1:4ab2e064d7950be84256d671a7ae93f87cc6aa36</id>
<content type='text'>
This was intended to be a non-functional change. It wasn't. The commit
message was thus wrong. In addition it broke arm, and merged crypto
related code.

Revert with prejudice.

This revert skips files touched in r316370 since that commit was since
MFCed. This revert also skips files that require $FreeBSD$ property
changes.

Thank you to those who helped me get out of this mess including but not
limited to gonzo, kevans, rgrimes.

Requested by: gjb (re)
</content>
</entry>
<entry>
<title>Partial merge of the SPDX changes</title>
<updated>2018-03-14T03:19:51Z</updated>
<author>
<name>Eitan Adler</name>
<email>eadler@FreeBSD.org</email>
</author>
<published>2018-03-14T03:19:51Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=be5d0b9566b13fdf8cabebb63334cbec12bfc409'/>
<id>urn:sha1:be5d0b9566b13fdf8cabebb63334cbec12bfc409</id>
<content type='text'>
These changes are incomplete but are making it difficult
to determine what other changes can/should be merged.

No objections from:	pfg
</content>
</entry>
<entry>
<title>MFC r318303:</title>
<updated>2017-05-29T12:55:26Z</updated>
<author>
<name>Konstantin Belousov</name>
<email>kib@FreeBSD.org</email>
</author>
<published>2017-05-29T12:55:26Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=20810595e1756b873297453877ce8dad0b3e8dd8'/>
<id>urn:sha1:20810595e1756b873297453877ce8dad0b3e8dd8</id>
<content type='text'>
Style.
</content>
</entry>
<entry>
<title>MFC r318299:</title>
<updated>2017-05-29T12:53:44Z</updated>
<author>
<name>Konstantin Belousov</name>
<email>kib@FreeBSD.org</email>
</author>
<published>2017-05-29T12:53:44Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=da0461f1d737feca1fa0f76be44f9c0c67e21482'/>
<id>urn:sha1:da0461f1d737feca1fa0f76be44f9c0c67e21482</id>
<content type='text'>
Simplify cleanup on failure in realpath(3).
</content>
</entry>
<entry>
<title>MFC r318298:</title>
<updated>2017-05-29T12:52:13Z</updated>
<author>
<name>Konstantin Belousov</name>
<email>kib@FreeBSD.org</email>
</author>
<published>2017-05-29T12:52:13Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=de06d29d66660aac247874343ceb52c3f58f7cc0'/>
<id>urn:sha1:de06d29d66660aac247874343ceb52c3f58f7cc0</id>
<content type='text'>
Fix several buffer overflows in realpath(3), and other minor issues.

PR:	219154
</content>
</entry>
<entry>
<title>realpath(): Properly fail "." or ".." components after non-directories.</title>
<updated>2014-04-13T19:48:28Z</updated>
<author>
<name>Jilles Tjoelker</name>
<email>jilles@FreeBSD.org</email>
</author>
<published>2014-04-13T19:48:28Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=310c8f3c99499326d1053ce811348bf2e35e09af'/>
<id>urn:sha1:310c8f3c99499326d1053ce811348bf2e35e09af</id>
<content type='text'>
If realpath() is called on pathnames like "/dev/null/." or "/dev/null/..",
it should fail with [ENOTDIR]. Pathnames like "/dev/null/" already failed as
they should.

Also, put the check for non-directories after lstatting the previous
component instead of when the empty component (consecutive or trailing
slashes) is detected, saving an lstat() call and some lines of code.

PR:		kern/82980
MFC after:	2 weeks
</content>
</entry>
<entry>
<title>- Correct mispellings of the word occurrence</title>
<updated>2013-04-17T11:40:10Z</updated>
<author>
<name>Gabor Kovesdan</name>
<email>gabor@FreeBSD.org</email>
</author>
<published>2013-04-17T11:40:10Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=ab3f6b347ef97e755cf291ed77f9eb4a48531d15'/>
<id>urn:sha1:ab3f6b347ef97e755cf291ed77f9eb4a48531d15</id>
<content type='text'>
Submitted by:	Christoph Mallon &lt;christoph.mallon@gmx.de&gt; (via private mail)
</content>
</entry>
<entry>
<title>Avoid mapping ENOENT to ENOTDIR for non-existent path components.</title>
<updated>2012-09-12T17:05:39Z</updated>
<author>
<name>Ed Maste</name>
<email>emaste@FreeBSD.org</email>
</author>
<published>2012-09-12T17:05:39Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=7877ed7ce33ed9b977ac9b521f9a2f95b5d589bd'/>
<id>urn:sha1:7877ed7ce33ed9b977ac9b521f9a2f95b5d589bd</id>
<content type='text'>
The ENOTDIR mapping was introduced in r235266 for kern/128933 based on
an interpretation of the somewhat ambiguous language in the POSIX realpath
specification.  The interpretation is inconsistent with Solaris and Linux,
a regression from 9.0, and does not appear to be permitted by the
description of ENOTDIR:

     20 ENOTDIR Not a directory.  A component of the specified pathname
             existed, but it was not a directory, when a directory was
             expected.

PR:		standards/171577
MFC after:	3 days
</content>
</entry>
<entry>
<title>1) Although unpublished version of standard</title>
<updated>2012-06-05T16:16:33Z</updated>
<author>
<name>Andrey A. Chernov</name>
<email>ache@FreeBSD.org</email>
</author>
<published>2012-06-05T16:16:33Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=5f5a50728c89942f4c223cc8856ae1f978549240'/>
<id>urn:sha1:5f5a50728c89942f4c223cc8856ae1f978549240</id>
<content type='text'>
http://austingroupbugs.net/view.php?id=385#c713
(Resolved state) recommend this way for the current standard (called
"earlier" in the text)

"However, earlier versions of this standard did not require this, and the
same example had to be written as:

    // buf was obtained by malloc(buflen)
    ret = write(fd, buf, buflen);
    if (ret &lt; 0) {
        int save = errno;
        free(buf);
        errno = save;
        return ret;
    }
"

from feedback I have for previous commit it seems that many people prefer
to avoid mass code change needed for current standard compliance
and prefer to track unpublished standard instead, which requires now
that free() itself must save errno, not its usage code.

So, I back out "save errno across free()" part of previous commit,
and will fill PR for changing free() isntead.

2) Remove now unused serrno.

MFC after:      1 week
</content>
</entry>
<entry>
<title>1) IEEE Std 1003.1-2008, "errno" section, is explicit that</title>
<updated>2012-06-04T21:34:49Z</updated>
<author>
<name>Andrey A. Chernov</name>
<email>ache@FreeBSD.org</email>
</author>
<published>2012-06-04T21:34:49Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=96700463ec225e5f1d8bf058fd26f4160e4b7ed6'/>
<id>urn:sha1:96700463ec225e5f1d8bf058fd26f4160e4b7ed6</id>
<content type='text'>
"The setting of errno after a successful call to a function is
unspecified unless the description of that function specifies that
errno shall not be modified."

However, free() in IEEE Std 1003.1-2008 does not mention its interaction
with errno, so MAY modify it after successful call
(it depends on particular free() implementation, OS-specific, etc.).

So, save errno across free() calls to make code portable and
POSIX-conformant.

2) Remove unused serrno assignment.

MFC after:      1 week
</content>
</entry>
</feed>
