summaryrefslogtreecommitdiffstats
path: root/lib/libc
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2001-01-09 05:40:10 +0000
committerrwatson <rwatson@FreeBSD.org>2001-01-09 05:40:10 +0000
commit8b948144e8dbfd4a5d3033c61804c2e9d491b262 (patch)
tree28793ae0a4f19d023277b80f1248f48c7d26a8e6 /lib/libc
parent8beebd80cc82f51063b89a127d30662fa39c7f03 (diff)
downloadFreeBSD-src-8b948144e8dbfd4a5d3033c61804c2e9d491b262.zip
FreeBSD-src-8b948144e8dbfd4a5d3033c61804c2e9d491b262.tar.gz
o Add missing initialization of errno from error returns of
cap_get_fd(), cap_get_file() and cap_get_proc(). Submitted by: jedgar
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/posix1e/cap_get_fd.c1
-rw-r--r--lib/libc/posix1e/cap_get_file.c1
-rw-r--r--lib/libc/posix1e/cap_get_proc.c1
3 files changed, 3 insertions, 0 deletions
diff --git a/lib/libc/posix1e/cap_get_fd.c b/lib/libc/posix1e/cap_get_fd.c
index 242ee09..77c2099 100644
--- a/lib/libc/posix1e/cap_get_fd.c
+++ b/lib/libc/posix1e/cap_get_fd.c
@@ -47,6 +47,7 @@ cap_get_fd(int fd)
error = __cap_get_fd(fd, cap);
if (error) {
+ errno = erro;
cap_free(cap);
return (NULL);
}
diff --git a/lib/libc/posix1e/cap_get_file.c b/lib/libc/posix1e/cap_get_file.c
index c4deb6d..a74bc41 100644
--- a/lib/libc/posix1e/cap_get_file.c
+++ b/lib/libc/posix1e/cap_get_file.c
@@ -47,6 +47,7 @@ cap_get_file(const char *path_p)
error = __cap_get_file(path_p, cap);
if (error) {
+ errno = error;
cap_free(cap);
return (NULL);
}
diff --git a/lib/libc/posix1e/cap_get_proc.c b/lib/libc/posix1e/cap_get_proc.c
index e5d0782..d2bf96b 100644
--- a/lib/libc/posix1e/cap_get_proc.c
+++ b/lib/libc/posix1e/cap_get_proc.c
@@ -47,6 +47,7 @@ cap_get_proc(void)
error = __cap_get_proc(cap);
if (error) {
+ errno = error;
cap_free(cap);
return (NULL);
}
OpenPOWER on IntegriCloud