diff options
author | Andrew Bartlett <abartlet@samba.org> | 2012-08-22 21:01:16 +1000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2012-08-23 15:02:26 +0200 |
commit | 8c71dc3505ab83ce95ab40a56f77313c4448be16 (patch) | |
tree | 2b05134a58d1f78afde52fdc81a95c69b5691135 /source4/smbd | |
parent | 332efe1539d83c0971f151f902f234e5a8bf0690 (diff) | |
download | samba-8c71dc3505ab83ce95ab40a56f77313c4448be16.tar.gz |
param: Add startup checks for valid server role/binary combinations
This should eliminate confusion from our users about what they can
expect to successfully run.
Andrew Bartlett
Diffstat (limited to 'source4/smbd')
-rw-r--r-- | source4/smbd/server.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/source4/smbd/server.c b/source4/smbd/server.c index f3405a7c2ac..b3d8ae5f5da 100644 --- a/source4/smbd/server.c +++ b/source4/smbd/server.c @@ -453,6 +453,17 @@ static int binary_smbd_main(const char *binary_name, int argc, const char *argv[ discard_const(binary_name)); } + if (lpcfg_server_role(cmdline_lp_ctx) != ROLE_ACTIVE_DIRECTORY_DC + && !lpcfg_parm_bool(cmdline_lp_ctx, NULL, "server role check", "inhibit", false) + && !str_list_check_ci(lpcfg_server_services(cmdline_lp_ctx), "smb") + && !str_list_check_ci(lpcfg_dcerpc_endpoint_servers(cmdline_lp_ctx), "remote") + && !str_list_check_ci(lpcfg_dcerpc_endpoint_servers(cmdline_lp_ctx), "mapiproxy")) { + DEBUG(0, ("At this time the 'samba' binary should only be used for either:\n")); + DEBUGADD(0, ("'server role = active directory domain controller' or to access the ntvfs file server with 'server services = +smb' or the rpc proxy with 'dcerpc endpoint servers = remote'\n")); + DEBUGADD(0, ("You should start smbd/nmbd/winbindd instead for domain member and standalone file server tasks\n")); + exit(1); + }; + prime_ldb_databases(event_ctx); status = setup_parent_messaging(event_ctx, cmdline_lp_ctx); |