#include "winbind/wb_server.h"
#include "smbd/service_task.h"
#include "smbd/process_model.h"
+#include "param/param.h"
#include "s3compat.h"
-#include "s3replace.h"
#include "s3compat_globals.h"
#include "s3compat_wrapper.h"
#include "includes.h"
#include "auth/auth.h"
#include "auth/auth_sam_reply.h"
+#include "param/param.h"
#include "s3compat.h"
#include "s3compat_globals.h"
#include "s3compat_authenticate.h"
* side that cannot be passed around as parameters */
#include "includes.h"
+#include "param/param.h"
#include "s3compat_globals.h"
#include "s3compat_proto.h"
#include "smbd/service.h"
{
return s3compat_get_tevent_ctx();
}
+
+const char *s3compat_lp_netbios_name(void)
+{
+ return lp_netbios_name(s3compat_get_lp_ctx());
+}
+
+const char *s3compat_lp_workgroup(void)
+{
+ return lp_workgroup(s3compat_get_lp_ctx());
+}
+
+const char *s3compat_lp_sam_name(void)
+{
+ return lp_sam_name(s3compat_get_lp_ctx());
+}
+
-#include "lib/messaging/messaging.h"
-#include "param/param.h"
+struct loadparm_context;
+struct messaging_context;
#include "s3compat_globals_proto.h"
--- /dev/null
+/*
+ Unix SMB/CIFS implementation.
+ Connect lp_workgroup() and global_myname() across s3compat
+ Copyright (C) Andrew Bartlett 2010
+
+ 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/>.
+*/
+
+#include "includes.h"
+#include "s3compat_globals.h"
+bool set_global_myname(const char *myname)
+{
+ /* This is ignored, the only way to set global_myname is by the source4/ loadparm */
+ return true;
+}
+const char *global_myname(void)
+{
+ return s3compat_lp_netbios_name();
+}
+bool set_global_myworkgroup(const char *myworkgroup)
+{
+ /* This is ignored, the only way to set global_myname is by the source4/ loadparm */
+ return true;
+}
+
+const char *lp_workgroup(void)
+{
+ return s3compat_lp_workgroup();
+}
+
+const char *get_global_sam_name(void)
+{
+ return s3compat_lp_sam_name();
+}
+
+/* Nothing do do here - we don't store these in globals */
+void gfree_netbios_names(void)
+{
+ return;
+}
hide_symbols=True)
bld.SAMBA_SUBSYSTEM('s3replace',
- source='s3replace.c',
+ source='s3replace.c s3compat_names.c',
autoproto='s3replace.h',
includes=SAMBA3_INCLUDES,
deps='talloc tevent tdb',
s4_event_context_set_default(event_ctx);
#ifdef ENABLE_S3COMPAT
+ s3compat_set_lp_ctx(cmdline_lp_ctx);
s3compat_set_tevent_ctx(event_ctx);
s3compat_initialise(lp_configfile(cmdline_lp_ctx), opt_interactive);
#endif