guenther
4c8fdca0ed
Don't call lstat() before readlink() just to see if it's a symlink,
as readlink() will tell you that more cheaply.
ok millert@
8 years ago
millert
c5fe488aad
In rev 1.15 the sizeof argument was fixed in a strlcat() call but
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@
9 years ago
deraadt
75d428b273
Move to the <limits.h> universe.
review by millert, binary checking process with doug, concept with guenther
10 years ago
doug
ec337d0aa3
Revert last commit due to changed semantics found by make release.
10 years ago
doug
c4cfced731
Better POSIX compliance in realpath(3).
millert@ made changes to realpath.c based on FreeBSD's version. I merged
Todd's changes into dl_realpath.c.
ok millert@, guenther@
10 years ago
kurt
179c63bba1
- Add comments regarding copies of these files also in libexec/ld.so
okay guenther@
12 years ago
deraadt
9dace0b0af
specify the bounds of the dst to strlcat (both values were static and
equal, but it is more correct)
from Michal Mazurek
12 years ago
miod
3f8c480969
Recent Single Unix will malloc memory if the second argument of realpath()
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.
13 years ago
espie
b4fb9e2f94
zap remaining rcsid.
Kill old files that are no longer compiled.
okay theo
19 years ago
brad
3d190e977a
Make realpath() thread-safe. New implementation does not use chdir(2) at all.
From: FreeBSD by Constantin S. Svintsoff <kostik (at) iclub.nsu.ru>
ok otto@ millert@
20 years ago
millert
11a52be207
Check strlc{py,at} return value and return NULL upon truncation instead
of silently truncating. OK deraadt@ otto@
20 years ago
millert
354e03d14f
Rename rootd to needslash and invert its value. This fixes the check
for ENAMETOOLONG, though since we use strlcpy() and strlcat() this
is not a big deal. Problem found by vincent@
22 years ago
millert
679cd5d050
Remove the advertising clause in the UCB license which Berkeley
rescinded 22 July 1999. Proofed by myself and Theo.
22 years ago
hin
e8060b1c19
strcat -> strlcat
ok deraadt@ tedu@ tdeval@
22 years ago
deraadt
7c4d34d5bc
try to use strlcpy and snprintf more; ok various
23 years ago
millert
b6c954318e
If the user passes in "" as the string to resolve the lstat() will
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.
23 years ago
lebel
60ef74bf70
use strlcpy vs strncpy+a[len-1]='\0'. millert@ ok.
24 years ago
deraadt
c8784aa4f8
readlink(path, buf, sizeof buf-1). Never forget that -1.
27 years ago
deraadt
ca5679152b
add ELOOP support; shigio@wafu.netgate.net
28 years ago
tholo
fcedf08ffa
Fix RCS ids
Make sure everything uses {SYS,}LIBC_SCCS properly
29 years ago
deraadt
47b73ff83c
initial import of NetBSD tree
29 years ago