socsvn commit: r224641 - in
soc2011/kibab/freebsd-src-head/contrib/bind9/lib/lwres: .
include/lwres
kibab at FreeBSD.org
kibab at FreeBSD.org
Tue Jul 26 08:17:16 UTC 2011
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);
/**<
More information about the svn-soc-all
mailing list