docs: remove whitespace in example samba.ldif (fix bug #8789)
[Samba/gebeck_regimport.git] / source4 / param / loadparm.c
blobb1c3db6e7e11414899be3470db87f5a1660dbef2
1 /*
2 Unix SMB/CIFS implementation.
3 Parameter loading functions
4 Copyright (C) Karl Auer 1993-1998
6 Largely re-written by Andrew Tridgell, September 1994
8 Copyright (C) Simo Sorce 2001
9 Copyright (C) Alexander Bokovoy 2002
10 Copyright (C) Stefan (metze) Metzmacher 2002
11 Copyright (C) Jim McDonough (jmcd@us.ibm.com) 2003.
12 Copyright (C) James Myers 2003 <myersjj@samba.org>
13 Copyright (C) Jelmer Vernooij <jelmer@samba.org> 2007
15 This program is free software; you can redistribute it and/or modify
16 it under the terms of the GNU General Public License as published by
17 the Free Software Foundation; either version 3 of the License, or
18 (at your option) any later version.
20 This program is distributed in the hope that it will be useful,
21 but WITHOUT ANY WARRANTY; without even the implied warranty of
22 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 GNU General Public License for more details.
25 You should have received a copy of the GNU General Public License
26 along with this program. If not, see <http://www.gnu.org/licenses/>.
29 #include "includes.h"
30 #include "lib/param/param.h"
31 #include "libcli/raw/libcliraw.h"
32 #include "rpc_server/common/common.h"
34 void lpcfg_smbcli_options(struct loadparm_context *lp_ctx,
35 struct smbcli_options *options)
37 options->max_xmit = lpcfg_max_xmit(lp_ctx);
38 options->max_mux = lpcfg_maxmux(lp_ctx);
39 options->use_spnego = lpcfg_nt_status_support(lp_ctx) && lpcfg_use_spnego(lp_ctx);
40 options->signing = lpcfg_client_signing(lp_ctx);
41 options->request_timeout = SMB_REQUEST_TIMEOUT;
42 options->ntstatus_support = lpcfg_nt_status_support(lp_ctx);
43 options->max_protocol = lpcfg_cli_maxprotocol(lp_ctx);
44 options->unicode = lpcfg_unicode(lp_ctx);
45 options->use_oplocks = true;
46 options->use_level2_oplocks = true;
49 void lpcfg_smbcli_session_options(struct loadparm_context *lp_ctx,
50 struct smbcli_session_options *options)
52 options->lanman_auth = lpcfg_client_lanman_auth(lp_ctx);
53 options->ntlmv2_auth = lpcfg_client_ntlmv2_auth(lp_ctx);
54 options->plaintext_auth = lpcfg_client_plaintext_auth(lp_ctx);
57 _PUBLIC_ struct dcerpc_server_info *lpcfg_dcerpc_server_info(TALLOC_CTX *mem_ctx, struct loadparm_context *lp_ctx)
59 struct dcerpc_server_info *ret = talloc_zero(mem_ctx, struct dcerpc_server_info);
61 ret->domain_name = talloc_reference(mem_ctx, lpcfg_workgroup(lp_ctx));
62 ret->version_major = lpcfg_parm_int(lp_ctx, NULL, "server_info", "version_major", 5);
63 ret->version_minor = lpcfg_parm_int(lp_ctx, NULL, "server_info", "version_minor", 2);
64 ret->version_build = lpcfg_parm_int(lp_ctx, NULL, "server_info", "version_build", 3790);
66 return ret;