Date: Tue, 26 Jul 2011 08:17:14 +0000 From: kibab@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r224641 - in soc2011/kibab/freebsd-src-head/contrib/bind9/lib/lwres: . include/lwres Message-ID: <20110726081714.5EEEA106566C@hub.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kibab Date: Tue Jul 26 08:17:14 2011 New Revision: 224641 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=224641 Log: New function lwres_globsocket_init(), should be called outside the sandbox to create socket that is used later for communication with local resolver Modified: soc2011/kibab/freebsd-src-head/contrib/bind9/lib/lwres/context.c soc2011/kibab/freebsd-src-head/contrib/bind9/lib/lwres/include/lwres/lwres.h Modified: soc2011/kibab/freebsd-src-head/contrib/bind9/lib/lwres/context.c ============================================================================== --- soc2011/kibab/freebsd-src-head/contrib/bind9/lib/lwres/context.c Tue Jul 26 07:39:31 2011 (r224640) +++ soc2011/kibab/freebsd-src-head/contrib/bind9/lib/lwres/context.c Tue Jul 26 08:17:14 2011 (r224641) @@ -145,6 +145,24 @@ static lwres_result_t context_connect(lwres_context_t *); +/*! + * lwres_result_t + */ +lwres_result_t +lwres_globsocket_init() +{ + lwres_context_t *ctx; + lwres_result_t res; + + ctx = NULL; + res = lwres_context_create(&ctx, NULL, NULL, NULL, 0); + + if(res != LWRES_R_SUCCESS) + return res; + + return context_connect(ctx); +} + /*% * Creates a #lwres_context_t structure for use in * lightweight resolver operations. Modified: soc2011/kibab/freebsd-src-head/contrib/bind9/lib/lwres/include/lwres/lwres.h ============================================================================== --- soc2011/kibab/freebsd-src-head/contrib/bind9/lib/lwres/include/lwres/lwres.h Tue Jul 26 07:39:31 2011 (r224640) +++ soc2011/kibab/freebsd-src-head/contrib/bind9/lib/lwres/include/lwres/lwres.h Tue Jul 26 08:17:14 2011 (r224641) @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: lwres.h,v 1.57 2007-06-19 23:47:23 tbox Exp $ */ +/* $Id: lwres.h,v 1.57 2007/06/19 23:47:23 tbox Exp $ */ #ifndef LWRES_LWRES_H #define LWRES_LWRES_H 1 @@ -537,6 +537,15 @@ * ctx != NULL */ +lwres_result_t +lwres_globsocket_init(); +/**< + * creates a connection to local resolver daemon. + * Must be used before sandbox creation. + * + * Requires: should not be in sandbox. + */ + lwres_conf_t * lwres_conf_get(lwres_context_t *ctx); /**<
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110726081714.5EEEA106566C>