The branch, master has been updated via fc7050e54c69919d754ca0adf3f2f741a501fec4 (commit) via 900768067831f773b7cdeec03e095956bccb961e (commit) via cb16488cb1bc29657a024a74c21b33445cde87b0 (commit) via 75b59c9b31d1a69ab58770d8741e15a894a1cad3 (commit) via e9429a2abe06c20e5e4582febe8e6c0a20756e48 (commit) from 5b827dfd8b20e4c268a594e733765bef147020fb (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log ----------------------------------------------------------------- commit fc7050e54c69919d754ca0adf3f2f741a501fec4 Author: Jelmer Vernooij <[EMAIL PROTECTED]> Date: Thu Sep 18 19:58:47 2008 +0200 Add header. commit 900768067831f773b7cdeec03e095956bccb961e Author: Jelmer Vernooij <[EMAIL PROTECTED]> Date: Thu Sep 18 19:56:25 2008 +0200 Remove obsolete script. commit cb16488cb1bc29657a024a74c21b33445cde87b0 Author: Jelmer Vernooij <[EMAIL PROTECTED]> Date: Thu Sep 18 19:18:13 2008 +0200 Fix path, typo. commit 75b59c9b31d1a69ab58770d8741e15a894a1cad3 Merge: e9429a2abe06c20e5e4582febe8e6c0a20756e48 5b827dfd8b20e4c268a594e733765bef147020fb Author: Jelmer Vernooij <[EMAIL PROTECTED]> Date: Thu Sep 18 18:41:23 2008 +0200 Merge branch 'master' of ssh://git.samba.org/data/git/samba commit e9429a2abe06c20e5e4582febe8e6c0a20756e48 Author: Matthias Dieter Wallnoefer <[EMAIL PROTECTED]> Date: Thu Sep 18 18:40:47 2008 +0200 Prevent prefix=/usr being used without --with-fhs. ----------------------------------------------------------------------- Summary of changes: README.Coding | 2 +- prog_guide4.txt | 4 +- source4/build/m4/check_path.m4 | 5 + source4/script/build_smb_interfaces.pl | 161 -------------------------------- source4/script/harness2subunit.pl | 4 + 5 files changed, 12 insertions(+), 164 deletions(-) delete mode 100755 source4/script/build_smb_interfaces.pl Changeset truncated at 500 lines: diff --git a/README.Coding b/README.Coding index 52ecf0e..8063ae8 100644 --- a/README.Coding +++ b/README.Coding @@ -173,7 +173,7 @@ Goto ---- While many people have been academically taught that goto's are fundamentally -evil, then can greatly enhance readability and reduce memory leaks when used +evil, they can greatly enhance readability and reduce memory leaks when used as the single exit point from a function. But in no Samba world what so ever is a goto outside of a function or block of code a good idea. diff --git a/prog_guide4.txt b/prog_guide4.txt index bba58b3..2f5be5f 100644 --- a/prog_guide4.txt +++ b/prog_guide4.txt @@ -194,7 +194,7 @@ in the data and bss columns in "size" anyway (it will be included in How to use talloc ----------------- -Please see the separate document, source/lib/talloc/talloc_guide.txt +Please see the separate document, lib/talloc/talloc_guide.txt You _must_ read this if you want to program in Samba4. @@ -646,7 +646,7 @@ file cannot be deleted until you reboot trans2 qpathinfo doesn't see the delete_pending flag correctly, but qfileinfo does! -get rid of pstring, fstring, strtok +get rid of strtok add programming documentation note about lp_set_cmdline() diff --git a/source4/build/m4/check_path.m4 b/source4/build/m4/check_path.m4 index c45a803..51d5daa 100644 --- a/source4/build/m4/check_path.m4 +++ b/source4/build/m4/check_path.m4 @@ -23,6 +23,11 @@ winbindd_socket_dir="${localstatedir}/run/winbindd" winbindd_privileged_socket_dir="${localstatedir}/lib/winbindd_privileged" ntp_signd_socket_dir="${localstatedir}/run/ntp_signd" +# Check to prevent installing directly under /usr without the FHS +AS_IF([test ${prefix} == /usr],[ + AC_MSG_ERROR([Don't install directly under "/usr" without using the FHS option (--with-fhs). This could lead to file loss!]) +]) + AC_ARG_WITH(fhs, [AS_HELP_STRING([--with-fhs],[Use FHS-compliant paths (default=no)])], lockdir="${localstatedir}/lib/samba" diff --git a/source4/script/build_smb_interfaces.pl b/source4/script/build_smb_interfaces.pl deleted file mode 100755 index 5fac94c..0000000 --- a/source4/script/build_smb_interfaces.pl +++ /dev/null @@ -1,161 +0,0 @@ -#!/usr/bin/perl -# -# Create ejs interfaces for structures in a C header file -# - -use File::Basename; -use Data::Dumper; - -# -# Generate parse tree for header file -# - -my $file = shift; -require smb_interfaces; -my $parser = new smb_interfaces; -$header = $parser->parse($file); - -# -# Make second pass over tree to make it easier to process. -# - -sub flatten_structs($) { - my $obj = shift; - my $s = { %$obj }; - - # Map NAME, STRUCT_NAME and UNION_NAME elements into a more likeable - # property. - - if (defined($obj->{STRUCT_NAME}) or defined($obj->{UNION_NAME})) { - - $s->{TYPE_DEFINED} = defined($obj->{STRUCT_NAME}) ? $obj->{STRUCT_NAME} - : $obj->{UNION_NAME}; - - delete $s->{STRUCT_NAME}; - delete $s->{UNION_NAME}; - } - - # Create a new list of structure fields with flattened names - - foreach my $elt (@{$obj->{DATA}}) { - foreach my $name (@{$elt->{NAME}}) { - my $new_elt = { %$elt }; - $new_elt->{NAME} = $name; -# $new_elt->{PARENT} = $s; - push(@{$s->{FIELDS}}, flatten_structs($new_elt)); - } - } - - delete $s->{DATA}; - - return $s; -} - [EMAIL PROTECTED] = map { flatten_structs($_) } @{$header}; - -# -# Generate implementation -# - -my $basename = basename($file, ".h"); -stat "libcli/gen_raw" || mkdir("libcli/gen_raw") || die("mkdir"); - -open(FILE, ">libcli/gen_raw/ejs_${basename}.c"); - -print FILE "/* EJS wrapper functions auto-generated by build_smb_interfaces.pl */\n\n"; - -print FILE "#include \"includes.h\"\n"; -print FILE "#include \"scripting/ejs/smbcalls.h\"\n"; -print FILE "#include \"lib/appweb/ejs/ejs.h\"\n"; -print FILE "#include \"scripting/ejs/ejsrpc.h\"\n"; # TODO: remove this -print FILE "\n"; - -sub transfer_element($$$) { - my $dir = shift; - my $prefix = shift; - my $elt = shift; - - $type = $elt->{TYPE}; - $type =~ s/_t$//; - - print FILE "\tNDR_CHECK(ejs_${dir}_$type(ejs, v, \"$prefix.$elt->{NAME}\"));\n"; -} - -sub transfer_struct($$) { - my $dir = shift; - my $struct = shift; - - foreach my $field (@{$struct->{FIELDS}}) { - next if $dir eq "pull" and $field->{NAME} eq "out"; - next if $dir eq "push" and $field->{NAME} eq "in"; - - if ($field->{TYPE} eq "struct") { - foreach $subfield (@{$field->{FIELDS}}) { - transfer_element($dir, $field->{NAME}, $subfield); - } - } else { - transfer_element($dir, $struct->{NAME}, $field); - } - } -} - -# Top level call functions - -foreach my $s (@newheader) { - - if ($s->{TYPE} eq "struct") { - - # Push/pull top level struct - - print FILE "NTSTATUS ejs_pull_$s->{TYPE_DEFINED}(struct ejs_rpc *ejs, struct MprVar *v, struct $s->{TYPE_DEFINED} *r)\n"; - print FILE "{\n"; - - transfer_struct("pull", $s); - - print FILE "\n\treturn NT_STATUS_OK;\n"; - print FILE "}\n\n"; - - print FILE "NTSTATUS ejs_push_$s->{TYPE_DEFINED}(struct ejs_rpc *ejs, struct MprVar *v, const struct $s->{TYPE_DEFINED} *r)\n"; - print FILE "{\n"; - - transfer_struct("push", $s); - - print FILE "\n\treturn NT_STATUS_OK;\n"; - print FILE "}\n\n"; - - # Function call - - print FILE "static int ejs_$s->{TYPE_DEFINED}(int eid, int argc, struct MprVar **argv)\n"; - print FILE "{\n"; - print FILE "\treturn ejs_raw_call(eid, argc, argv, (ejs_pull_function_t)ejs_pull_$s->{TYPE_DEFINED}, (ejs_push_function_t)ejs_push_$s->{TYPE_DEFINED});\n"; - print FILE "}\n\n"; - - } else { - - # Top level union - - foreach my $arm (@{$s->{FIELDS}}) { - - # Push/pull union arm - - print FILE "NTSTATUS ejs_pull_$s->{TYPE_DEFINED}_$arm->{NAME}(struct ejs_rpc *ejs, struct MprVar *v, union $s->{TYPE_DEFINED} *r)\n"; - print FILE "{\n"; - - transfer_struct("pull", $arm); - - print FILE "\n\treturn NT_STATUS_OK;\n"; - print FILE "}\n\n"; - - print FILE "NTSTATUS ejs_push_$s->{TYPE_DEFINED}_$arm->{NAME}(struct ejs_rpc *ejs, struct MprVar *v, const union $s->{TYPE_DEFINED} *r)\n"; - print FILE "{\n"; - - transfer_struct("push", $arm); - - print FILE "\n\treturn NT_STATUS_OK;\n"; - print FILE "}\n\n"; - - } - } -} - -close(FILE); diff --git a/source4/script/harness2subunit.pl b/source4/script/harness2subunit.pl index 9f2391a..45f5155 100755 --- a/source4/script/harness2subunit.pl +++ b/source4/script/harness2subunit.pl @@ -1,4 +1,8 @@ #!/usr/bin/perl +# Simple script that converts Perl test harness output to +# Subunit +# Copyright (C) 2008 Jelmer Vernooij <[EMAIL PROTECTED]> +# Published under the GNU GPL, v3 or later my $firstline = 1; my $error = 0; -- Samba Shared Repository