diff options
author | ngie <ngie@FreeBSD.org> | 2015-12-14 00:12:53 +0000 |
---|---|---|
committer | ngie <ngie@FreeBSD.org> | 2015-12-14 00:12:53 +0000 |
commit | 17ca717571c27f52897c406a71864f864ca65710 (patch) | |
tree | c78986272e2ab4a955534ea9353928c9ce25caa3 /lib/libc | |
parent | c85e616e29482200cd0a47fa6c85165a98a4caaf (diff) | |
parent | a3c1f4b0eb9f220318c79476b1fcf38beadf35da (diff) | |
download | FreeBSD-src-17ca717571c27f52897c406a71864f864ca65710.zip FreeBSD-src-17ca717571c27f52897c406a71864f864ca65710.tar.gz |
MFhead @ r292177
Diffstat (limited to 'lib/libc')
-rw-r--r-- | lib/libc/gen/exec.3 | 4 | ||||
-rw-r--r-- | lib/libc/net/getaddrinfo.c | 5 | ||||
-rw-r--r-- | lib/libc/regex/grot/Makefile | 2 | ||||
-rw-r--r-- | lib/libc/riscv/Makefile.inc | 1 |
4 files changed, 7 insertions, 5 deletions
diff --git a/lib/libc/gen/exec.3 b/lib/libc/gen/exec.3 index daeccd1..c9d32b4 100644 --- a/lib/libc/gen/exec.3 +++ b/lib/libc/gen/exec.3 @@ -28,7 +28,7 @@ .\" @(#)exec.3 8.3 (Berkeley) 1/24/94 .\" $FreeBSD$ .\" -.Dd January 24, 1994 +.Dd December 12, 2015 .Dt EXEC 3 .Os .Sh NAME @@ -223,7 +223,7 @@ and .Fn execvp functions was .Dq Pa :/bin:/usr/bin . -This was changed to place the current directory last to enhance system +This was changed to remove the current directory to enhance system security. .Pp The behavior of diff --git a/lib/libc/net/getaddrinfo.c b/lib/libc/net/getaddrinfo.c index 95c588b..ab6b65f 100644 --- a/lib/libc/net/getaddrinfo.c +++ b/lib/libc/net/getaddrinfo.c @@ -1563,7 +1563,7 @@ addrconfig(struct addrinfo *pai) if (seen_inet) continue; sin = (struct sockaddr_in *)(ifa->ifa_addr); - if (IN_LOOPBACK(htonl(sin->sin_addr.s_addr))) + if (htonl(sin->sin_addr.s_addr) == INADDR_LOOPBACK) continue; seen_inet = 1; break; @@ -2208,6 +2208,8 @@ _dns_getaddrinfo(void *rv, void *cb_data, va_list ap) memset(&sentinel, 0, sizeof(sentinel)); cur = &sentinel; + res = __res_state(); + buf = malloc(sizeof(*buf)); if (!buf) { RES_SET_H_ERRNO(res, NETDB_INTERNAL); @@ -2254,7 +2256,6 @@ _dns_getaddrinfo(void *rv, void *cb_data, va_list ap) return NS_UNAVAIL; } - res = __res_state(); if ((res->options & RES_INIT) == 0 && res_ninit(res) == -1) { RES_SET_H_ERRNO(res, NETDB_INTERNAL); free(buf); diff --git a/lib/libc/regex/grot/Makefile b/lib/libc/regex/grot/Makefile index e715dd8..056b55e 100644 --- a/lib/libc/regex/grot/Makefile +++ b/lib/libc/regex/grot/Makefile @@ -8,7 +8,7 @@ PATHS= ${.CURDIR}/.. ${.CURDIR}/../../locale ${.CURDIR}/../../../../include .PATH: ${PATHS} -CFLAGS+= -DPOSIX_MISTAKE -DREDEBUG $(REGCFLAGS) +CFLAGS+= -static -DPOSIX_MISTAKE -DREDEBUG $(REGCFLAGS) .for incpath in ${PATHS} CFLAGS+= -I${incpath} .endfor diff --git a/lib/libc/riscv/Makefile.inc b/lib/libc/riscv/Makefile.inc new file mode 100644 index 0000000..e8c0da7 --- /dev/null +++ b/lib/libc/riscv/Makefile.inc @@ -0,0 +1 @@ +# $FreeBSD$ |