From 228ae42ec3fb26c9c7117a0b7983fcd901a24884 Mon Sep 17 00:00:00 2001 From: deraadt Date: Sun, 17 Jul 2022 03:04:27 +0000 Subject: [PATCH] Add ypconnect(2) stub inside libc so that libc functions can use it, but do not export it. --- lib/libc/sys/Makefile.inc | 4 ++-- lib/libc/yp/ypinternal.h | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/libc/sys/Makefile.inc b/lib/libc/sys/Makefile.inc index df2038d217c..b9cae5f77af 100644 --- a/lib/libc/sys/Makefile.inc +++ b/lib/libc/sys/Makefile.inc @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.inc,v 1.162 2022/07/17 03:01:22 deraadt Exp $ +# $OpenBSD: Makefile.inc,v 1.163 2022/07/17 03:04:27 deraadt Exp $ # $NetBSD: Makefile.inc,v 1.35 1995/10/16 23:49:07 jtc Exp $ # @(#)Makefile.inc 8.1 (Berkeley) 6/17/93 @@ -112,7 +112,7 @@ SPSEUDO_NOERR=${PSEUDO_NOERR:.o=.so} DPSEUDO_NOERR=${PSEUDO_NOERR:.o=.do} HIDDEN= ___realpath.o ___getcwd.o fork.o sigaction.o _ptrace.o ${CANCEL:=.o} \ - clock_gettime.o gettimeofday.o + clock_gettime.o gettimeofday.o ypconnect.o PHIDDEN=${HIDDEN:.o=.po} SHIDDEN=${HIDDEN:.o=.so} DHIDDEN=${HIDDEN:.o=.do} diff --git a/lib/libc/yp/ypinternal.h b/lib/libc/yp/ypinternal.h index 8021a84e5a9..0b4e46461c4 100644 --- a/lib/libc/yp/ypinternal.h +++ b/lib/libc/yp/ypinternal.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ypinternal.h,v 1.11 2016/05/29 22:42:24 guenther Exp $ */ +/* $OpenBSD: ypinternal.h,v 1.12 2022/07/17 03:04:27 deraadt Exp $ */ /* * Copyright (c) 1992, 1993, 1996 Theo de Raadt @@ -50,7 +50,9 @@ extern char _yp_domain[HOST_NAME_MAX+1]; extern int _yplib_timeout; void _yp_unbind(struct dom_binding *); +int ypconnect(int type); __END_HIDDEN_DECLS int _yp_check(char **); PROTO_NORMAL(_yp_check); +PROTO_WRAP(ypconnect); -- 2.20.1