summaryrefslogtreecommitdiff
path: root/source4/smb_server
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2021-01-14 09:50:10 +0100
committerAndrew Bartlett <abartlet@samba.org>2021-04-29 03:58:37 +0000
commit236c35f702d21fde5db7834ffaeab3f3032a2136 (patch)
tree060e36bcb65f2a3b5c07182c7323aeddce1578e4 /source4/smb_server
parent7d675bdae9f659c5402ae3853419b2ee0460d2be (diff)
downloadsamba-236c35f702d21fde5db7834ffaeab3f3032a2136.tar.gz
s4:samba: Migrate samba daemon to new cmdline option parser
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source4/smb_server')
-rw-r--r--source4/smb_server/service_smb.c6
-rw-r--r--source4/smb_server/wscript_build2
2 files changed, 5 insertions, 3 deletions
diff --git a/source4/smb_server/service_smb.c b/source4/smb_server/service_smb.c
index 2215ba18862..05e26236a55 100644
--- a/source4/smb_server/service_smb.c
+++ b/source4/smb_server/service_smb.c
@@ -34,7 +34,8 @@
#include "dsdb/samdb/samdb.h"
#include "param/param.h"
#include "ntvfs/ntvfs.h"
-#include "lib/cmdline/popt_common.h"
+#include "lib/cmdline/cmdline.h"
+
/*
open the smb server sockets
*/
@@ -96,13 +97,14 @@ failed:
/* called at smbd startup - register ourselves as a server service */
NTSTATUS server_service_smb_init(TALLOC_CTX *ctx)
{
+ struct loadparm_context *lp_ctx = samba_cmdline_get_lp_ctx();
static const struct service_details details = {
.inhibit_fork_on_accept = true,
.inhibit_pre_fork = true,
.task_init = smbsrv_task_init,
.post_fork = NULL
};
- ntvfs_init(cmdline_lp_ctx);
+ ntvfs_init(lp_ctx);
share_init();
return register_server_service(ctx, "smb", &details);
}
diff --git a/source4/smb_server/wscript_build b/source4/smb_server/wscript_build
index 58603407c0f..0ae499e5a89 100644
--- a/source4/smb_server/wscript_build
+++ b/source4/smb_server/wscript_build
@@ -5,7 +5,7 @@ bld.SAMBA_MODULE('service_smb',
autoproto='service_smb_proto.h',
subsystem='service',
init_function='server_service_smb_init',
- deps='SMB_SERVER netif shares samba-hostconfig POPT_SAMBA',
+ deps='SMB_SERVER netif shares samba-hostconfig cmdline',
internal_module=False,
enabled=bld.CONFIG_SET('WITH_NTVFS_FILESERVER')
)