Merge 2610c05b5b95cc7036b3d6dfb894c6cfbdb68483 as Samba-4.0alpha16
[kai/samba.git] / source3 / param / loadparm_ctx.c
1 /* 
2    Unix SMB/CIFS implementation.
3    Parameter loading functions
4    Copyright (C) Andrew Bartlett 2011
5
6    This program is free software; you can redistribute it and/or modify
7    it under the terms of the GNU General Public License as published by
8    the Free Software Foundation; either version 3 of the License, or
9    (at your option) any later version.
10
11    This program is distributed in the hope that it will be useful,
12    but WITHOUT ANY WARRANTY; without even the implied warranty of
13    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14    GNU General Public License for more details.
15
16    You should have received a copy of the GNU General Public License
17    along with this program.  If not, see <http://www.gnu.org/licenses/>.
18 */
19
20 #include "includes.h"
21 #include "../source4/param/s3_param.h"
22
23 static const char *get_parametric(const char *type, const char *option)
24 {
25         return lp_parm_const_string(-1, type, option, NULL);
26 }
27
28 /* These are in the order that they appear in the s4 loadparm file.
29  * All of the s4 loadparm functions should be here eventually, once
30  * they are implemented in the s3 loadparm, have the same format (enum
31  * values in particular) and defaults. */
32 static const struct loadparm_s3_context s3_fns = 
33 {
34         .get_parametric = get_parametric,
35
36         .server_role = lp_server_role,
37
38         .winbind_separator = lp_winbind_separator,
39         .template_homedir = lp_template_homedir,
40         .template_shell = lp_template_shell,
41
42         .dos_charset = lp_dos_charset,
43         .unix_charset = lp_unix_charset,
44
45         .realm = lp_realm,
46         .dnsdomain = lp_dnsdomain,
47         .socket_options = lp_socket_options,
48         .workgroup = lp_workgroup,
49
50         .netbios_name = lp_netbios_name,
51         .netbios_scope = lp_netbios_scope,
52
53         .lanman_auth = lp_lanman_auth,
54         .ntlm_auth = lp_ntlm_auth,
55
56         .client_plaintext_auth = lp_client_plaintext_auth,
57         .client_lanman_auth = lp_client_lanman_auth,
58         .client_ntlmv2_auth = lp_client_ntlmv2_auth,
59
60         .private_dir = lp_private_dir,
61         .ncalrpc_dir = lp_ncalrpc_dir,
62         .lockdir = lp_lockdir
63 };
64
65 const struct loadparm_s3_context *loadparm_s3_context(void)
66 {
67         return &s3_fns;
68 }