summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2015-09-09 15:33:18 +0000
committerderaadt <deraadt@openbsd.org>2015-09-09 15:33:18 +0000
commitd1a23ca2a7534eb2aa901c231129963c273a08c9 (patch)
tree44fa49c7d9a53d82364e7aed491fdc501b9fb94d
parentIn the flag command description, mention that a bootable partition (diff)
downloadwireguard-openbsd-d1a23ca2a7534eb2aa901c231129963c273a08c9.tar.xz
wireguard-openbsd-d1a23ca2a7534eb2aa901c231129963c273a08c9.zip
Hide YP-specific xdr_* functions, and have the YP tools link -lrpcsvc
as needed. ok miod guenther
-rw-r--r--lib/libc/Symbols.list19
-rw-r--r--lib/libc/hidden/rpcsvc/yp.h44
-rw-r--r--usr.bin/ypwhich/Makefile5
-rw-r--r--usr.sbin/ypbind/Makefile5
-rw-r--r--usr.sbin/ypldap/Makefile6
-rw-r--r--usr.sbin/yppoll/Makefile5
-rw-r--r--usr.sbin/ypset/Makefile5
7 files changed, 63 insertions, 26 deletions
diff --git a/lib/libc/Symbols.list b/lib/libc/Symbols.list
index 8b964f0f0d0..8fc74e9c819 100644
--- a/lib/libc/Symbols.list
+++ b/lib/libc/Symbols.list
@@ -1728,26 +1728,7 @@ uuid_is_nil
uuid_to_string
/* yp */
-xdr_domainname
-xdr_keydat
-xdr_mapname
-xdr_peername
-xdr_valdat
-xdr_ypbind_binding
-xdr_ypbind_resp
-xdr_ypbind_resptype
-xdr_ypbind_setdom
-xdr_ypmaplist
-xdr_ypreq_key
-xdr_ypreq_nokey
-xdr_ypresp_all
xdr_ypresp_all_seq
-xdr_ypresp_key_val
-xdr_ypresp_maplist
-xdr_ypresp_master
-xdr_ypresp_order
-xdr_ypresp_val
-xdr_ypstat
yp_all
yp_bind
yp_first
diff --git a/lib/libc/hidden/rpcsvc/yp.h b/lib/libc/hidden/rpcsvc/yp.h
new file mode 100644
index 00000000000..4d8ba39fe98
--- /dev/null
+++ b/lib/libc/hidden/rpcsvc/yp.h
@@ -0,0 +1,44 @@
+/* $OpenBSD: yp.h,v 1.1 2015/09/09 15:33:18 deraadt Exp $ */
+/*
+ * Copyright (c) 2015 Theo de Raadt <deraadt@openbsd.org>
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifndef _LIBC_RPCSVC_YP_H_
+#define _LIBC_RPCSVC_YP_H_
+
+#include_next <rpcsvc/yp.h>
+#include "namespace.h"
+
+PROTO_NORMAL(xdr_domainname);
+PROTO_NORMAL(xdr_keydat);
+PROTO_NORMAL(xdr_mapname);
+PROTO_NORMAL(xdr_peername);
+PROTO_NORMAL(xdr_valdat);
+PROTO_NORMAL(xdr_ypbind_binding);
+PROTO_NORMAL(xdr_ypbind_resp);
+PROTO_NORMAL(xdr_ypbind_resptype);
+PROTO_NORMAL(xdr_ypbind_setdom);
+PROTO_NORMAL(xdr_ypmaplist);
+PROTO_NORMAL(xdr_ypreq_key);
+PROTO_NORMAL(xdr_ypreq_nokey);
+PROTO_NORMAL(xdr_ypresp_all);
+PROTO_NORMAL(xdr_ypresp_key_val);
+PROTO_NORMAL(xdr_ypresp_maplist);
+PROTO_NORMAL(xdr_ypresp_master);
+PROTO_NORMAL(xdr_ypresp_order);
+PROTO_NORMAL(xdr_ypresp_val);
+PROTO_NORMAL(xdr_ypstat);
+
+#endif /* _LIBC_RPCSVC_YP_H_ */
diff --git a/usr.bin/ypwhich/Makefile b/usr.bin/ypwhich/Makefile
index e138ba4a0b2..91837e38705 100644
--- a/usr.bin/ypwhich/Makefile
+++ b/usr.bin/ypwhich/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.6 1999/03/20 15:36:12 maja Exp $
+# $OpenBSD: Makefile,v 1.7 2015/09/09 15:33:18 deraadt Exp $
# from: @(#)Makefile 5.8 (Berkeley) 7/28/90
PROG= ypwhich
@@ -8,4 +8,7 @@ MAN= ypwhich.1
.PATH: ${.CURDIR}/../../usr.sbin/ypserv/common
CFLAGS+=-I${.CURDIR}/../../usr.sbin/ypserv/common
+LDADD=-lrpcsvc
+DPADD=${LIBRPCSVC}
+
.include <bsd.prog.mk>
diff --git a/usr.sbin/ypbind/Makefile b/usr.sbin/ypbind/Makefile
index 9aaef63843e..adeaf2ff27e 100644
--- a/usr.sbin/ypbind/Makefile
+++ b/usr.sbin/ypbind/Makefile
@@ -1,7 +1,10 @@
-# $OpenBSD: Makefile,v 1.4 1997/09/21 11:44:36 deraadt Exp $
+# $OpenBSD: Makefile,v 1.5 2015/09/09 15:33:18 deraadt Exp $
PROG= ypbind
MAN= ypbind.8
CFLAGS+=-DDAEMON -DHEURISTIC
+LDADD=-lrpcsvc
+DPADD=${LIBRPCSVC}
+
.include <bsd.prog.mk>
diff --git a/usr.sbin/ypldap/Makefile b/usr.sbin/ypldap/Makefile
index b2afa30d412..6339334c159 100644
--- a/usr.sbin/ypldap/Makefile
+++ b/usr.sbin/ypldap/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.7 2014/01/18 05:54:52 martynas Exp $
+# $OpenBSD: Makefile,v 1.8 2015/09/09 15:33:18 deraadt Exp $
PROG= ypldap
SRCS= parse.y ypldap.c log.c \
@@ -8,8 +8,8 @@ SRCS= parse.y ypldap.c log.c \
MAN= ypldap.8 ypldap.conf.5
-DPADD= ${LIBEVENT} ${LIBUTIL}
-LDADD= -levent -lutil
+DPADD= ${LIBEVENT} ${LIBUTIL} ${LIBRPCSVC}
+LDADD= -levent -lutil -lrpcsvc
CFLAGS+= -I${.CURDIR}
CFLAGS+= -Wall
CFLAGS+= -Wstrict-prototypes -Wmissing-prototypes
diff --git a/usr.sbin/yppoll/Makefile b/usr.sbin/yppoll/Makefile
index 07e0912c4c5..313b949a9c1 100644
--- a/usr.sbin/yppoll/Makefile
+++ b/usr.sbin/yppoll/Makefile
@@ -1,6 +1,9 @@
-# $OpenBSD: Makefile,v 1.2 1997/09/21 11:44:37 deraadt Exp $
+# $OpenBSD: Makefile,v 1.3 2015/09/09 15:33:18 deraadt Exp $
PROG= yppoll
MAN= yppoll.8
+LDADD=-lrpcsvc
+DPADD=${LIBRPCSVC}
+
.include <bsd.prog.mk>
diff --git a/usr.sbin/ypset/Makefile b/usr.sbin/ypset/Makefile
index 2c6e1b3eaca..6077aaa4126 100644
--- a/usr.sbin/ypset/Makefile
+++ b/usr.sbin/ypset/Makefile
@@ -1,6 +1,9 @@
-# $OpenBSD: Makefile,v 1.2 1997/09/21 11:44:40 deraadt Exp $
+# $OpenBSD: Makefile,v 1.3 2015/09/09 15:33:18 deraadt Exp $
PROG= ypset
MAN= ypset.8
+LDADD=-lrpcsvc
+DPADD=${LIBRPCSVC}
+
.include <bsd.prog.mk>