summaryrefslogtreecommitdiff
path: root/src/lib/libc/stdlib/realpath.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* The last consumer of pre-posix realpath behaviour has stoppedderaadt2019-07-051-34/+3
| | | | | | | | requiring it (sftp-server). Remove the /exists///// behaviour from here. The /nonexistant behaviour remains in the kernel and needs to be shot next. There may be ports fallout, but we doubt it. ok beck djm
* Remove old realpath(3), and the userland-vs-kernel realpath verificationderaadt2019-06-171-334/+44
| | | | | | | | code. We now user the simple userland wrapper on top of __realpath(2). The non-POSIX behaviour still remains, that is the next component to fix. From a diff by beck, but I managed to chainsaw it a bit further. Tested in snaps for a couple of days. ok beck
* __realpath(2) appears to have improved, so re-enable the code thatderaadt2019-05-301-3/+136
| | | | | checks userland-parsing vs kernel parsing, we are hoping to spot another bug..
* There are some bugs in __realpath(2) -- it isn't quite ready so disablederaadt2019-05-291-136/+3
| | | | calling it until those are fixed.
* Enable the use of the kernel __realpath() system call in the libc wrapper.beck2019-05-281-3/+136
| | | | | | | | For now, this also still uses the existing realpath implmentation and emits a syslog if we see differening results. Once we have run with that for a little while we will remove the old code ok deraadt@
* Fix one possible buffer overflow and one underflow. Also some minormillert2017-12-241-20/+36
| | | | cleanups. From Jan Kokemueller. OK deraadt@
* Don't call lstat() before readlink() just to see if it's a symlink,guenther2016-08-281-14/+17
| | | | | | as readlink() will tell you that more cheaply. ok millert@
* In rev 1.15 the sizeof argument was fixed in a strlcat() call butmillert2015-10-131-2/+2
| | | | | | the truncation check immediately following it was not updated to match. Not an issue in practice since the buffers are the same size. OK deraadt@
* Move to the <limits.h> universe.deraadt2015-01-161-3/+3
| | | | review by millert, binary checking process with doug, concept with guenther
* Revert last commit due to changed semantics found by make release.doug2014-10-191-10/+10
|
* Better POSIX compliance in realpath(3).doug2014-10-181-10/+10
| | | | | | | millert@ made changes to realpath.c based on FreeBSD's version. I merged Todd's changes into dl_realpath.c. ok millert@, guenther@
* - Add comments regarding copies of these files also in libexec/ld.sokurt2013-04-051-1/+3
| | | | okay guenther@
* specify the bounds of the dst to strlcat (both values were static andderaadt2012-09-131-2/+2
| | | | | equal, but it is more correct) from Michal Mazurek
* Recent Single Unix will malloc memory if the second argument of realpath()miod2011-07-241-13/+35
| | | | | | is NULL, and third-party software is starting to rely upon this. Adapted from FreeBSD via Jona Joachim (jaj ; hcl-club , .lu), with minor tweaks from nicm@ and yours truly.
* zap remaining rcsid.espie2005-08-081-9/+1
| | | | | | Kill old files that are no longer compiled. okay theo
* Make realpath() thread-safe. New implementation does not use chdir(2) at all.brad2005-03-291-112/+135
| | | | | | From: FreeBSD by Constantin S. Svintsoff <kostik (at) iclub.nsu.ru> ok otto@ millert@
* Check strlc{py,at} return value and return NULL upon truncation insteadmillert2004-11-301-10/+23
| | | | of silently truncating. OK deraadt@ otto@
* Rename rootd to needslash and invert its value. This fixes the checkmillert2003-08-011-6/+6
| | | | | for ENAMETOOLONG, though since we use strlcpy() and strlcat() this is not a big deal. Problem found by vincent@
* Remove the advertising clause in the UCB license which Berkeleymillert2003-06-021-6/+2
| | | | rescinded 22 July 1999. Proofed by myself and Theo.
* strcat -> strlcathin2003-04-041-3/+3
| | | | ok deraadt@ tedu@ tdeval@
* try to use strlcpy and snprintf more; ok variousderaadt2002-05-241-3/+3
|
* If the user passes in "" as the string to resolve the lstat() willmillert2002-01-121-2/+6
| | | | | | fail anyway so check for that. Also convert "." to "" since that way we avoid the lstat() (which we don't need) and the subsequent chdir() and some dir checks.
* use strlcpy vs strncpy+a[len-1]='\0'. millert@ ok.lebel2001-06-271-3/+2
|
* readlink(path, buf, sizeof buf-1). Never forget that -1.deraadt1998-05-181-2/+2
|
* add ELOOP support; shigio@wafu.netgate.netderaadt1997-06-201-1/+6
|
* Fix RCS idstholo1996-08-191-2/+1
| | | | Make sure everything uses {SYS,}LIBC_SCCS properly
* initial import of NetBSD treederaadt1995-10-181-0/+159