From 61933e159cc2a8399f8bb1fa53844a67f8bba55b Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Tue, 14 Mar 2006 15:22:36 +0000 Subject: r14381: Kill structs.h (This used to be commit 1ffb82a7596f989c90df69573083a2c2e28f8808) --- source4/param/param.h | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 source4/param/param.h (limited to 'source4/param/param.h') diff --git a/source4/param/param.h b/source4/param/param.h new file mode 100644 index 0000000000..923b06eb86 --- /dev/null +++ b/source4/param/param.h @@ -0,0 +1,46 @@ +/* + Unix SMB/CIFS implementation. + Generic parameter parsing interface + Copyright (C) Jelmer Vernooij 2005 + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#ifndef _PARAM_H /* _PARAM_H */ +#define _PARAM_H + +struct param_context { + struct param_section *sections; +}; + +struct param { + const char *name; + char *value; + const char **list_value; + struct param *prev, *next; +}; + +struct param_section { + const char *name; + struct param_section *prev, *next; + struct param *parameters; +}; + +struct param_context; +struct smbsrv_connection; + +#include "param/proto.h" + +#endif /* _PARAM_H */ -- cgit From c50125f6ef127db020bc0fcfdca8ed0b24e4f018 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Fri, 31 Mar 2006 23:28:18 +0000 Subject: r14844: Support a stdbool.h replacement in lib/replace/ (This used to be commit bccfddcafa1fdb56392e2301bbd404964ad9f7c3) --- source4/param/param.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source4/param/param.h') diff --git a/source4/param/param.h b/source4/param/param.h index 923b06eb86..dad5f12b15 100644 --- a/source4/param/param.h +++ b/source4/param/param.h @@ -41,6 +41,8 @@ struct param_section { struct param_context; struct smbsrv_connection; +#define Auto (2) + #include "param/proto.h" #endif /* _PARAM_H */ -- cgit From 0479a2f1cbae51fcd8dbdc3c148c808421fb4d25 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 10 Jul 2007 02:07:03 +0000 Subject: r23792: convert Samba4 to GPLv3 There are still a few tidyups of old FSF addresses to come (in both s3 and s4). More commits soon. (This used to be commit fcf38a38ac691abd0fa51b89dc951a08e89fdafa) --- source4/param/param.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'source4/param/param.h') diff --git a/source4/param/param.h b/source4/param/param.h index dad5f12b15..0438a87db9 100644 --- a/source4/param/param.h +++ b/source4/param/param.h @@ -5,7 +5,7 @@ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, @@ -14,8 +14,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + along with this program. If not, see . */ #ifndef _PARAM_H /* _PARAM_H */ -- cgit From 82037a75eae9deaf6ec80b5ecc3bb89aab6e6dd8 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Thu, 30 Aug 2007 23:15:12 +0000 Subject: r24814: Fix headers, trim core.h even more. (This used to be commit 9647f860bdd5c0a74583e886182bd041a45e7655) --- source4/param/param.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source4/param/param.h') diff --git a/source4/param/param.h b/source4/param/param.h index 0438a87db9..c829e0bf57 100644 --- a/source4/param/param.h +++ b/source4/param/param.h @@ -42,6 +42,8 @@ struct smbsrv_connection; #define Auto (2) +typedef NTSTATUS (*init_module_fn) (void); + #include "param/proto.h" #endif /* _PARAM_H */ -- cgit From 8d182d881d189e9855165b3a423f2d545a97fae8 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Fri, 31 Aug 2007 00:31:32 +0000 Subject: r24816: Move the rest of the contents of core.h to more appropriate places. include/ now only contains build system related headers, all other headers are now near the source code they're related to. (This used to be commit 6890a01dbfc6d8041a88ef5c6be52dfcd046fe80) --- source4/param/param.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'source4/param/param.h') diff --git a/source4/param/param.h b/source4/param/param.h index c829e0bf57..5f5da58388 100644 --- a/source4/param/param.h +++ b/source4/param/param.h @@ -44,6 +44,21 @@ struct smbsrv_connection; typedef NTSTATUS (*init_module_fn) (void); +enum server_role { + ROLE_STANDALONE=0, + ROLE_DOMAIN_MEMBER=1, + ROLE_DOMAIN_CONTROLLER=2, +}; + +enum announce_as {/* Types of machine we can announce as. */ + ANNOUNCE_AS_NT_SERVER=1, + ANNOUNCE_AS_WIN95=2, + ANNOUNCE_AS_WFW=3, + ANNOUNCE_AS_NT_WORKSTATION=4 +}; + + + #include "param/proto.h" #endif /* _PARAM_H */ -- cgit From 98b57d5eb61094a9c88e2f7d90d3e21b7e74e9d8 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sat, 8 Sep 2007 16:46:30 +0000 Subject: r25035: Fix some more warnings, use service pointer rather than service number in more places. (This used to be commit df9cebcb97e20564359097148665bd519f31bc6f) --- source4/param/param.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/param/param.h') diff --git a/source4/param/param.h b/source4/param/param.h index 5f5da58388..9b21acf726 100644 --- a/source4/param/param.h +++ b/source4/param/param.h @@ -57,7 +57,7 @@ enum announce_as {/* Types of machine we can announce as. */ ANNOUNCE_AS_NT_WORKSTATION=4 }; - +struct service; #include "param/proto.h" -- cgit From 2461a4f14b21ac741c6da62b68ab929336f0184d Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sat, 8 Sep 2007 17:25:24 +0000 Subject: r25037: Start passing the context around. (This used to be commit 88c72ac75fed673f7bfb65bf633f352f231c90a3) --- source4/param/param.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source4/param/param.h') diff --git a/source4/param/param.h b/source4/param/param.h index 9b21acf726..d5927f7dde 100644 --- a/source4/param/param.h +++ b/source4/param/param.h @@ -57,6 +57,7 @@ enum announce_as {/* Types of machine we can announce as. */ ANNOUNCE_AS_NT_WORKSTATION=4 }; +struct loadparm_context; struct service; #include "param/proto.h" -- cgit From 9fd1b1c130ad6886111df9bf3e3de86a64dea7f7 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sat, 8 Sep 2007 20:03:19 +0000 Subject: r25039: Rename service -> loadparm_service, use context more. (This used to be commit ab417cb32bd348c05b20707e73297df05c920079) --- source4/param/param.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/param/param.h') diff --git a/source4/param/param.h b/source4/param/param.h index d5927f7dde..22c32cb28f 100644 --- a/source4/param/param.h +++ b/source4/param/param.h @@ -58,7 +58,7 @@ enum announce_as {/* Types of machine we can announce as. */ }; struct loadparm_context; -struct service; +struct loadparm_service; #include "param/proto.h" -- cgit From 5e2f9cd8e223368d38d49cf60f199bbd818b8732 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Thu, 27 Sep 2007 19:49:53 +0000 Subject: r25379: Use loadparm context parameter in a lot more places. (This used to be commit 091961b13be665061c7e88ab4e2808c015bc403e) --- source4/param/param.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source4/param/param.h') diff --git a/source4/param/param.h b/source4/param/param.h index 22c32cb28f..caa5a763bb 100644 --- a/source4/param/param.h +++ b/source4/param/param.h @@ -62,4 +62,6 @@ struct loadparm_service; #include "param/proto.h" +extern struct loadparm_context *global_loadparm; + #endif /* _PARAM_H */ -- cgit From 30047a95432984c8c450b8a819b9f742bdedf66b Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Tue, 2 Oct 2007 13:00:33 +0000 Subject: r25460: use common structure in param/generic.c (This used to be commit 01ce5448f44ddda7ec864d812fe23f0fa68d1561) --- source4/param/param.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'source4/param/param.h') diff --git a/source4/param/param.h b/source4/param/param.h index caa5a763bb..1dd5950e31 100644 --- a/source4/param/param.h +++ b/source4/param/param.h @@ -20,21 +20,21 @@ #ifndef _PARAM_H /* _PARAM_H */ #define _PARAM_H -struct param_context { - struct param_section *sections; +struct param_opt { + struct param_opt *prev, *next; + char *key; + char *value; + int flags; }; -struct param { - const char *name; - char *value; - const char **list_value; - struct param *prev, *next; +struct param_context { + struct param_section *sections; }; struct param_section { const char *name; struct param_section *prev, *next; - struct param *parameters; + struct param_opt *parameters; }; struct param_context; -- cgit From 6357fb802a27b8160e263d32d0596f69186b81a7 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Wed, 21 Nov 2007 14:49:27 +0100 Subject: r26095: Add function for import a generic configuration file in a loadparm context. (This used to be commit d74018d05542582515a4d3cc995820667200b301) --- source4/param/param.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source4/param/param.h') diff --git a/source4/param/param.h b/source4/param/param.h index 1dd5950e31..210b21d9a0 100644 --- a/source4/param/param.h +++ b/source4/param/param.h @@ -63,5 +63,6 @@ struct loadparm_service; #include "param/proto.h" extern struct loadparm_context *global_loadparm; +extern struct loadparm_service sDefault; #endif /* _PARAM_H */ -- cgit From b440ed3df31b11d520c6d744cf53c54165f61b7a Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Thu, 6 Dec 2007 17:16:40 +0100 Subject: r26315: Avoid using lp_ functions in libcharset. (This used to be commit db6dd425e3526c04e96d778a736dbb5cf14ddc56) --- source4/param/param.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source4/param/param.h') diff --git a/source4/param/param.h b/source4/param/param.h index 210b21d9a0..db948d8f11 100644 --- a/source4/param/param.h +++ b/source4/param/param.h @@ -64,5 +64,6 @@ struct loadparm_service; extern struct loadparm_context *global_loadparm; extern struct loadparm_service sDefault; +extern struct smb_iconv_convenience *global_smb_iconv_convenience; #endif /* _PARAM_H */ -- cgit From 39ee38d9c1aabf4db065b433d067d0da053d7d61 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Thu, 6 Dec 2007 17:52:23 +0100 Subject: r26316: Use contexts for conversion functions. (This used to be commit f6420d933b5b011d428974f3a2a57edf19e6f482) --- source4/param/param.h | 1 - 1 file changed, 1 deletion(-) (limited to 'source4/param/param.h') diff --git a/source4/param/param.h b/source4/param/param.h index db948d8f11..210b21d9a0 100644 --- a/source4/param/param.h +++ b/source4/param/param.h @@ -64,6 +64,5 @@ struct loadparm_service; extern struct loadparm_context *global_loadparm; extern struct loadparm_service sDefault; -extern struct smb_iconv_convenience *global_smb_iconv_convenience; #endif /* _PARAM_H */ -- cgit From dcc282590b34537fc1ead61c3300172528273b44 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Thu, 3 Jan 2008 17:22:12 -0600 Subject: r26654: libcli/smb_composite: Rather than specifying each of the gazillion options for SMB individually, just specify the smbcli_options struct. (This used to be commit 8a97886e24a4b969aa91409c06f423b71a45f6eb) --- source4/param/param.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source4/param/param.h') diff --git a/source4/param/param.h b/source4/param/param.h index 210b21d9a0..098a73deec 100644 --- a/source4/param/param.h +++ b/source4/param/param.h @@ -59,6 +59,7 @@ enum announce_as {/* Types of machine we can announce as. */ struct loadparm_context; struct loadparm_service; +struct smbcli_options; #include "param/proto.h" -- cgit From 2ba62662f8e2578153be3125eb557b9349ccfd3b Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Thu, 28 Feb 2008 20:04:58 +0100 Subject: Remove sDefault as static variable. (This used to be commit 16f36ce499e93860dd535034a584ec2b93e7a172) --- source4/param/param.h | 1 - 1 file changed, 1 deletion(-) (limited to 'source4/param/param.h') diff --git a/source4/param/param.h b/source4/param/param.h index 098a73deec..84f864edaa 100644 --- a/source4/param/param.h +++ b/source4/param/param.h @@ -64,6 +64,5 @@ struct smbcli_options; #include "param/proto.h" extern struct loadparm_context *global_loadparm; -extern struct loadparm_service sDefault; #endif /* _PARAM_H */ -- cgit From afe3e8172ddaa5e4aa811faceecda4f943d6e2ef Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Wed, 2 Apr 2008 04:53:27 +0200 Subject: Install public header files again and include required prototypes. (This used to be commit 47ffbbf67435904754469544390b67d34c958343) --- source4/param/param.h | 361 +++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 360 insertions(+), 1 deletion(-) (limited to 'source4/param/param.h') diff --git a/source4/param/param.h b/source4/param/param.h index 84f864edaa..0b276cdff2 100644 --- a/source4/param/param.h +++ b/source4/param/param.h @@ -61,8 +61,367 @@ struct loadparm_context; struct loadparm_service; struct smbcli_options; -#include "param/proto.h" +void reload_charcnv(struct loadparm_context *lp_ctx); extern struct loadparm_context *global_loadparm; +struct loadparm_service *lp_default_service(struct loadparm_context *lp_ctx); +struct parm_struct *lp_parm_table(void); +int lp_server_role(struct loadparm_context *); +const char **lp_smb_ports(struct loadparm_context *); +int lp_nbt_port(struct loadparm_context *); +int lp_dgram_port(struct loadparm_context *); +int lp_cldap_port(struct loadparm_context *); +int lp_krb5_port(struct loadparm_context *); +int lp_kpasswd_port(struct loadparm_context *); +int lp_web_port(struct loadparm_context *); +const char *lp_swat_directory(struct loadparm_context *); +bool lp_tls_enabled(struct loadparm_context *); +const char *lp_tls_keyfile(struct loadparm_context *); +const char *lp_tls_certfile(struct loadparm_context *); +const char *lp_tls_cafile(struct loadparm_context *); +const char *lp_tls_crlfile(struct loadparm_context *); +const char *lp_tls_dhpfile(struct loadparm_context *); +const char *lp_share_backend(struct loadparm_context *); +const char *lp_sam_url(struct loadparm_context *); +const char *lp_idmap_url(struct loadparm_context *); +const char *lp_secrets_url(struct loadparm_context *); +const char *lp_spoolss_url(struct loadparm_context *); +const char *lp_wins_config_url(struct loadparm_context *); +const char *lp_wins_url(struct loadparm_context *); +const char *lp_winbind_separator(struct loadparm_context *); +const char *lp_winbindd_socket_directory(struct loadparm_context *); +const char *lp_template_shell(struct loadparm_context *); +const char *lp_template_homedir(struct loadparm_context *); +bool lp_winbind_sealed_pipes(struct loadparm_context *); +bool lp_idmap_trusted_only(struct loadparm_context *); +const char *lp_private_dir(struct loadparm_context *); +const char *lp_serverstring(struct loadparm_context *); +const char *lp_lockdir(struct loadparm_context *); +const char *lp_modulesdir(struct loadparm_context *); +const char *lp_setupdir(struct loadparm_context *); +const char *lp_ncalrpc_dir(struct loadparm_context *); +const char *lp_dos_charset(struct loadparm_context *); +const char *lp_unix_charset(struct loadparm_context *); +const char *lp_display_charset(struct loadparm_context *); +const char *lp_piddir(struct loadparm_context *); +const char **lp_dcerpc_endpoint_servers(struct loadparm_context *); +const char **lp_server_services(struct loadparm_context *); +const char *lp_ntptr_providor(struct loadparm_context *); +const char *lp_auto_services(struct loadparm_context *); +const char *lp_passwd_chat(struct loadparm_context *); +const char **lp_passwordserver(struct loadparm_context *); +const char **lp_name_resolve_order(struct loadparm_context *); +const char *lp_realm(struct loadparm_context *); +const char *lp_socket_options(struct loadparm_context *); +const char *lp_workgroup(struct loadparm_context *); +const char *lp_netbios_name(struct loadparm_context *); +const char *lp_netbios_scope(struct loadparm_context *); +const char **lp_wins_server_list(struct loadparm_context *); +const char **lp_interfaces(struct loadparm_context *); +const char *lp_socket_address(struct loadparm_context *); +const char **lp_netbios_aliases(struct loadparm_context *); +bool lp_disable_netbios(struct loadparm_context *); +bool lp_wins_support(struct loadparm_context *); +bool lp_wins_dns_proxy(struct loadparm_context *); +const char *lp_wins_hook(struct loadparm_context *); +bool lp_local_master(struct loadparm_context *); +bool lp_readraw(struct loadparm_context *); +bool lp_large_readwrite(struct loadparm_context *); +bool lp_writeraw(struct loadparm_context *); +bool lp_null_passwords(struct loadparm_context *); +bool lp_obey_pam_restrictions(struct loadparm_context *); +bool lp_encrypted_passwords(struct loadparm_context *); +bool lp_time_server(struct loadparm_context *); +bool lp_bind_interfaces_only(struct loadparm_context *); +bool lp_unicode(struct loadparm_context *); +bool lp_nt_status_support(struct loadparm_context *); +bool lp_lanman_auth(struct loadparm_context *); +bool lp_ntlm_auth(struct loadparm_context *); +bool lp_client_plaintext_auth(struct loadparm_context *); +bool lp_client_lanman_auth(struct loadparm_context *); +bool lp_client_ntlmv2_auth(struct loadparm_context *); +bool lp_client_use_spnego_principal(struct loadparm_context *); +bool lp_host_msdfs(struct loadparm_context *); +bool lp_unix_extensions(struct loadparm_context *); +bool lp_use_spnego(struct loadparm_context *); +bool lp_rpc_big_endian(struct loadparm_context *); +int lp_max_wins_ttl(struct loadparm_context *); +int lp_min_wins_ttl(struct loadparm_context *); +int lp_maxmux(struct loadparm_context *); +int lp_max_xmit(struct loadparm_context *); +int lp_passwordlevel(struct loadparm_context *); +int lp_srv_maxprotocol(struct loadparm_context *); +int lp_srv_minprotocol(struct loadparm_context *); +int lp_cli_maxprotocol(struct loadparm_context *); +int lp_cli_minprotocol(struct loadparm_context *); +int lp_security(struct loadparm_context *); +bool lp_paranoid_server_security(struct loadparm_context *); +int lp_announce_as(struct loadparm_context *); +const char **lp_js_include(struct loadparm_context *); + +const char *lp_servicename(const struct loadparm_service *service); +const char *lp_pathname(struct loadparm_service *, struct loadparm_service *); +const char **lp_hostsallow(struct loadparm_service *, struct loadparm_service *); +const char **lp_hostsdeny(struct loadparm_service *, struct loadparm_service *); +const char *lp_comment(struct loadparm_service *, struct loadparm_service *); +const char *lp_fstype(struct loadparm_service *, struct loadparm_service *); +const char **lp_ntvfs_handler(struct loadparm_service *, struct loadparm_service *); +bool lp_msdfs_root(struct loadparm_service *, struct loadparm_service *); +bool lp_browseable(struct loadparm_service *, struct loadparm_service *); +bool lp_readonly(struct loadparm_service *, struct loadparm_service *); +bool lp_print_ok(struct loadparm_service *, struct loadparm_service *); +bool lp_map_hidden(struct loadparm_service *, struct loadparm_service *); +bool lp_map_archive(struct loadparm_service *, struct loadparm_service *); +bool lp_strict_locking(struct loadparm_service *, struct loadparm_service *); +bool lp_oplocks(struct loadparm_service *, struct loadparm_service *); +bool lp_strict_sync(struct loadparm_service *, struct loadparm_service *); +bool lp_ci_filesystem(struct loadparm_service *, struct loadparm_service *); +bool lp_map_system(struct loadparm_service *, struct loadparm_service *); +int lp_max_connections(struct loadparm_service *, struct loadparm_service *); +int lp_csc_policy(struct loadparm_service *, struct loadparm_service *); +int lp_create_mask(struct loadparm_service *, struct loadparm_service *); +int lp_force_create_mode(struct loadparm_service *, struct loadparm_service *); +int lp_dir_mask(struct loadparm_service *, struct loadparm_service *); +int lp_force_dir_mode(struct loadparm_service *, struct loadparm_service *); +int lp_server_signing(struct loadparm_context *); +int lp_client_signing(struct loadparm_context *); +const char *lp_get_parametric(struct loadparm_context *lp_ctx, + struct loadparm_service *service, + const char *type, const char *option); + +const char *lp_parm_string(struct loadparm_context *lp_ctx, + struct loadparm_service *service, const char *type, + const char *option); +const char **lp_parm_string_list(TALLOC_CTX *mem_ctx, + struct loadparm_context *lp_ctx, + struct loadparm_service *service, + const char *type, + const char *option, const char *separator); +int lp_parm_int(struct loadparm_context *lp_ctx, + struct loadparm_service *service, const char *type, + const char *option, int default_v); +int lp_parm_bytes(struct loadparm_context *lp_ctx, + struct loadparm_service *service, const char *type, + const char *option, int default_v); +unsigned long lp_parm_ulong(struct loadparm_context *lp_ctx, + struct loadparm_service *service, const char *type, + const char *option, unsigned long default_v); +double lp_parm_double(struct loadparm_context *lp_ctx, + struct loadparm_service *service, const char *type, + const char *option, double default_v); +bool lp_parm_bool(struct loadparm_context *lp_ctx, + struct loadparm_service *service, const char *type, + const char *option, bool default_v); +struct loadparm_service *lp_add_service(struct loadparm_context *lp_ctx, + const struct loadparm_service *pservice, + const char *name); +bool lp_add_home(struct loadparm_context *lp_ctx, + const char *pszHomename, + struct loadparm_service *default_service, + const char *user, const char *pszHomedir); +bool lp_add_printer(struct loadparm_context *lp_ctx, + const char *pszPrintername, + struct loadparm_service *default_service); +struct parm_struct *lp_parm_struct(const char *name); +void *lp_parm_ptr(struct loadparm_context *lp_ctx, + struct loadparm_service *service, struct parm_struct *parm); +bool lp_file_list_changed(struct loadparm_context *lp_ctx); + +bool lp_do_global_parameter(struct loadparm_context *lp_ctx, + const char *pszParmName, const char *pszParmValue); +bool lp_do_service_parameter(struct loadparm_context *lp_ctx, + struct loadparm_service *service, + const char *pszParmName, const char *pszParmValue); + +/** + * Process a parameter. + */ +bool lp_do_global_parameter_var(struct loadparm_context *lp_ctx, + const char *pszParmName, const char *fmt, ...); +bool lp_set_cmdline(struct loadparm_context *lp_ctx, const char *pszParmName, + const char *pszParmValue); +bool lp_set_option(struct loadparm_context *lp_ctx, const char *option); + +/** + * Display the contents of a single services record. + */ +bool lp_dump_a_parameter(struct loadparm_context *lp_ctx, + struct loadparm_service *service, + const char *parm_name, FILE * f); + +/** + * Return info about the next service in a service. snum==-1 gives the globals. + * Return NULL when out of parameters. + */ +struct parm_struct *lp_next_parameter(struct loadparm_context *lp_ctx, int snum, int *i, + int allparameters); + +/** + * Unload unused services. + */ +void lp_killunused(struct loadparm_context *lp_ctx, + struct smbsrv_connection *smb, + bool (*snumused) (struct smbsrv_connection *, int)); + +/** + * Initialise the global parameter structure. + */ +struct loadparm_context *loadparm_init(TALLOC_CTX *mem_ctx); +const char *lp_configfile(struct loadparm_context *lp_ctx); +bool lp_load_default(struct loadparm_context *lp_ctx); + +/** + * Load the services array from the services file. + * + * Return True on success, False on failure. + */ +bool lp_load(struct loadparm_context *lp_ctx, const char *filename); + +/** + * Return the max number of services. + */ +int lp_numservices(struct loadparm_context *lp_ctx); + +/** + * Display the contents of the services array in human-readable form. + */ +void lp_dump(struct loadparm_context *lp_ctx, FILE *f, bool show_defaults, + int maxtoprint); + +/** + * Display the contents of one service in human-readable form. + */ +void lp_dump_one(FILE *f, bool show_defaults, struct loadparm_service *service, struct loadparm_service *sDefault); +struct loadparm_service *lp_servicebynum(struct loadparm_context *lp_ctx, + int snum); +struct loadparm_service *lp_service(struct loadparm_context *lp_ctx, + const char *service_name); + +/** + * A useful volume label function. + */ +const char *volume_label(struct loadparm_service *service, struct loadparm_service *sDefault); + +/** + * If we are PDC then prefer us as DMB + */ +const char *lp_printername(struct loadparm_service *service, struct loadparm_service *sDefault); + +/** + * Return the max print jobs per queue. + */ +int lp_maxprintjobs(struct loadparm_service *service, struct loadparm_service *sDefault); +struct smb_iconv_convenience *lp_iconv_convenience(struct loadparm_context *lp_ctx); +void lp_smbcli_options(struct loadparm_context *lp_ctx, + struct smbcli_options *options); + +/* The following definitions come from param/generic.c */ + +struct param_section *param_get_section(struct param_context *ctx, const char *name); +struct param_opt *param_section_get(struct param_section *section, + const char *name); +struct param_opt *param_get (struct param_context *ctx, const char *name, const char *section_name); +struct param_section *param_add_section(struct param_context *ctx, const char *section_name); +struct param_opt *param_get_add(struct param_context *ctx, const char *name, const char *section_name); +const char *param_get_string(struct param_context *ctx, const char *param, const char *section); +int param_set_string(struct param_context *ctx, const char *param, const char *value, const char *section); +const char **param_get_string_list(struct param_context *ctx, const char *param, const char *separator, const char *section); +int param_set_string_list(struct param_context *ctx, const char *param, const char **list, const char *section); +int param_get_int(struct param_context *ctx, const char *param, int default_v, const char *section); +void param_set_int(struct param_context *ctx, const char *param, int value, const char *section); +unsigned long param_get_ulong(struct param_context *ctx, const char *param, unsigned long default_v, const char *section); +void param_set_ulong(struct param_context *ctx, const char *name, unsigned long value, const char *section); +struct param_context *param_init(TALLOC_CTX *mem_ctx); +int param_read(struct param_context *ctx, const char *fn); +int param_use(struct loadparm_context *lp_ctx, struct param_context *ctx); +int param_write(struct param_context *ctx, const char *fn); + +/* The following definitions come from param/util.c */ + + +/** + * @file + * @brief Misc utility functions + */ +bool lp_is_mydomain(struct loadparm_context *lp_ctx, + const char *domain); + +/** + see if a string matches either our primary or one of our secondary + netbios aliases. do a case insensitive match +*/ +bool lp_is_myname(struct loadparm_context *lp_ctx, const char *name); + +/** + A useful function for returning a path in the Samba lock directory. +**/ +char *lock_path(TALLOC_CTX* mem_ctx, struct loadparm_context *lp_ctx, + const char *name); + +/** + * @brief Returns an absolute path to a file in the directory containing the current config file + * + * @param name File to find, relative to the config file directory. + * + * @retval Pointer to a talloc'ed string containing the full path. + **/ +char *config_path(TALLOC_CTX* mem_ctx, struct loadparm_context *lp_ctx, + const char *name); + +/** + * @brief Returns an absolute path to a file in the Samba private directory. + * + * @param name File to find, relative to PRIVATEDIR. + * if name is not relative, then use it as-is + * + * @retval Pointer to a talloc'ed string containing the full path. + **/ +char *private_path(TALLOC_CTX* mem_ctx, + struct loadparm_context *lp_ctx, + const char *name); + +/** + return a path in the smbd.tmp directory, where all temporary file + for smbd go. If NULL is passed for name then return the directory + path itself +*/ +char *smbd_tmp_path(TALLOC_CTX *mem_ctx, + struct loadparm_context *lp_ctx, + const char *name); + +/** + * Obtain the init function from a shared library file + */ +init_module_fn load_module(TALLOC_CTX *mem_ctx, const char *path); + +/** + * Obtain list of init functions from the modules in the specified + * directory + */ +init_module_fn *load_modules(TALLOC_CTX *mem_ctx, const char *path); + +/** + * Run the specified init functions. + * + * @return true if all functions ran successfully, false otherwise + */ +bool run_init_functions(init_module_fn *fns); + +/** + * Load the initialization functions from DSO files for a specific subsystem. + * + * Will return an array of function pointers to initialization functions + */ +init_module_fn *load_samba_modules(TALLOC_CTX *mem_ctx, struct loadparm_context *lp_ctx, const char *subsystem); +const char *lp_messaging_path(TALLOC_CTX *mem_ctx, + struct loadparm_context *lp_ctx); +struct smb_iconv_convenience *smb_iconv_convenience_init_lp(TALLOC_CTX *mem_ctx, + struct loadparm_context *lp_ctx); + +/* The following definitions come from lib/version.c */ + +const char *samba_version_string(void); + + #endif /* _PARAM_H */ -- cgit From b9213316c77ab340fe02c9784f63a2f7d79cb492 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Thu, 29 May 2008 15:20:58 +1000 Subject: Allow the ntp_signd socket to be set from configure. This will allow distributions to hard-code this path, particularly for selinux, and matches how we handle the winbind socket dir. Andrew Bartlett (This used to be commit c8b441650400ed1b24c89991f5752dad3c87795f) --- source4/param/param.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source4/param/param.h') diff --git a/source4/param/param.h b/source4/param/param.h index 0b276cdff2..06a42575ad 100644 --- a/source4/param/param.h +++ b/source4/param/param.h @@ -186,6 +186,8 @@ int lp_dir_mask(struct loadparm_service *, struct loadparm_service *); int lp_force_dir_mode(struct loadparm_service *, struct loadparm_service *); int lp_server_signing(struct loadparm_context *); int lp_client_signing(struct loadparm_context *); +const char *lp_ntp_signd_socket_directory(struct loadparm_context *); + const char *lp_get_parametric(struct loadparm_context *lp_ctx, struct loadparm_service *service, const char *type, const char *option); -- cgit From 234413fbd9664dc217ed8c029be33fc7aa260d3a Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Sat, 28 Jun 2008 22:02:19 +1000 Subject: Use a configure-specified directory for the winbind priv pipe This makes it easier for RPMs to specify an group for access to that directory. Andrew Bartlett (This used to be commit fa361354433fb9a5c09c84997a7c51f3052c294e) --- source4/param/param.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source4/param/param.h') diff --git a/source4/param/param.h b/source4/param/param.h index 06a42575ad..4ed2654692 100644 --- a/source4/param/param.h +++ b/source4/param/param.h @@ -91,6 +91,7 @@ const char *lp_wins_config_url(struct loadparm_context *); const char *lp_wins_url(struct loadparm_context *); const char *lp_winbind_separator(struct loadparm_context *); const char *lp_winbindd_socket_directory(struct loadparm_context *); +const char *lp_winbindd_privileged_socket_directory(struct loadparm_context *); const char *lp_template_shell(struct loadparm_context *); const char *lp_template_homedir(struct loadparm_context *); bool lp_winbind_sealed_pipes(struct loadparm_context *); -- cgit