diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libc/gen/elf_utils.c | 11 | ||||
-rw-r--r-- | lib/libc/include/libc_private.h | 2 | ||||
-rw-r--r-- | lib/libc/net/Makefile.inc | 9 | ||||
-rw-r--r-- | lib/libc/sys/interposing_table.c | 1 | ||||
-rw-r--r-- | lib/libpam/modules/pam_ssh/Makefile | 5 | ||||
-rw-r--r-- | lib/libpam/modules/pam_ssh/pam_ssh.c | 5 | ||||
-rw-r--r-- | lib/libthr/pthread.map | 2 | ||||
-rw-r--r-- | lib/libthr/thread/thr_private.h | 2 | ||||
-rw-r--r-- | lib/libthr/thread/thr_stack.c | 3 | ||||
-rw-r--r-- | lib/libthr/thread/thr_syscalls.c | 1 |
10 files changed, 24 insertions, 17 deletions
diff --git a/lib/libc/gen/elf_utils.c b/lib/libc/gen/elf_utils.c index 7bd7511..3d8c593 100644 --- a/lib/libc/gen/elf_utils.c +++ b/lib/libc/gen/elf_utils.c @@ -32,6 +32,7 @@ #include <sys/sysctl.h> #include <link.h> #include <stddef.h> +#include "libc_private.h" int __elf_phdr_match_addr(struct dl_phdr_info *phdr_info, void *addr) @@ -51,9 +52,8 @@ __elf_phdr_match_addr(struct dl_phdr_info *phdr_info, void *addr) return (i != phdr_info->dlpi_phnum); } -#pragma weak __pthread_map_stacks_exec void -__pthread_map_stacks_exec(void) +__libc_map_stacks_exec(void) { int mib[2]; struct rlimit rlim; @@ -72,3 +72,10 @@ __pthread_map_stacks_exec(void) rlim.rlim_cur, _rtld_get_stack_prot()); } +#pragma weak __pthread_map_stacks_exec +void +__pthread_map_stacks_exec(void) +{ + + ((void (*)(void))__libc_interposing[INTERPOS_map_stacks_exec])(); +} diff --git a/lib/libc/include/libc_private.h b/lib/libc/include/libc_private.h index bf3ff28..6e2ff66 100644 --- a/lib/libc/include/libc_private.h +++ b/lib/libc/include/libc_private.h @@ -224,6 +224,7 @@ enum { INTERPOS_kevent, INTERPOS_wait6, INTERPOS_ppoll, + INTERPOS_map_stacks_exec, INTERPOS_MAX }; @@ -390,6 +391,7 @@ int _elf_aux_info(int aux, void *buf, int buflen); struct dl_phdr_info; int __elf_phdr_match_addr(struct dl_phdr_info *, void *); void __init_elf_aux_vector(void); +void __libc_map_stacks_exec(void); void _pthread_cancel_enter(int); void _pthread_cancel_leave(int); diff --git a/lib/libc/net/Makefile.inc b/lib/libc/net/Makefile.inc index e61021b..158a12e 100644 --- a/lib/libc/net/Makefile.inc +++ b/lib/libc/net/Makefile.inc @@ -12,7 +12,7 @@ SRCS+= base64.c ether_addr.c eui64.c \ getproto.c getprotoent.c getprotoname.c getservent.c \ if_indextoname.c if_nameindex.c if_nametoindex.c \ ip6opt.c linkaddr.c map_v4v6.c name6.c ntoh.c \ - nsdispatch.c nslexer.c nsparser.y nss_compat.c \ + nsdispatch.c nslexer.l nsparser.y nss_compat.c \ rcmd.c rcmdsh.c recv.c rthdr.c sctp_sys_calls.c send.c \ sockatmark.c sourcefilter.c vars.c @@ -34,11 +34,8 @@ CFLAGS+=-I${.CURDIR}/resolv YFLAGS+=-p_nsyy LFLAGS+=-P_nsyy -CLEANFILES+=nslexer.c - -nslexer.c: nslexer.l nsparser.h - ${LEX} ${LFLAGS} -o/dev/stdout ${.IMPSRC} | \ - sed -e '/YY_BUF_SIZE/s/16384/1024/' >${.TARGET} +CFLAGS.nslexer.c= -DYY_BUF_SIZE=1024 +CFLAGS+= ${CFLAGS.${.IMPSRC:T}} MAN+= byteorder.3 ethers.3 eui64.3 \ getaddrinfo.3 gai_strerror.3 gethostbyname.3 \ diff --git a/lib/libc/sys/interposing_table.c b/lib/libc/sys/interposing_table.c index c4d1429..56b2116 100644 --- a/lib/libc/sys/interposing_table.c +++ b/lib/libc/sys/interposing_table.c @@ -78,6 +78,7 @@ interpos_func_t __libc_interposing[INTERPOS_MAX] = { SLOT(kevent, __sys_kevent), SLOT(wait6, __sys_wait6), SLOT(ppoll, __sys_ppoll), + SLOT(map_stacks_exec, __libc_map_stacks_exec), }; #undef SLOT diff --git a/lib/libpam/modules/pam_ssh/Makefile b/lib/libpam/modules/pam_ssh/Makefile index dc86e06..56f3781 100644 --- a/lib/libpam/modules/pam_ssh/Makefile +++ b/lib/libpam/modules/pam_ssh/Makefile @@ -7,10 +7,7 @@ LIB= pam_ssh MAN= pam_ssh.8 SRCS= pam_ssh.c -# required when linking with a dynamic libssh -SRCS+= roaming_dummy.c - -WARNS?= 3 +WARNS?= 5 CFLAGS+= -I${SSHDIR} -include ssh_namespace.h SRCS+= ssh_namespace.h diff --git a/lib/libpam/modules/pam_ssh/pam_ssh.c b/lib/libpam/modules/pam_ssh/pam_ssh.c index 8fc68fd..f95c737 100644 --- a/lib/libpam/modules/pam_ssh/pam_ssh.c +++ b/lib/libpam/modules/pam_ssh/pam_ssh.c @@ -57,6 +57,7 @@ __FBSDID("$FreeBSD$"); #include <openssl/evp.h> +#define __bounded__(x, y, z) #include "key.h" #include "buffer.h" #include "authfd.h" @@ -84,7 +85,9 @@ static const char *pam_ssh_keyfiles[] = { }; static const char *pam_ssh_agent = "/usr/bin/ssh-agent"; -static char *const pam_ssh_agent_argv[] = { "ssh_agent", "-s", NULL }; +static char str_ssh_agent[] = "ssh-agent"; +static char str_dash_s[] = "-s"; +static char *const pam_ssh_agent_argv[] = { str_ssh_agent, str_dash_s, NULL }; static char *const pam_ssh_agent_envp[] = { NULL }; /* diff --git a/lib/libthr/pthread.map b/lib/libthr/pthread.map index 0903989..9fb72eb 100644 --- a/lib/libthr/pthread.map +++ b/lib/libthr/pthread.map @@ -295,8 +295,6 @@ FBSDprivate_1.0 { _thread_size_key; _thread_state_running; _thread_state_zoombie; - - __pthread_map_stacks_exec; }; FBSD_1.1 { diff --git a/lib/libthr/thread/thr_private.h b/lib/libthr/thread/thr_private.h index 3597485..88a9809 100644 --- a/lib/libthr/thread/thr_private.h +++ b/lib/libthr/thread/thr_private.h @@ -928,6 +928,8 @@ int __thr_sigwait(const sigset_t *set, int *sig); int __thr_sigwaitinfo(const sigset_t *set, siginfo_t *info); int __thr_swapcontext(ucontext_t *oucp, const ucontext_t *ucp); +void __thr_map_stacks_exec(void); + struct _spinlock; void __thr_spinunlock(struct _spinlock *lck); void __thr_spinlock(struct _spinlock *lck); diff --git a/lib/libthr/thread/thr_stack.c b/lib/libthr/thread/thr_stack.c index e5d149e..74e1329 100644 --- a/lib/libthr/thread/thr_stack.c +++ b/lib/libthr/thread/thr_stack.c @@ -161,9 +161,8 @@ singlethread_map_stacks_exec(void) rlim.rlim_cur, _rtld_get_stack_prot()); } -void __pthread_map_stacks_exec(void); void -__pthread_map_stacks_exec(void) +__thr_map_stacks_exec(void) { struct pthread *curthread, *thrd; struct stack *st; diff --git a/lib/libthr/thread/thr_syscalls.c b/lib/libthr/thread/thr_syscalls.c index 2484e52..5dd20da 100644 --- a/lib/libthr/thread/thr_syscalls.c +++ b/lib/libthr/thread/thr_syscalls.c @@ -664,6 +664,7 @@ __thr_interpose_libc(void) SLOT(kevent); SLOT(wait6); SLOT(ppoll); + SLOT(map_stacks_exec); #undef SLOT *(__libc_interposing_slot( INTERPOS__pthread_mutex_init_calloc_cb)) = |