[SCM] Samba Shared Repository - branch master updated

Stefan Metzmacher metze at samba.org
Wed Oct 16 03:40:02 MDT 2013


The branch, master has been updated
       via  aca475b lib/param: Add documentation on how loadparm works
       via  361b51c proto: Remove manually written lp_ prototypes
       via  033dc77 param: Autogenerate s3 lp_ctx glue table
       via  651cf89 s3/param: Autogenerate parameters prototypes again after proto.h was frozen
       via  22ca040 param: Skip generating hooks for local and string parameters
       via  d711a01 lib/param: Do not attempt to access the s3 function for allocated and subbed string parameters
       via  6ac33b7 build: Move loadparm-related build rules to source3/param/wscript_build
       via  785e8d8 lib/param: lp_magicchar takes a const struct share_params *p so should be FN_LOCAL_PARM_CHAR
      from  a4c3553 Add NetWkstaGetInfo.

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit aca475b6bcbe364d09b83d17bf0504741ed3a84a
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Wed Oct 16 14:45:31 2013 +1300

    lib/param: Add documentation on how loadparm works
    
    Signed-off-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Volker Lendecke <vl at samba.org>
    
    Autobuild-User(master): Stefan Metzmacher <metze at samba.org>
    Autobuild-Date(master): Wed Oct 16 11:39:41 CEST 2013 on sn-devel-104

commit 361b51c13d9bff70748c47a727cfd7ea94b6728e
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Mon Oct 14 15:49:25 2013 +1300

    proto: Remove manually written lp_ prototypes
    
    This also ensures we remove prototypes from parameters we remove or
    rename, and easily see how many special cases we have left.
    
    Signed-off-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Stefan Metzmacher <metze at samba.org>

commit 033dc776de81b9674735f1ac0ed4085503068e60
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Mon Oct 14 15:46:43 2013 +1300

    param: Autogenerate s3 lp_ctx glue table
    
    This allows us to use more lpcfg_ functions without adding them
    manually.
    
    Signed-off-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Stefan Metzmacher <metze at samba.org>

commit 651cf893903147cf6d3f1ccb6432c2661cdc36c5
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Mon Oct 14 15:39:10 2013 +1300

    s3/param: Autogenerate parameters prototypes again after proto.h was frozen
    
    This autogenerates the parameters so that we can keep everything in sync easier,
    particularly when adding new parameters.  This will also make it easier to move
    to a fully autogenerated system in the future, as it reduces special cases.
    
    Andrew Bartlett
    
    Signed-off-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Stefan Metzmacher <metze at samba.org>

commit 22ca0404fc973a6f716f76e7b4bbfa4656f33ab3
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Mon Oct 14 15:36:18 2013 +1300

    param: Skip generating hooks for local and string parameters
    
    Signed-off-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Stefan Metzmacher <metze at samba.org>

commit d711a011448718e055ffa2af3470f0d961234cd3
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Mon Oct 14 15:34:40 2013 +1300

    lib/param: Do not attempt to access the s3 function for allocated and subbed string parameters
    
    This allows us not to generate array entries for these, which in turn allows
    us to avoid initialising them.  The issue is that we do not have the
    % macro sub context nor a talloc context handy (yet).
    
    Andrew Bartlett
    
    Signed-off-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Stefan Metzmacher <metze at samba.org>

commit 6ac33b7f2ec574af356e5286831952519026246e
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Mon Oct 14 13:47:27 2013 +1300

    build: Move loadparm-related build rules to source3/param/wscript_build
    
    Signed-off-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Stefan Metzmacher <metze at samba.org>

commit 785e8d8c326eeb5f76b41584cf7ca86bee9feab4
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Mon Oct 14 15:33:20 2013 +1300

    lib/param: lp_magicchar takes a const struct share_params *p so should be FN_LOCAL_PARM_CHAR
    
    This was found when trying to autogenerate prototypes for lp_ functions again.
    
    Andrew Bartlett
    
    Signed-off-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Stefan Metzmacher <metze at samba.org>

-----------------------------------------------------------------------

Summary of changes:
 lib/param/README                            |   69 +++++
 lib/param/loadparm.c                        |   23 +-
 lib/param/param_functions.c                 |    2 +-
 lib/param/wscript_build                     |    1 +
 script/mks3param.pl                         |    9 +-
 script/mks3param_ctx_table.pl               |  139 ++++++++++
 script/{mks3param.pl => mks3param_proto.pl} |   91 ++++---
 source3/include/proto.h                     |  362 +--------------------------
 source3/param/loadparm.c                    |    2 +-
 source3/param/loadparm_ctx.c                |   64 +-----
 source3/param/wscript_build                 |   42 +++
 source3/wscript_build                       |   34 +---
 12 files changed, 330 insertions(+), 508 deletions(-)
 create mode 100644 script/mks3param_ctx_table.pl
 copy script/{mks3param.pl => mks3param_proto.pl} (65%)
 create mode 100644 source3/param/wscript_build


Changeset truncated at 500 lines:

diff --git a/lib/param/README b/lib/param/README
index 403a217..b567d71 100644
--- a/lib/param/README
+++ b/lib/param/README
@@ -1,4 +1,73 @@
+libsamba-hostconfig
+-------------------
+
 This directory contains "libsamba-hostconfig". 
 
 The libsamba-hostconfig library provides access to all host-wide configuration
 such as the configured shares, default parameter values and host secret keys.
+
+
+Adding a parameter
+------------------
+
+To add or change an smb.conf option, you only have to modify
+lib/param/param_table.c and lib/param/param_functions.c.  The rest is
+generated for you.
+
+
+Using smb.conf parameters in the code
+-------------------------------------
+
+Call the lpcfg_*() function.  To get the lp_ctx, have the caller pass
+it to you.  To get a lp_ctx for the source3/param loadparm system, use:
+
+struct loadparm_context *lp_ctx = loadparm_init_s3(tmp_ctx, loadparm_s3_helpers());
+
+Remember to talloc_unlink(tmp_ctx, lp_ctx) the result when you are done!
+
+To get a lp_ctx for the lib/param loadparm system, typically the
+pointer is already set up by popt at startup, and is passed down from
+cmdline_lp_ctx.
+
+In pure source3/ code, you may use lp_*() functions, but are
+encouraged to use the lpcfg_*() functions so that code can be made
+common.
+
+
+How does loadparm_init_s3() work?
+---------------------------------
+
+loadparm_s3_helpers() returns a initialised table of function
+pointers, pointing at all global lp_*() functions, except for those
+that return substituted strings (% macros).  The lpcfg_*() function
+then calls this plugged in function, allowing the one function and
+pattern to use either loadparm system.
+
+
+There is a lot of generated code, here, what generates what?
+------------------------------------------------------------
+
+The regular format of the CPP macros in param_functions.c is used to
+generate up the prototypes (mkproto.pl, mks3param_proto.pl), the service
+and globals table (mkparamdefs.pl), the glue table (mmks3param.pl) and
+the initilisation of the glue table (mks3param_ctx_table.pl).
+
+I have tried combining some of these, but it just makes the scripts more
+complex.
+
+The CPP macros are defined in and expand in lib/param/loadparm.c and
+source3/param/loadparm.c to read the values from the generated
+stuctures.  They are CPP #included into these files so that the same
+macro has two definitions, depending on the system it is loading into.
+
+
+Why was this done, rather than a 'proper' fix, or just using one system or the other?
+-------------------------------------------------------------------------------------
+
+This was done to allow merging from both ends - merging more parts of
+the loadparm handling, and merging code that needs to read the
+smb.conf, without having to do it all at once.  Ideally
+param_functions.c would be generated from param_table.c or (even
+better) our XML manpage source, and the CPP macros would instead be
+generated expanded as generated C files, but this is a task nobody has
+taken on yet.
diff --git a/lib/param/loadparm.c b/lib/param/loadparm.c
index fc209a7..71f62ed 100644
--- a/lib/param/loadparm.c
+++ b/lib/param/loadparm.c
@@ -232,7 +232,16 @@ static struct loadparm_context *global_loadparm_context;
 #define lpcfg_default_service global_loadparm_context->sDefault
 #define lpcfg_global_service(i) global_loadparm_context->services[i]
 
-#define FN_GLOBAL_STRING(fn_name,var_name)				\
+#define FN_GLOBAL_STRING(fn_name,var_name) \
+ _PUBLIC_ const char *lpcfg_ ## fn_name(struct loadparm_context *lp_ctx) {\
+	 if (lp_ctx == NULL) return NULL;				\
+	 if (lp_ctx->s3_fns) {						\
+	         smb_panic( __location__ ": " #fn_name " not implemented because it is an allocated and substiuted string"); \
+	 }								\
+	 return lp_ctx->globals->var_name ? lp_string(lp_ctx->globals->var_name) : ""; \
+}
+
+#define FN_GLOBAL_CONST_STRING(fn_name,var_name)				\
  _PUBLIC_ const char *lpcfg_ ## fn_name(struct loadparm_context *lp_ctx) { \
 	if (lp_ctx == NULL) return NULL;				\
 	if (lp_ctx->s3_fns) {						\
@@ -242,16 +251,6 @@ static struct loadparm_context *global_loadparm_context;
 	return lp_ctx->globals->var_name ? lp_string(lp_ctx->globals->var_name) : ""; \
 }
 
-#define FN_GLOBAL_CONST_STRING(fn_name,var_name) \
- _PUBLIC_ const char *lpcfg_ ## fn_name(struct loadparm_context *lp_ctx) {\
-	 if (lp_ctx == NULL) return NULL;				\
-	 if (lp_ctx->s3_fns) {						\
-		 SMB_ASSERT(lp_ctx->s3_fns->fn_name);			\
-		 return lp_ctx->s3_fns->fn_name();			\
-	 }								\
-	 return lp_ctx->globals->var_name ? lp_string(lp_ctx->globals->var_name) : ""; \
- }
-
 #define FN_GLOBAL_LIST(fn_name,var_name)				\
  _PUBLIC_ const char **lpcfg_ ## fn_name(struct loadparm_context *lp_ctx) { \
 	 if (lp_ctx == NULL) return NULL;				\
@@ -314,7 +313,7 @@ static struct loadparm_context *global_loadparm_context;
 
 #define FN_LOCAL_PARM_INTEGER(fn_name, val) FN_LOCAL_INTEGER(fn_name, val)
 
-#define FN_LOCAL_CHAR(fn_name,val) \
+#define FN_LOCAL_PARM_CHAR(fn_name,val) \
  _PUBLIC_ char lpcfg_ ## fn_name(struct loadparm_service *service, \
 				struct loadparm_service *sDefault) {	\
 	 return((service != NULL)? service->val : sDefault->val); \
diff --git a/lib/param/param_functions.c b/lib/param/param_functions.c
index 61f0044..c4071c9 100644
--- a/lib/param/param_functions.c
+++ b/lib/param/param_functions.c
@@ -147,7 +147,7 @@ FN_LOCAL_INTEGER(aio_write_size, iAioWriteSize)
 FN_LOCAL_INTEGER(map_readonly, iMap_readonly)
 FN_LOCAL_INTEGER(directory_name_cache_size, iDirectoryNameCacheSize)
 FN_LOCAL_INTEGER(smb_encrypt, ismb_encrypt)
-FN_LOCAL_CHAR(magicchar, magic_char)
+FN_LOCAL_PARM_CHAR(magicchar, magic_char)
 FN_LOCAL_STRING(cups_options, szCupsOptions)
 FN_LOCAL_PARM_BOOL(change_notify, bChangeNotify)
 FN_LOCAL_PARM_BOOL(kernel_change_notify, bKernelChangeNotify)
diff --git a/lib/param/wscript_build b/lib/param/wscript_build
index 10e05a3..0e1a2e0 100644
--- a/lib/param/wscript_build
+++ b/lib/param/wscript_build
@@ -11,6 +11,7 @@ bld.SAMBA_GENERATOR('s3_param_h',
                     target='s3_param.h',
                     rule='${PERL} ${SRC[0].abspath(env)} ${SRC[1].abspath(env)} ${SRC[2].abspath(env)} --file ${TGT}')
 
+
 bld.SAMBA_GENERATOR('param_global_h',
                     source= '../../script/mkparamdefs.pl loadparm.c param_functions.c',
                     target='param_global.h',
diff --git a/script/mks3param.pl b/script/mks3param.pl
index 4222ca5..799958c 100644
--- a/script/mks3param.pl
+++ b/script/mks3param.pl
@@ -108,7 +108,14 @@ sub handle_loadparm($$)
 {
 	my ($file,$line) = @_;
 
-	if ($line =~ /^FN_(GLOBAL|LOCAL)_(CONST_STRING|STRING|BOOL|bool|CHAR|INTEGER|LIST)\((\w+),.*\)/o) {
+	# Local parameters don't need the ->s3_fns because the struct
+	# loadparm_service is shared and lpcfg_service() checks the ->s3_fns
+	# hook
+	#
+	# STRING isn't handled as we do not yet have a way to pass in a memory context nor
+	# do we have a good way of dealing with the % macros yet.
+
+	if ($line =~ /^FN_(GLOBAL)_(CONST_STRING|BOOL|bool|CHAR|INTEGER|LIST)\((\w+),.*\)/o) {
 		my $scope = $1;
 		my $type = $2;
 		my $name = $3;
diff --git a/script/mks3param_ctx_table.pl b/script/mks3param_ctx_table.pl
new file mode 100644
index 0000000..cfd6e02
--- /dev/null
+++ b/script/mks3param_ctx_table.pl
@@ -0,0 +1,139 @@
+#!/usr/bin/perl
+# Generate loadparm interfaces tables for Samba3/Samba4 integration
+# by Andrew Bartlett
+# based on mkproto.pl Written by Jelmer Vernooij
+# based on the original mkproto.sh by Andrew Tridgell
+
+use strict;
+
+# don't use warnings module as it is not portable enough
+# use warnings;
+
+use Getopt::Long;
+use File::Basename;
+use File::Path;
+
+#####################################################################
+# read a file into a string
+
+my $file = undef;
+my $public_define = undef;
+my $_public = "";
+my $_private = "";
+my $public_data = \$_public;
+my $builddir = ".";
+my $srcdir = ".";
+
+sub public($)
+{
+	my ($d) = @_;
+	$$public_data .= $d;
+}
+
+sub usage()
+{
+	print "Usage: mks3param.pl [options] [c files]\n";
+	print "OPTIONS:\n";
+	print "  --srcdir=path          Read files relative to this directory\n";
+	print "  --builddir=path        Write file relative to this directory\n";
+	print "  --help                 Print this help message\n\n";
+	exit 0;
+}
+
+GetOptions(
+	'file=s' => sub { my ($f,$v) = @_; $file = $v; },
+	'srcdir=s' => sub { my ($f,$v) = @_; $srcdir = $v; },
+	'builddir=s' => sub { my ($f,$v) = @_; $builddir = $v; },
+	'help' => \&usage
+) or exit(1);
+
+sub file_load($)
+{
+    my($filename) = @_;
+    local(*INPUTFILE);
+    open(INPUTFILE, $filename) or return undef;
+    my($saved_delim) = $/;
+    undef $/;
+    my($data) = <INPUTFILE>;
+    close(INPUTFILE);
+    $/ = $saved_delim;
+    return $data;
+}
+
+sub print_header($)
+{
+	my ($file) = @_;
+	$file->("/* This file was automatically generated by mks3param_ctx.pl. DO NOT EDIT */\n\n");
+	$file->("static const struct loadparm_s3_helpers s3_fns = \n");
+	$file->("{\n");
+	$file->("\t.get_parametric = lp_parm_const_string_service,\n");
+	$file->("\t.get_parm_struct = lp_get_parameter,\n");
+	$file->("\t.get_parm_ptr = lp_parm_ptr,\n");
+	$file->("\t.get_service = lp_service_for_s4_ctx,\n");
+	$file->("\t.get_servicebynum = lp_servicebynum_for_s4_ctx,\n");
+	$file->("\t.get_default_loadparm_service = lp_default_loadparm_service,\n");
+	$file->("\t.get_numservices = lp_numservices,\n");
+	$file->("\t.load = lp_load_for_s4_ctx,\n");
+	$file->("\t.set_cmdline = lp_set_cmdline,\n");
+	$file->("\t.dump = lp_dump,\n");
+}
+
+sub print_footer($)
+{
+	my ($file) = @_;
+	$file->("};");
+}
+
+sub handle_loadparm($$)
+{
+	my ($file,$line) = @_;
+
+	# STRING isn't handled here, as we still don't know what to do with the substituted vars */
+	# LOCAL also isn't handled here
+	if ($line =~ /^FN_(GLOBAL)_(CONST_STRING|BOOL|bool|CHAR|INTEGER|LIST)\((\w+),.*\)/o) {
+		my $scope = $1;
+		my $type = $2;
+		my $name = $3;
+
+		$file->(".$name = lp_$name,\n");
+	}
+}
+
+sub process_file($$)
+{
+	my ($file, $filename) = @_;
+
+	$filename =~ s/\.o$/\.c/g;
+
+	if ($filename =~ /^\//) {
+		open(FH, "<$filename") or die("Failed to open $filename");
+	} elsif (!open(FH, "< $builddir/$filename")) {
+	    open(FH, "< $srcdir/$filename") || die "Failed to open $filename";
+	}
+
+	my $comment = undef;
+	my $incomment = 0;
+	while (my $line = <FH>) {
+		if ($line =~ /^FN_/) {
+			handle_loadparm($file, $line);
+		}
+		next;
+	}
+
+	close(FH);
+}
+
+
+print_header(\&public);
+
+process_file(\&public, $_) foreach (@ARGV);
+print_footer(\&public);
+
+if (not defined($file)) {
+	print STDOUT $$public_data;
+}
+
+mkpath(dirname($file), 0, 0755);
+open(PUBLIC, ">$file") or die("Can't open `$file': $!");
+print PUBLIC "$$public_data";
+close(PUBLIC);
diff --git a/script/mks3param.pl b/script/mks3param_proto.pl
similarity index 65%
copy from script/mks3param.pl
copy to script/mks3param_proto.pl
index 4222ca5..446e343 100644
--- a/script/mks3param.pl
+++ b/script/mks3param_proto.pl
@@ -56,7 +56,7 @@ sub normalize_define($$)
 		$define =~ tr{./}{__};
 		$define =~ tr{\-}{_};
 	} elsif (not defined($define)) {
-		$define = '_S3_PARAM_H_';
+		$define = '_S3_PARAM_PROTO_H_';
 	}
 
 	return $define;
@@ -82,51 +82,65 @@ sub print_header($$)
 	my ($file, $header_name) = @_;
 	$file->("#ifndef $header_name\n");
 	$file->("#define $header_name\n\n");
-	$file->("/* This file was automatically generated by mks3param.pl. DO NOT EDIT */\n\n");
-	$file->("struct loadparm_s3_helpers\n");
-	$file->("{\n");
-	$file->("\tconst char * (*get_parametric)(struct loadparm_service *, const char *type, const char *option);\n");
-	$file->("\tstruct parm_struct * (*get_parm_struct)(const char *param_name);\n");
-	$file->("\tvoid * (*get_parm_ptr)(struct loadparm_service *service, struct parm_struct *parm);\n");
-	$file->("\tstruct loadparm_service * (*get_service)(const char *service_name);\n");
-	$file->("\tstruct loadparm_service * (*get_default_loadparm_service)(void);\n");
-	$file->("\tstruct loadparm_service * (*get_servicebynum)(int snum);\n");
-	$file->("\tint (*get_numservices)(void);\n");
-	$file->("\tbool (*load)(const char *filename);\n");
-	$file->("\tbool (*set_cmdline)(const char *pszParmName, const char *pszParmValue);\n");
-	$file->("\tvoid (*dump)(FILE *f, bool show_defaults, int maxtoprint);\n");
+	$file->("/* This file was automatically generated by mks3param_proto.pl. DO NOT EDIT */\n\n");
 }
 
-sub print_footer($$) 
+sub print_footer($$)
 {
 	my ($file, $header_name) = @_;
-	$file->("};");
 	$file->("\n#endif /* $header_name */\n\n");
 }
 
-sub handle_loadparm($$) 
+sub handle_loadparm($$)
 {
 	my ($file,$line) = @_;
 
-	if ($line =~ /^FN_(GLOBAL|LOCAL)_(CONST_STRING|STRING|BOOL|bool|CHAR|INTEGER|LIST)\((\w+),.*\)/o) {
-		my $scope = $1;
-		my $type = $2;
-		my $name = $3;
-
-		my %tmap = (
-			    "BOOL" => "bool ",
-			    "CONST_STRING" => "const char *",
-			    "STRING" => "const char *",
-			    "INTEGER" => "int ",
-			    "CHAR" => "char ",
-			    "LIST" => "const char **",
-			    );
-
-		$file->("\t$tmap{$type} (*$name)(void);\n");
+	my $scope;
+	my $type;
+	my $name;
+	my $var;
+	my $param;
+
+	if ($line =~ /^FN_(GLOBAL|LOCAL)_(CONST_STRING|STRING|BOOL|bool|CHAR|INTEGER|LIST)\((\w+),(.*)\)/o) {
+		$scope = $1;
+		$type = $2;
+		$name = $3;
+		$var = $4;
+		$param = "int";
+	} elsif ($line =~ /^FN_(GLOBAL|LOCAL)_PARM_(CONST_STRING|STRING|BOOL|bool|CHAR|INTEGER|LIST)\((\w+),(.*)\)/o) {
+		$scope = $1;
+		$type = $2;
+		$name = $3;
+		$var = $4;
+		$param = "const struct share_params *p";
+	} else {
+	        return;
+	}
+
+	my %tmap = (
+	        "BOOL" => "bool ",
+	        "CONST_STRING" => "const char *",
+	        "STRING" => "char *",
+	        "INTEGER" => "int ",
+	        "CHAR" => "char ",
+	        "LIST" => "const char **",
+	);
+
+	my %smap = (
+	        "GLOBAL" => "void",
+	        "LOCAL" => "$param"
+	        );
+
+	if (($type eq "STRING") and ($scope eq "GLOBAL")) {
+	    $file->("$tmap{$type}lp_$name(TALLOC_CTX *ctx);\n");
+	} elsif (($type eq "STRING") and ($scope eq "LOCAL")) {
+	    $file->("$tmap{$type}lp_$name(TALLOC_CTX *ctx, $smap{$scope});\n");
+	} else {
+	    $file->("$tmap{$type}lp_$name($smap{$scope});\n");
 	}
 }
 
-sub process_file($$) 
+sub process_file($$)
 {
 	my ($file, $filename) = @_;
 
@@ -140,8 +154,8 @@ sub process_file($$)
 
 	my $comment = undef;
 	my $incomment = 0;
-	while (my $line = <FH>) {	      
-		if ($line =~ /^\/\*\*/) { 
+	while (my $line = <FH>) {
+		if ($line =~ /^\/\*\*/) {
 			$comment = "";
 			$incomment = 1;
 		}
@@ -151,11 +165,11 @@ sub process_file($$)
 			if ($line =~ /\*\//) {
 				$incomment = 0;
 			}
-		} 
+		}
 
 		# these are ordered for maximum speed
 		next if ($line =~ /^\s/);
-	      
+
 		next unless ($line =~ /\(/);
 
 		next if ($line =~ /^\/|[;]/);
@@ -180,7 +194,6 @@ if (not defined($file)) {
 }
 
 mkpath(dirname($file), 0, 0755);
-open(PUBLIC, ">$file") or die("Can't open `$file': $!"); 
+open(PUBLIC, ">$file") or die("Can't open `$file': $!");
 print PUBLIC "$$public_data";
 close(PUBLIC);
-
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 9612a07..1f14362 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -984,378 +984,22 @@ NTSTATUS change_trust_account_password( const char *domain, const char *remote_m
 
 /* The following definitions come from param/loadparm.c  */
 
-const char **lp_smb_ports(void);
-const char *lp_dos_charset(void);
-const char *lp_unix_charset(void);
-char *lp_logfile(TALLOC_CTX *ctx);
-char *lp_configfile(TALLOC_CTX *ctx);
-const char *lp_smb_passwd_file(void);
-const char *lp_private_dir(void);
-char *lp_serverstring(TALLOC_CTX *ctx);
-int lp_printcap_cache_time(void);
-char *lp_addport_cmd(TALLOC_CTX *ctx);
-char *lp_enumports_cmd(TALLOC_CTX *ctx);
-char *lp_addprinter_cmd(TALLOC_CTX *ctx);
-char *lp_deleteprinter_cmd(TALLOC_CTX *ctx);
-char *lp_os2_driver_map(TALLOC_CTX *ctx);
-const char *lp_lockdir(void);
+#include "source3/param/param_proto.h"
+
 const char *lp_statedir(void);
 const char *lp_cachedir(void);
-const char *lp_piddir(void);
-char *lp_mangling_method(TALLOC_CTX *ctx);
-int lp_mangle_prefix(void);
-const char *lp_utmpdir(void);
-const char *lp_wtmpdir(void);
-bool lp_utmp(void);
-char *lp_rootdir(TALLOC_CTX *ctx);
-char *lp_defaultservice(TALLOC_CTX *ctx);
-char *lp_msg_command(TALLOC_CTX *ctx);


-- 
Samba Shared Repository


More information about the samba-cvs mailing list