summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/param/param.h159
-rw-r--r--source4/param/wscript_build3
-rwxr-xr-xsource4/script/mkproto.pl6
3 files changed, 7 insertions, 161 deletions
diff --git a/source4/param/param.h b/source4/param/param.h
index 15ea564c40..7441493d0a 100644
--- a/source4/param/param.h
+++ b/source4/param/param.h
@@ -69,169 +69,14 @@ struct smbcli_options;
struct smbcli_session_options;
struct gensec_settings;
+#include "param/param_proto.h"
+
void reload_charcnv(struct loadparm_context *lp_ctx);
struct loadparm_service *lpcfg_default_service(struct loadparm_context *lp_ctx);
struct parm_struct *lpcfg_parm_table(void);
-#define DECL_GLOBAL_STRING(fn_name) \
- const char *lpcfg_ ## fn_name(struct loadparm_context *lp_ctx); \
- const char *lp_ ## fn_name(void)
-
-#define DECL_GLOBAL_CONST_STRING(fn_name) \
- const char *lpcfg_ ## fn_name(struct loadparm_context *lp_ctx); \
- const char *lp_ ## fn_name(void)
-
-#define DECL_GLOBAL_LIST(fn_name) \
- const char **lpcfg_ ## fn_name(struct loadparm_context *lp_ctx); \
- const char **lp_ ## fn_name(void)
-
-#define DECL_GLOBAL_BOOL(fn_name) \
- bool lpcfg_ ## fn_name(struct loadparm_context *lp_ctx); \
- bool lp_ ## fn_name(void)
-
-#define DECL_GLOBAL_INTEGER(fn_name) \
- int lpcfg_ ## fn_name(struct loadparm_context *lp_ctx); \
- int lp_ ## fn_name(void)
-
-#define DECL_LOCAL_STRING(fn_name) \
- const char *lpcfg_ ## fn_name(struct loadparm_service *service, struct loadparm_service *sDefault); \
- const char *lp_ ## fn_name(int i)
-
-#define DECL_LOCAL_LIST(fn_name) \
- const char **lpcfg_ ## fn_name(struct loadparm_service *service, struct loadparm_service *sDefault); \
- const char **lp_ ## fn_name(int i)
-
-#define DECL_LOCAL_BOOL(fn_name) \
- bool lpcfg_ ## fn_name(struct loadparm_service *service, struct loadparm_service *sDefault); \
- bool lp_ ## fn_name(int i)
-
-#define DECL_LOCAL_INTEGER(fn_name) \
- int lpcfg_ ## fn_name(struct loadparm_service *service, struct loadparm_service *sDefault); \
- int lp_ ## fn_name(int i)
-
-
-DECL_GLOBAL_INTEGER(server_role);
-DECL_GLOBAL_INTEGER(sid_generator);
-DECL_GLOBAL_LIST(smb_ports);
-DECL_GLOBAL_INTEGER(nbt_port);
-DECL_GLOBAL_INTEGER(dgram_port);
-DECL_GLOBAL_INTEGER(cldap_port);
-DECL_GLOBAL_INTEGER(krb5_port);
-DECL_GLOBAL_INTEGER(kpasswd_port);
-DECL_GLOBAL_INTEGER(web_port);
-DECL_GLOBAL_BOOL(tls_enabled);
-DECL_GLOBAL_STRING(share_backend);
-DECL_GLOBAL_STRING(sam_url);
-DECL_GLOBAL_STRING(idmap_url);
-DECL_GLOBAL_STRING(secrets_url);
-DECL_GLOBAL_STRING(spoolss_url);
-DECL_GLOBAL_STRING(wins_config_url);
-DECL_GLOBAL_STRING(wins_url);
-DECL_GLOBAL_CONST_STRING(winbind_separator);
-DECL_GLOBAL_CONST_STRING(winbindd_socket_directory);
-DECL_GLOBAL_CONST_STRING(winbindd_privileged_socket_directory);
-DECL_GLOBAL_CONST_STRING(template_shell);
-DECL_GLOBAL_CONST_STRING(template_homedir);
-DECL_GLOBAL_BOOL(winbind_sealed_pipes);
-DECL_GLOBAL_BOOL(idmap_trusted_only);
-DECL_GLOBAL_STRING(private_dir);
-DECL_GLOBAL_STRING(serverstring);
-DECL_GLOBAL_STRING(lockdir);
-DECL_GLOBAL_STRING(modulesdir);
-DECL_GLOBAL_STRING(setupdir);
-DECL_GLOBAL_STRING(ncalrpc_dir);
-DECL_GLOBAL_STRING(dos_charset);
-DECL_GLOBAL_STRING(unix_charset);
-DECL_GLOBAL_STRING(display_charset);
-DECL_GLOBAL_STRING(piddir);
-DECL_GLOBAL_LIST(rndc_command);
-DECL_GLOBAL_LIST(dns_update_command);
-DECL_GLOBAL_LIST(spn_update_command);
-DECL_GLOBAL_STRING(nsupdate_command);
-DECL_GLOBAL_LIST(dcerpc_endpoint_servers);
-DECL_GLOBAL_LIST(server_services);
-DECL_GLOBAL_STRING(ntptr_providor);
-DECL_GLOBAL_STRING(auto_services);
-DECL_GLOBAL_STRING(passwd_chat);
-DECL_GLOBAL_LIST(passwordserver);
-DECL_GLOBAL_LIST(name_resolve_order);
-DECL_GLOBAL_STRING(realm);
-DECL_GLOBAL_STRING(dnsdomain);
-DECL_GLOBAL_STRING(socket_options);
-DECL_GLOBAL_STRING(workgroup);
-DECL_GLOBAL_STRING(netbios_name);
-DECL_GLOBAL_STRING(netbios_scope);
-DECL_GLOBAL_LIST(wins_server_list);
-DECL_GLOBAL_LIST(interfaces);
-DECL_GLOBAL_STRING(socket_address);
-DECL_GLOBAL_LIST(netbios_aliases);
-DECL_GLOBAL_BOOL(disable_netbios);
-DECL_GLOBAL_BOOL(wins_support);
-DECL_GLOBAL_BOOL(wins_dns_proxy);
-DECL_GLOBAL_STRING(wins_hook);
-DECL_GLOBAL_BOOL(local_master);
-DECL_GLOBAL_BOOL(readraw);
-DECL_GLOBAL_BOOL(large_readwrite);
-DECL_GLOBAL_BOOL(writeraw);
-DECL_GLOBAL_BOOL(null_passwords);
-DECL_GLOBAL_BOOL(obey_pam_restrictions);
-DECL_GLOBAL_BOOL(encrypted_passwords);
-DECL_GLOBAL_BOOL(time_server);
-DECL_GLOBAL_BOOL(bind_interfaces_only);
-DECL_GLOBAL_BOOL(unicode);
-DECL_GLOBAL_BOOL(nt_status_support);
-DECL_GLOBAL_BOOL(lanman_auth);
-DECL_GLOBAL_BOOL(ntlm_auth);
-DECL_GLOBAL_BOOL(client_plaintext_auth);
-DECL_GLOBAL_BOOL(client_lanman_auth);
-DECL_GLOBAL_BOOL(client_ntlmv2_auth);
-DECL_GLOBAL_BOOL(client_use_spnego_principal);
-DECL_GLOBAL_BOOL(host_msdfs);
-DECL_GLOBAL_BOOL(unix_extensions);
-DECL_GLOBAL_BOOL(use_spnego);
-DECL_GLOBAL_BOOL(rpc_big_endian);
-DECL_GLOBAL_INTEGER(max_wins_ttl);
-DECL_GLOBAL_INTEGER(min_wins_ttl);
-DECL_GLOBAL_INTEGER(maxmux);
-DECL_GLOBAL_INTEGER(max_xmit);
-DECL_GLOBAL_INTEGER(passwordlevel);
-DECL_GLOBAL_INTEGER(srv_maxprotocol);
-DECL_GLOBAL_INTEGER(srv_minprotocol);
-DECL_GLOBAL_INTEGER(cli_maxprotocol);
-DECL_GLOBAL_INTEGER(cli_minprotocol);
-DECL_GLOBAL_INTEGER(security);
-DECL_GLOBAL_BOOL(paranoid_server_security);
-DECL_GLOBAL_INTEGER(announce_as);
-DECL_LOCAL_STRING(pathname);
-DECL_LOCAL_LIST(hostsallow);
-DECL_LOCAL_LIST(hostsdeny);
-DECL_LOCAL_STRING(comment);
-DECL_LOCAL_STRING(fstype);
-DECL_LOCAL_LIST(ntvfs_handler);
-DECL_LOCAL_BOOL(msdfs_root);
-DECL_LOCAL_BOOL(browseable);
-DECL_LOCAL_BOOL(readonly);
-DECL_LOCAL_BOOL(print_ok);
-DECL_LOCAL_BOOL(map_hidden);
-DECL_LOCAL_BOOL(map_archive);
-DECL_LOCAL_BOOL(strict_locking);
-DECL_LOCAL_BOOL(oplocks);
-DECL_LOCAL_BOOL(strict_sync);
-DECL_LOCAL_BOOL(ci_filesystem);
-DECL_LOCAL_BOOL(map_system);
-DECL_LOCAL_INTEGER(max_connections);
-DECL_LOCAL_INTEGER(csc_policy);
-DECL_LOCAL_INTEGER(create_mask);
-DECL_LOCAL_INTEGER(force_create_mode);
-DECL_LOCAL_INTEGER(dir_mask);
-DECL_LOCAL_INTEGER(force_dir_mode);
-DECL_GLOBAL_INTEGER(server_signing);
-DECL_GLOBAL_INTEGER(client_signing);
-DECL_GLOBAL_CONST_STRING(ntp_signd_socket_directory);
-
-
char *lpcfg_tls_keyfile(TALLOC_CTX *mem_ctx, struct loadparm_context *);
char *lpcfg_tls_certfile(TALLOC_CTX *mem_ctx, struct loadparm_context *);
char *lpcfg_tls_cafile(TALLOC_CTX *mem_ctx, struct loadparm_context *);
diff --git a/source4/param/wscript_build b/source4/param/wscript_build
index 89929f1a52..0f0f1d0c04 100644
--- a/source4/param/wscript_build
+++ b/source4/param/wscript_build
@@ -6,7 +6,8 @@ bld.SAMBA_LIBRARY('LIBSAMBA-HOSTCONFIG',
vnum='0.0.1',
deps='DYNCONFIG CHARSET',
public_deps='LIBSAMBA-UTIL',
- public_headers='param.h'
+ public_headers='param.h',
+ autoproto='param_proto.h'
)
diff --git a/source4/script/mkproto.pl b/source4/script/mkproto.pl
index 59307881c4..4760e63bda 100755
--- a/source4/script/mkproto.pl
+++ b/source4/script/mkproto.pl
@@ -128,7 +128,7 @@ sub handle_loadparm($$)
{
my ($file,$line) = @_;
- if ($line =~ /^_PUBLIC_ FN_(GLOBAL|LOCAL)_(CONST_STRING|STRING|BOOL|bool|CHAR|INTEGER|LIST)\((\w+),.*\)/o) {
+ if ($line =~ /^FN_(GLOBAL|LOCAL)_(CONST_STRING|STRING|BOOL|bool|CHAR|INTEGER|LIST)\((\w+),.*\)/o) {
my $scope = $1;
my $type = $2;
my $name = $3;
@@ -147,7 +147,7 @@ sub handle_loadparm($$)
"LOCAL" => "struct loadparm_service *, struct loadparm_service *"
);
- $file->("$tmap{$type}$name($smap{$scope});\n");
+ $file->("$tmap{$type}lpcfg_$name($smap{$scope});\n");
}
}
@@ -190,7 +190,7 @@ sub process_file($$$)
next if ($line =~ /^\/|[;]/);
- if ($line =~ /^_PUBLIC_ FN_/) {
+ if ($line =~ /^FN_/) {
handle_loadparm($public_file, $line);
handle_loadparm($private_file, $line);
next;