summaryrefslogtreecommitdiff
path: root/source3/libnet/libnet_conf.h
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2008-01-13 01:40:05 +0100
committerMichael Adam <obnox@samba.org>2008-01-13 02:14:34 +0100
commit1ee6d3e1ee56554d83437a8c79cb169a26732154 (patch)
treef94b6473640b8ea1ada891460e99225a3b18980e /source3/libnet/libnet_conf.h
parent4add2fe36e0eb84a4e49f8e38c2a14023581eeca (diff)
downloadsamba-1ee6d3e1ee56554d83437a8c79cb169a26732154.tar.gz
samba-1ee6d3e1ee56554d83437a8c79cb169a26732154.tar.bz2
samba-1ee6d3e1ee56554d83437a8c79cb169a26732154.zip
Introduce a libnet_conf context created by libnet_conf_open().
The libnet_conf_ctx stores the information necessary to interoperate with the configuration. It is created by calling libnet_conf_open() and destroyed by calling libnet_conf_close(). The context is passed to all the libnet_conf functions. It currently stores the token to access the registry. Later, it could store more data, e.g. the server to connect to, credentials, and so on. For support of other backends than registry or support of remote configuration, only the open function will have to be changed. In net_conf, the calls to the actual net_conf functions is wrapped into a function that calls libnet_conf_open()/_close(). Thus an individual variant of net_conf_runfunction2() and functable2 is used to cope with functions being called by the wrapper with the additional libnet_conf_ctx argument. Michael (This used to be commit c2a9346faa26e79af5948197a1b322e545f0ed09)
Diffstat (limited to 'source3/libnet/libnet_conf.h')
-rw-r--r--source3/libnet/libnet_conf.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/source3/libnet/libnet_conf.h b/source3/libnet/libnet_conf.h
new file mode 100644
index 0000000000..b518c0e3b0
--- /dev/null
+++ b/source3/libnet/libnet_conf.h
@@ -0,0 +1,27 @@
+/*
+ * Unix SMB/CIFS implementation.
+ * libnet smbconf registry support
+ * Copyright (C) Michael Adam 2008
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef __LIBNET_CONF_H__
+#define __LIBNET_CONF_H__
+
+struct libnet_conf_ctx {
+ NT_USER_TOKEN *token;
+};
+
+#endif