summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2008-01-17 10:32:41 +1100
committerAndrew Bartlett <abartlet@samba.org>2008-01-17 10:32:41 +1100
commitc10992c065b64e3985c8b14d3a4c9ee5f09790c6 (patch)
tree9e6872f77d7800042c315ff4a09038ce3bb76655 /source4
parentd5fd15005c0cad9e9018e81ab5c30b87cb2f605a (diff)
parent797e8db3ba1e0038db553af6f564e221479ac381 (diff)
downloadsamba-c10992c065b64e3985c8b14d3a4c9ee5f09790c6.tar.gz
samba-c10992c065b64e3985c8b14d3a4c9ee5f09790c6.tar.bz2
samba-c10992c065b64e3985c8b14d3a4c9ee5f09790c6.zip
Merge branch 'v4-0-test' of git://git.samba.org/samba into 4-0-local
(This used to be commit 11660b0737107138b53c3a08e8de30ee44607eae)
Diffstat (limited to 'source4')
-rw-r--r--source4/build/smb_build/makefile.pm6
-rw-r--r--source4/librpc/idl/lsa.idl22
-rw-r--r--source4/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm6
-rw-r--r--source4/pidl/lib/Parse/Pidl/Samba4.pm1
-rw-r--r--source4/pidl/tests/samba3-srv.pl18
-rw-r--r--source4/scripting/python/config.mk10
-rw-r--r--source4/selftest/README17
-rwxr-xr-xsource4/selftest/selftest.pl9
-rw-r--r--source4/selftest/target/Samba3.pm (renamed from source4/selftest/env/Samba3.pm)0
-rw-r--r--source4/selftest/target/Samba4.pm (renamed from source4/selftest/env/Samba4.pm)0
-rw-r--r--source4/selftest/target/Windows.pm (renamed from source4/selftest/env/Windows.pm)0
11 files changed, 78 insertions, 11 deletions
diff --git a/source4/build/smb_build/makefile.pm b/source4/build/smb_build/makefile.pm
index 0e7771c3f2..ce1e757c61 100644
--- a/source4/build/smb_build/makefile.pm
+++ b/source4/build/smb_build/makefile.pm
@@ -27,6 +27,7 @@ sub new($$$)
$self->{torture_progs} = [];
$self->{static_libs} = [];
$self->{python_dsos} = [];
+ $self->{python_pys} = [];
$self->{shared_libs} = [];
$self->{installable_shared_libs} = [];
$self->{headers} = [];
@@ -345,7 +346,7 @@ sub SharedModule($$)
push(@{$self->{all_objs}}, "\$($ctx->{TYPE}_$ctx->{NAME}_FULL_OBJ_LIST)");
- if (defined($ctx->{INIT_FUNCTION})) {
+ if (defined($ctx->{INIT_FUNCTION}) and $ctx->{TYPE} ne "PYTHON") {
my $init_fn = $ctx->{INIT_FUNCTION_TYPE};
$init_fn =~ s/\(\*\)/init_module/;
my $proto_fn = $ctx->{INIT_FUNCTION_TYPE};
@@ -539,7 +540,7 @@ sub PythonFiles($$)
$self->output("$target: $source\n" .
"\tmkdir -p \$(builddir)/bin/python\n" .
"\tcp $source \$@\n\n");
- push (@{$self->{python_dsos}}, $target);
+ push (@{$self->{python_pys}}, $target);
}
}
@@ -714,6 +715,7 @@ sub write($$)
$self->output("STATIC_LIBS = " . array2oneperline($self->{static_libs}) . "\n");
$self->output("SHARED_LIBS = " . array2oneperline($self->{shared_libs}) . "\n");
$self->output("PYTHON_DSOS = " . array2oneperline($self->{python_dsos}) . "\n");
+ $self->output("PYTHON_PYS = " . array2oneperline($self->{python_pys}) . "\n");
$self->output("INSTALLABLE_SHARED_LIBS = " . array2oneperline($self->{installable_shared_libs}) . "\n");
$self->output("PUBLIC_HEADERS = " . array2oneperline($self->{headers}) . "\n");
$self->output("PC_FILES = " . array2oneperline($self->{pc_files}) . "\n");
diff --git a/source4/librpc/idl/lsa.idl b/source4/librpc/idl/lsa.idl
index 705c86e39b..8d26ec0aad 100644
--- a/source4/librpc/idl/lsa.idl
+++ b/source4/librpc/idl/lsa.idl
@@ -138,9 +138,29 @@ import "security.idl";
uint32 unknown;
} lsa_AuditLogInfo;
+ typedef [v1_enum] enum {
+ LSA_AUDIT_POLICY_NONE=0,
+ LSA_AUDIT_POLICY_SUCCESS=1,
+ LSA_AUDIT_POLICY_FAILURE=2,
+ LSA_AUDIT_POLICY_ALL=(LSA_AUDIT_POLICY_SUCCESS|LSA_AUDIT_POLICY_FAILURE),
+ LSA_AUDIT_POLICY_CLEAR=4
+ } lsa_PolicyAuditPolicy;
+
+ typedef enum {
+ LSA_AUDIT_CATEGORY_SYSTEM = 0,
+ LSA_AUDIT_CATEGORY_LOGON = 1,
+ LSA_AUDIT_CATEGORY_FILE_AND_OBJECT_ACCESS = 2,
+ LSA_AUDIT_CATEGORY_USE_OF_USER_RIGHTS = 3,
+ LSA_AUDIT_CATEGORY_PROCCESS_TRACKING = 4,
+ LSA_AUDIT_CATEGORY_SECURITY_POLICY_CHANGES = 5,
+ LSA_AUDIT_CATEGORY_ACCOUNT_MANAGEMENT = 6,
+ LSA_AUDIT_CATEGORY_DIRECTORY_SERVICE_ACCESS = 7, /* only in win2k/2k3 */
+ LSA_AUDIT_CATEGORY_ACCOUNT_LOGON = 8 /* only in win2k/2k3 */
+ } lsa_PolicyAuditEventType;
+
typedef struct {
uint32 auditing_mode;
- [size_is(count)] uint32 *settings;
+ [size_is(count)] lsa_PolicyAuditPolicy *settings;
uint32 count;
} lsa_AuditEventsInfo;
diff --git a/source4/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm b/source4/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm
index 47312bc83d..ca9e7d15db 100644
--- a/source4/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm
+++ b/source4/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm
@@ -6,13 +6,17 @@
package Parse::Pidl::Samba3::ServerNDR;
+use Exporter;
+@ISA = qw(Exporter);
+@EXPORT_OK = qw(DeclLevel);
+
use strict;
use Parse::Pidl qw(warning fatal);
use Parse::Pidl::Typelist qw(mapTypeName scalar_is_reference);
use Parse::Pidl::Util qw(ParseExpr has_property is_constant);
use Parse::Pidl::NDR qw(GetNextLevel);
use Parse::Pidl::Samba4 qw(ElementStars DeclLong);
-use Parse::Pidl::Samba4::NDR::Parser qw(GenerateFunctionOutEnv);
+use Parse::Pidl::Samba4::Header qw(GenerateFunctionOutEnv);
use vars qw($VERSION);
$VERSION = '0.01';
diff --git a/source4/pidl/lib/Parse/Pidl/Samba4.pm b/source4/pidl/lib/Parse/Pidl/Samba4.pm
index 5848543a60..d42e01cdb0 100644
--- a/source4/pidl/lib/Parse/Pidl/Samba4.pm
+++ b/source4/pidl/lib/Parse/Pidl/Samba4.pm
@@ -12,6 +12,7 @@ require Exporter;
use Parse::Pidl::Util qw(has_property is_constant);
use Parse::Pidl::NDR qw(GetNextLevel);
use Parse::Pidl::Typelist qw(mapTypeName scalar_is_reference);
+use Parse::Pidl qw(fatal);
use strict;
use vars qw($VERSION);
diff --git a/source4/pidl/tests/samba3-srv.pl b/source4/pidl/tests/samba3-srv.pl
new file mode 100644
index 0000000000..d1e2bc9545
--- /dev/null
+++ b/source4/pidl/tests/samba3-srv.pl
@@ -0,0 +1,18 @@
+#!/usr/bin/perl
+# (C) 2008 Jelmer Vernooij <jelmer@samba.org>
+# Published under the GNU General Public License
+use strict;
+use warnings;
+
+use Test::More tests => 1;
+use FindBin qw($RealBin);
+use lib "$RealBin";
+use Util;
+use Parse::Pidl::Util qw(MyDumper has_property);
+use Parse::Pidl::Samba3::ServerNDR qw(DeclLevel);
+
+my $l = { TYPE => "DATA", DATA_TYPE => "uint32" };
+my $e = { FILE => "foo", LINE => 0, PROPERTIES => { }, TYPE => "uint32",
+ LEVELS => [ $l ] };
+
+is("uint32_t", DeclLevel($e, 0));
diff --git a/source4/scripting/python/config.mk b/source4/scripting/python/config.mk
index f00b477919..450da0e90a 100644
--- a/source4/scripting/python/config.mk
+++ b/source4/scripting/python/config.mk
@@ -16,7 +16,7 @@ PRIVATE_DEPENDENCIES = LIBNDR LIBLDB SAMDB CREDENTIALS
SWIG_FILE = misc.i
# Swig extensions
-swig: pythonmods
+swig:: pythonmods
.SUFFIXES: _wrap.c .i
@@ -28,13 +28,19 @@ realdistclean::
@-rm -f bin/python/*
# FIXME: Remove _wrap.c files
-pythonmods: $(PYTHON_DSOS)
+pythonmods:: $(PYTHON_DSOS) $(PYTHON_PYS)
PYDOCTOR_MODULES=bin/python/ldb.py bin/python/auth.py bin/python/credentials.py bin/python/registry.py bin/python/tdb.py bin/python/security.py bin/python/events.py bin/python/net.py
pydoctor:: pythonmods
LD_LIBRARY_PATH=bin/shared PYTHONPATH=bin/python pydoctor --make-html --docformat=restructuredtext --add-package scripting/python/samba/ $(addprefix --add-module , $(PYDOCTOR_MODULES))
+installpython:: pythonmods
+ @$(SHELL) $(srcdir)/script/installpython.sh \
+ $(INSTALLPERMS) \
+ $(DESTDIR)$(PYTHONDIR) \
+ scripting/python bin/python
+
clean::
@echo "Removing python modules"
@rm -f bin/python/*
diff --git a/source4/selftest/README b/source4/selftest/README
index a0afda3d19..3250f32ec7 100644
--- a/source4/selftest/README
+++ b/source4/selftest/README
@@ -1,6 +1,23 @@
+# vim: ft=rst
+
This directory contains test scripts that are useful for running a
bunch of tests all at once.
+===============
+Available tests
+===============
+The available tests are obtained from a script, usually
+selftest/samba{3,4}_tests.sh. This script should for each test output
+the name of the test, the command to run and the environment that should be
+provided.
+
+============
+Environments
+============
+Tests often need to run against a server with particular things set up,
+a "environment". This environment is provided by the test "target": Samba 3,
+Samba 4 or Windows.
+
The following environments are currently available:
- none: No server set up, no variables set.
diff --git a/source4/selftest/selftest.pl b/source4/selftest/selftest.pl
index 96409558b1..004332a1fc 100755
--- a/source4/selftest/selftest.pl
+++ b/source4/selftest/selftest.pl
@@ -67,7 +67,7 @@ these tests will be counted as successes, successes will be counted as failures.
The format for the file is, one entry per line:
-TESTSUITE-NAME/TEST-NAME
+TESTSUITE-NAME.TEST-NAME
The reason for a test can also be specified, by adding a hash sign (#) and the reason
after the test name.
@@ -130,9 +130,6 @@ use POSIX;
use Cwd qw(abs_path);
use lib "$RealBin";
use Subunit qw(parse_results);
-use env::Samba3;
-use env::Samba4;
-use env::Windows;
use SocketWrapper;
my $opt_help = 0;
@@ -429,17 +426,20 @@ my $testenv_default = "none";
if ($opt_target eq "samba4") {
$testenv_default = "member";
+ require target::Samba4;
$target = new Samba4($opt_bindir or "$srcdir/bin", $ldap, "$srcdir/setup");
} elsif ($opt_target eq "samba3") {
if ($opt_socket_wrapper and `$opt_bindir/smbd -b | grep SOCKET_WRAPPER` eq "") {
die("You must include --enable-socket-wrapper when compiling Samba in order to execute 'make test'. Exiting....");
}
$testenv_default = "dc";
+ require target::Samba3;
$target = new Samba3($opt_bindir);
} elsif ($opt_target eq "win") {
die("Windows tests will not run with socket wrapper enabled.")
if ($opt_socket_wrapper);
$testenv_default = "dc";
+ require target::Windows;
$target = new Windows();
}
@@ -741,7 +741,6 @@ sub teardown_env($)
delete $running_envs{$envname};
}
-
if ($opt_no_lazy_setup) {
setup_env($_) foreach (keys %required_envs);
}
diff --git a/source4/selftest/env/Samba3.pm b/source4/selftest/target/Samba3.pm
index b0c4eb22bd..b0c4eb22bd 100644
--- a/source4/selftest/env/Samba3.pm
+++ b/source4/selftest/target/Samba3.pm
diff --git a/source4/selftest/env/Samba4.pm b/source4/selftest/target/Samba4.pm
index 87a86ef06f..87a86ef06f 100644
--- a/source4/selftest/env/Samba4.pm
+++ b/source4/selftest/target/Samba4.pm
diff --git a/source4/selftest/env/Windows.pm b/source4/selftest/target/Windows.pm
index d0c90d7f7b..d0c90d7f7b 100644
--- a/source4/selftest/env/Windows.pm
+++ b/source4/selftest/target/Windows.pm