gd/samba-autobuild/.git
9 years agopackaging(RHEL-CTDB): explicitly list library versions in samba-winbind-32bit
Michael Adam [Mon, 7 Dec 2009 13:26:03 +0000 (14:26 +0100)]
packaging(RHEL-CTDB): explicitly list library versions in samba-winbind-32bit

Michael

9 years agopackaging(RHEL-CTDB): explicitly list library versions in samba-common
Michael Adam [Mon, 7 Dec 2009 13:25:32 +0000 (14:25 +0100)]
packaging(RHEL-CTDB): explicitly list library versions in samba-common

Michael

9 years agopackaging(RHEL-CTDB): explicitly list all packaged idmap/nss-info/charset modules
Michael Adam [Mon, 7 Dec 2009 13:20:24 +0000 (14:20 +0100)]
packaging(RHEL-CTDB): explicitly list all packaged idmap/nss-info/charset modules

in the samba-common package.
This is to  better be able to catch regressions or
build problems.

Michael

9 years agopackaging(RHEL-CTDB): explicitly list all the vfs modules in the main package
Michael Adam [Mon, 7 Dec 2009 13:16:15 +0000 (14:16 +0100)]
packaging(RHEL-CTDB): explicitly list all the vfs modules in the main package

Instead of the wildcard list, to better control regressions or
build problems.

Michael

9 years agopackaging(RHEL-CTDB): add some checks to test the built smbd
Michael Adam [Mon, 7 Dec 2009 13:12:05 +0000 (14:12 +0100)]
packaging(RHEL-CTDB): add some checks to test the built smbd

Test whether some required features have been built into smbd.
Can be extended...

Michael

9 years agopackaging(RHEL-CTDB): make everything instead of all in the build stage
Michael Adam [Mon, 7 Dec 2009 13:11:32 +0000 (14:11 +0100)]
packaging(RHEL-CTDB): make everything instead of all in the build stage

Michael

9 years agos4-selftest: show the test summary at the end of 'make test' in the build farm
Andrew Tridgell [Tue, 8 Dec 2009 04:58:45 +0000 (15:58 +1100)]
s4-selftest: show the test summary at the end of 'make test' in the build farm

This should make it easier to see what tests are failing with what
parameters

9 years agos4-heimdal: fixed a use-after-free heimdal bug
Andrew Tridgell [Tue, 8 Dec 2009 04:15:41 +0000 (15:15 +1100)]
s4-heimdal: fixed a use-after-free heimdal bug

This caused samba4kinit to segfault on some systems

9 years agos4-drs: use -r to ldbdel in unvampire devel script
Andrew Tridgell [Tue, 8 Dec 2009 03:42:08 +0000 (14:42 +1100)]
s4-drs: use -r to ldbdel in unvampire devel script

This ensures we delete any nTDSConnection objects

9 years agos4-ldb: fixed ldbdel with -r (recursive deletion)
Andrew Tridgell [Tue, 8 Dec 2009 03:40:20 +0000 (14:40 +1100)]
s4-ldb: fixed ldbdel with -r (recursive deletion)

We need to delete the deepest DNs first

9 years agos4:build Bump ldb and tdb required versions.
Andrew Bartlett [Mon, 7 Dec 2009 23:27:30 +0000 (10:27 +1100)]
s4:build Bump ldb and tdb required versions.

Hopefully this will ensure we don't get an older version from the system.

9 years agos4 torture: Cleanup RAW-ACLS a bit
Tim Prouty [Tue, 8 Dec 2009 01:19:30 +0000 (17:19 -0800)]
s4 torture: Cleanup RAW-ACLS a bit

Don't check SEC_DESC_DACL_AUTO_INHERITED right now
Disable RAW-ACLS-INHERITFLAGS for the short term
Update samba4's knownfail accordingly

9 years agos4-selftest: don't consider spoolss failures to be an error in s4
Andrew Tridgell [Tue, 8 Dec 2009 01:37:17 +0000 (12:37 +1100)]
s4-selftest: don't consider spoolss failures to be an error in s4

9 years agos4/smbstreams: Fix memory use after free.
Kamen Mazdrashki [Sat, 5 Dec 2009 23:59:42 +0000 (01:59 +0200)]
s4/smbstreams: Fix memory use after free.

The bug is that sometimes 'streams' is parent for 'new_name'.
With this said, 'new_name' must be dupped before 'streams'
pointer is freed.

Signed-off-by: Andrew Tridgell <tridge@samba.org>
9 years agokrb5: Fix leaked hx509_context pointer
Kamen Mazdrashki [Sun, 6 Dec 2009 02:05:45 +0000 (04:05 +0200)]
krb5: Fix leaked hx509_context pointer

Signed-off-by: Andrew Tridgell <tridge@samba.org>
9 years agotdr-test: Fix 'push_charset' test
Kamen Mazdrashki [Sun, 6 Dec 2009 01:18:11 +0000 (03:18 +0200)]
tdr-test: Fix 'push_charset' test

4 bytes of 'bloe' string are pushed, so we should
check only for the first 4 caracters

Signed-off-by: Andrew Tridgell <tridge@samba.org>
9 years agotalloc: Fix write behind memory block
Kamen Mazdrashki [Sat, 5 Dec 2009 19:44:15 +0000 (21:44 +0200)]
talloc: Fix write behind memory block

If ALWASY_REALLOC is defined and we are to 'shrink' memory block,
memcpy() will write outside memory just allocated.

Signed-off-by: Andrew Tridgell <tridge@samba.org>
9 years agos4 quicktest: exclude raw-streams from quicktest until bug is fixed
Tim Prouty [Fri, 4 Dec 2009 21:02:51 +0000 (13:02 -0800)]
s4 quicktest: exclude raw-streams from quicktest until bug is fixed

9 years agos4 torture: Add a new torture:hide_on_access_denied parameter
Tim Prouty [Sat, 5 Dec 2009 00:07:35 +0000 (16:07 -0800)]
s4 torture: Add a new torture:hide_on_access_denied parameter

It appears some newer versions of windows return
NT_STATUS_OBJECT_NAME_NOT_FOUND on a createfile when access is denied
rather than NT_STATUS_ACCESS_DENIED.  I'm not sure how this translates
to directory enumeration yet, but for now make this a parameter that
can be checked in the various torture tests.

This also gets RAW-ACLS and SMB2-CREATE passing against win7.

9 years agos4 torture: win 7 doesn't like the sequential_only flag for directories
Tim Prouty [Thu, 6 Aug 2009 21:31:01 +0000 (14:31 -0700)]
s4 torture: win 7 doesn't like the sequential_only flag for directories

Remove it for now

9 years agos4 torture: Port RAW-ACLS tests to SMB2
Zack Kirsch [Sat, 4 Jul 2009 23:16:23 +0000 (16:16 -0700)]
s4 torture: Port RAW-ACLS tests to SMB2

- The smblsa calls had to be commented out for now and should be fixed
  later, but they aren't crucial to the test.
- The first two tests from RAW-ACLS were already ported to
  torture_smb2_setinfo() and test_create_acl(). Modifications were
  made similar to the RAW-ACLS changes.
- test_sd_get_set() was ported, but does not pass against XP or Vista;
  it is not added to the SMB2-ACLS test suite.
- printf -> torture_comment / torture_warning / torture_result

9 years agos4 torure: Add SMB2 utility functions
Zack Kirsch [Wed, 1 Jul 2009 20:30:12 +0000 (13:30 -0700)]
s4 torure: Add SMB2 utility functions

- Add a torture_setup_dir() equivalent in SMB2, called smb2_util_setup_dir().
- Add verify_sd() and verify_attrib() helper functions for SMB2.

9 years agos4 torture: RAW-ACL Improvements
Zack Kirsch [Thu, 2 Jul 2009 21:08:41 +0000 (14:08 -0700)]
s4 torture: RAW-ACL Improvements

- Change RAW-ACLS test suite so each test can be run individually.
- Add verify_sd() and verify_attrib() helper functions.
- Change test_nttrans_create() to work for both files and directories.
- Fix a segfault in test_inheritance() when the test errors out early.
- test_sd_get_set() does not pass against XP or Vista, so it is no longer added
  to the RAW-ACLS test suite.
- Minor fixes to test_inheritance().
- New INHERITFLAGS test, which tests the auto inheritance flags a bit more.
- printf -> torture_comment / torture_warning / torture_result

9 years agos4 torture: Convert RAW-STREAMS to a set of test suites rather than a monolithic...
Tim Prouty [Fri, 4 Dec 2009 21:04:12 +0000 (13:04 -0800)]
s4 torture: Convert RAW-STREAMS to a set of test suites rather than a monolithic test

9 years agos4 torture: Update RAW-RENAME to pass against win7
Tim Prouty [Tue, 27 Oct 2009 00:16:37 +0000 (17:16 -0700)]
s4 torture: Update RAW-RENAME to pass against win7

9 years agos4 torture: Add a new RAW-STREAMS test to simulate the summary tab
Tim Prouty [Tue, 27 Oct 2009 00:17:45 +0000 (17:17 -0700)]
s4 torture: Add a new RAW-STREAMS test to simulate the summary tab

9 years agos4 torture: Fix the streams create disposition tests to actually return an error...
Tim Prouty [Wed, 21 Oct 2009 23:51:17 +0000 (16:51 -0700)]
s4 torture: Fix the streams create disposition tests to actually return an error on failure

9 years agos4/torture: add test for zero byte read contention with byte range locks
Steven Danneman [Fri, 4 Dec 2009 02:50:33 +0000 (18:50 -0800)]
s4/torture: add test for zero byte read contention with byte range locks

9 years agos4/libcli: add define for exclusive lock mode
Steven Danneman [Fri, 4 Dec 2009 02:32:56 +0000 (18:32 -0800)]
s4/libcli: add define for exclusive lock mode

9 years agos4/torture: fix >80 column spacing issues
Steven Danneman [Fri, 4 Dec 2009 03:32:53 +0000 (19:32 -0800)]
s4/torture: fix >80 column spacing issues

9 years agos4/torture: add delete-on-close test for directories
Aravind Srinivasan [Tue, 17 Nov 2009 20:28:34 +0000 (12:28 -0800)]
s4/torture: add delete-on-close test for directories

This test opens a directory with delete on close, opens it again,
and checks to make sure that the second open returned with
NT_STATUS_DELETE_PENDING.

9 years agoparent_sd can never be null in this function, so don't
Jeremy Allison [Mon, 7 Dec 2009 22:41:09 +0000 (14:41 -0800)]
parent_sd can never be null in this function, so don't
check for it.

Jeremy.

9 years agoHopefullt final fix for 6802 - acl_xattr.c module: A created folder does not properly...
Jeremy Allison [Mon, 7 Dec 2009 22:36:12 +0000 (14:36 -0800)]
Hopefullt final fix for 6802 - acl_xattr.c module: A created folder does not properly inherit permissions from parent and 6938 - No hook exists to check creation rights when using acl_xattr module

Volker was right (dammit :-). It's much easier to catch
this case in the create_file() vfs call instead of trying
to do everything inside open() and mkdir(). Hook all these
functions to gain the desired effect.
Jeremy.

9 years agos3: let gencache_init() use tdb_check()
Stefan Metzmacher [Fri, 4 Dec 2009 15:46:34 +0000 (16:46 +0100)]
s3: let gencache_init() use tdb_check()

If the check fails we try to clear the tdb and start
with an empty cache.

metze

9 years agos3: let netsamlogon_cache_init() use tdb_check()
Stefan Metzmacher [Fri, 4 Dec 2009 15:34:08 +0000 (16:34 +0100)]
s3: let netsamlogon_cache_init() use tdb_check()

If the check fails we try to unlink the old file and
start with an empty cache.

metze

9 years agos3: let tdb_validate_child() use tdb_check()
Stefan Metzmacher [Fri, 4 Dec 2009 15:32:42 +0000 (16:32 +0100)]
s3: let tdb_validate_child() use tdb_check()

metze

9 years agos3: require tdb 1.1.7 with tdb_check()
Stefan Metzmacher [Fri, 4 Dec 2009 15:59:39 +0000 (16:59 +0100)]
s3: require tdb 1.1.7 with tdb_check()

metze

9 years agos3:docs: Document "directory name cache size".
Karolin Seeger [Mon, 7 Dec 2009 15:28:30 +0000 (16:28 +0100)]
s3:docs: Document "directory name cache size".

Karolin

9 years agos3: de-deprecate "write cache size" to prevent its removal without a proper alternative
Volker Lendecke [Mon, 7 Dec 2009 15:24:08 +0000 (16:24 +0100)]
s3: de-deprecate "write cache size" to prevent its removal without a proper alternative

9 years agoFix release script with newer versins of git
Simo Sorce [Mon, 7 Dec 2009 14:25:03 +0000 (09:25 -0500)]
Fix release script with newer versins of git

9 years agos4-smbtorture: disable some spoolss printerdata tests which s3 does not pass at the...
Günther Deschner [Mon, 7 Dec 2009 13:38:24 +0000 (14:38 +0100)]
s4-smbtorture: disable some spoolss printerdata tests which s3 does not pass at the moment.

Guenther

9 years agos3: fix net and rpcclient after setprinterdataex changes.
Günther Deschner [Mon, 7 Dec 2009 10:54:26 +0000 (11:54 +0100)]
s3: fix net and rpcclient after setprinterdataex changes.

Guenther

9 years agos4-smbtorture: fix RPC-SPOOLSS after _spoolss_SetPrinterDataEx IDL change.
Günther Deschner [Fri, 4 Dec 2009 23:58:45 +0000 (00:58 +0100)]
s4-smbtorture: fix RPC-SPOOLSS after _spoolss_SetPrinterDataEx IDL change.

Guenther

9 years agos3-spoolss: let _spoolss_DeletePrinterData call into _spoolss_DeletePrinterDataEx.
Günther Deschner [Mon, 7 Dec 2009 10:28:56 +0000 (11:28 +0100)]
s3-spoolss: let _spoolss_DeletePrinterData call into _spoolss_DeletePrinterDataEx.

Guenther

9 years agos3-spoolss: let _spoolss_SetPrinterData call into _spoolss_SetPrinterDataEx.
Günther Deschner [Fri, 4 Dec 2009 23:56:55 +0000 (00:56 +0100)]
s3-spoolss: let _spoolss_SetPrinterData call into _spoolss_SetPrinterDataEx.

Guenther

9 years agos3-spoolss: let _spoolss_GetPrinterData call into _spoolss_GetPrinterDataEx.
Günther Deschner [Fri, 4 Dec 2009 23:52:28 +0000 (00:52 +0100)]
s3-spoolss: let _spoolss_GetPrinterData call into _spoolss_GetPrinterDataEx.

Guenther

9 years agospoolss: rework spoolss_GetPrinterDataEx and spoolss_SetPrinterDataEx.
Günther Deschner [Fri, 4 Dec 2009 23:50:18 +0000 (00:50 +0100)]
spoolss: rework spoolss_GetPrinterDataEx and spoolss_SetPrinterDataEx.

Guenther

9 years agos3-spoolss: a default printer should have at least a "PrintDriverData" key.
Günther Deschner [Fri, 4 Dec 2009 16:22:25 +0000 (17:22 +0100)]
s3-spoolss: a default printer should have at least a "PrintDriverData" key.

Guenther

9 years agos3-winreg: fill in some inline comments.
Günther Deschner [Fri, 4 Dec 2009 12:33:49 +0000 (13:33 +0100)]
s3-winreg: fill in some inline comments.

Guenther

9 years agos3-winreg: remove trailing whitespace.
Günther Deschner [Fri, 4 Dec 2009 12:29:08 +0000 (13:29 +0100)]
s3-winreg: remove trailing whitespace.

Guenther

9 years agos3:auth: Fix typo in debug message.
Karolin Seeger [Mon, 7 Dec 2009 13:38:18 +0000 (14:38 +0100)]
s3:auth: Fix typo in debug message.

Karolin

9 years agoexamples: Fix the build of the example VFS modules.
Karolin Seeger [Mon, 7 Dec 2009 09:15:49 +0000 (10:15 +0100)]
examples: Fix the build of the example VFS modules.

Karolin

9 years agos4:dsdb Use ldb_match_msg_objectclass in operational.c
Andrew Bartlett [Mon, 7 Dec 2009 04:28:51 +0000 (15:28 +1100)]
s4:dsdb Use ldb_match_msg_objectclass in operational.c

This avoids not only a possibly non-portable compiler expression, but
also the need to look up the schema each time.

Andrew Bartlett

9 years agos4:ldb Add a function to match a message against an objectClass
Andrew Bartlett [Mon, 7 Dec 2009 04:27:43 +0000 (15:27 +1100)]
s4:ldb Add a function to match a message against an objectClass

(as objectClass will always be a case insensitive ascii string, we can
make a much simpler match function here than for the general case).

Andrew Bartlett

9 years agos4:ldap.py Improve testsuite for primaryGroupToken behaviour
Andrew Bartlett [Mon, 7 Dec 2009 01:44:07 +0000 (12:44 +1100)]
s4:ldap.py Improve testsuite for primaryGroupToken behaviour

This tries to show that the domain object should not have a
primaryGroupToken, for example.  (This passes against the old and new
code, as the failure case requires an object with an objectSid, and
exactly one group in it's subtree.  Sadly I don't know of a valid structure
that I can construct to test this).

Andrew Bartlett

9 years agos4:dsdb Make primaryGroupToken calculation more efficient and correct
Andrew Bartlett [Mon, 7 Dec 2009 01:41:43 +0000 (12:41 +1100)]
s4:dsdb Make primaryGroupToken calculation more efficient and correct

The original code here would do a subtree search under each object,
attempting to determine if it was a group.  This was incorrect, and
inefficient - we just need to ask for the objectClass attribute, and
check that value before returning the group's RID.

(Much of this patch reworks operational.c to allow a search for 2
attributes for this calculation).

Andrew Bartlett

9 years agos4:dsdb Make parentGUID handler use dsdb_module_search_dn()
Andrew Bartlett [Thu, 3 Dec 2009 23:15:15 +0000 (10:15 +1100)]
s4:dsdb Make parentGUID handler use dsdb_module_search_dn()

This avoids doing a new search from the top of the module stack.

This also removes the helper function dsdb_find_parentguid_by_dn()
which is now unused.

Andrew Bartlett

9 years agos4:build torturedir and -DTORTUREDIR is unused
Andrew Bartlett [Thu, 3 Dec 2009 20:29:29 +0000 (07:29 +1100)]
s4:build torturedir and -DTORTUREDIR is unused

(And made building RPMs much more difficult for JHT)

9 years agos4:dsdb Hide the LM password by default too
Andrew Bartlett [Tue, 1 Dec 2009 21:53:32 +0000 (08:53 +1100)]
s4:dsdb Hide the LM password by default too

9 years agostreamline some log levels for invalid servicenames
Christian Ambach [Wed, 2 Dec 2009 19:06:37 +0000 (20:06 +0100)]
streamline some log levels for invalid servicenames

I don't think we need to log the fact that a user gave a wrong sharename in Explorer with the highest log level.
The level of this was not very consistent:
service.c: DEBUG(3,("find_service() failed to find service %s\n", service));
service.c: DEBUG(0,("%s (%s) couldn't find service %s\n",
smb2_tcon.c: DEBUG(1,("smbd_smb2_tree_connect: couldn't find service %s\n",

This changes the last two to 3 as the first one.

Signed-off-by: Christian Ambach <christian.ambach@de.ibm.com>
9 years agos3: Fix a const discard warning
Volker Lendecke [Sun, 6 Dec 2009 11:50:51 +0000 (12:50 +0100)]
s3: Fix a const discard warning

9 years agos3: talloc_array_length deals file with a NULL argument
Volker Lendecke [Sun, 6 Dec 2009 11:50:25 +0000 (12:50 +0100)]
s3: talloc_array_length deals file with a NULL argument

9 years agos3: Small simplification: qsort deals fine with just one entry
Volker Lendecke [Sun, 6 Dec 2009 11:49:46 +0000 (12:49 +0100)]
s3: Small simplification: qsort deals fine with just one entry

9 years agos3: Simplify usr_info_cmp by calling timeval_compare()
Volker Lendecke [Sun, 6 Dec 2009 11:49:09 +0000 (12:49 +0100)]
s3: Simplify usr_info_cmp by calling timeval_compare()

9 years agos3: Add rpcclient wkssvc_enumerateusers
Volker Lendecke [Sun, 6 Dec 2009 11:40:44 +0000 (12:40 +0100)]
s3: Add rpcclient wkssvc_enumerateusers

9 years agos3: Complete support for NetWkstaGetInfo/NetWkstaEnumUsers
Ian Puleston [Sun, 22 Nov 2009 23:00:00 +0000 (00:00 +0100)]
s3: Complete support for NetWkstaGetInfo/NetWkstaEnumUsers

9 years agos3: First cut at _wkssvc_NetWkstaEnumUsers
Volker Lendecke [Mon, 3 Aug 2009 15:27:11 +0000 (17:27 +0200)]
s3: First cut at _wkssvc_NetWkstaEnumUsers

This needs access checks!

9 years agos3: Support NetWkstaGetInfo 101 and 102
Volker Lendecke [Mon, 3 Aug 2009 14:52:01 +0000 (16:52 +0200)]
s3: Support NetWkstaGetInfo 101 and 102

9 years agos4-ldif: Fix memory leek in ldb_ldif_write()
Kamen Mazdrashki [Sat, 5 Dec 2009 20:49:59 +0000 (22:49 +0200)]
s4-ldif: Fix memory leek in ldb_ldif_write()

9 years agopackaging(RHEL-CTDB): package dbwrap_tool and dbwrap_torture in the common pkg
Michael Adam [Fri, 4 Dec 2009 22:29:22 +0000 (23:29 +0100)]
packaging(RHEL-CTDB): package dbwrap_tool and dbwrap_torture in the common pkg

Michael

9 years agos3:dbwrap_ctdb: increase the number of commit retries 5-->100
Michael Adam [Fri, 4 Dec 2009 13:53:05 +0000 (14:53 +0100)]
s3:dbwrap_ctdb: increase the number of commit retries 5-->100

This is to cope with timeouts when recoveries and transactions collide.
Maybe 100 is too hight, but 10 or even 20 have been too low in a
very busy environment.

Michael

9 years agos3:dbwrap_ctdb: increase the rsn of the __transaction_lock__ when storing
Michael Adam [Fri, 4 Dec 2009 13:49:53 +0000 (14:49 +0100)]
s3:dbwrap_ctdb: increase the rsn of the __transaction_lock__ when storing

so that it is correctly handled by recoveries.
Also set the dmaster explicitly.

Michael

9 years agos3: Fix explicit stat64 support
Volker Lendecke [Sat, 5 Dec 2009 13:27:04 +0000 (14:27 +0100)]
s3: Fix explicit stat64 support

9 years agos3: check if glibc has broken posix_fallocate
Björn Jacke [Fri, 4 Dec 2009 22:26:47 +0000 (23:26 +0100)]
s3: check if glibc has broken posix_fallocate

9 years agoMake Samba3 pass the RAW-LOCK test as Windows.
Jeremy Allison [Fri, 4 Dec 2009 22:04:08 +0000 (14:04 -0800)]
Make Samba3 pass the RAW-LOCK test as Windows.

Implement the win7 NT_STATUS_INVALID_LOCK_RANGE.
Make smbd behave as Windows does in canceling locks.

Jeremy.

9 years agoMake smbtorture4 match Windows behavior.
Jeremy Allison [Fri, 4 Dec 2009 22:02:52 +0000 (14:02 -0800)]
Make smbtorture4 match Windows behavior.

Jeremy.

9 years agos3: bug #6967: Prevent glibc error on net ads join:
Jim McDonough [Fri, 4 Dec 2009 17:31:53 +0000 (12:31 -0500)]
s3: bug #6967: Prevent glibc error on net ads join:
talloc()ed memory should not be SAFE_FREE()ed.

Signed-off-by: Jim McDonough <jmcd@samba.org>
9 years agos4-smbtorture: heavily expand printerdata tests in RPC-SPOOLSS.
Günther Deschner [Fri, 4 Dec 2009 01:54:33 +0000 (02:54 +0100)]
s4-smbtorture: heavily expand printerdata tests in RPC-SPOOLSS.

Including new tests for:
- spoolss_SetPrinterDataEx
- spoolss_DeletePrinterDataEx
- spoolss_DeletePrinterKey

Guenther

9 years agos3 aclocal.m4: Fix iconv checks, clean up m4 code
Kai Blin [Fri, 4 Dec 2009 08:47:25 +0000 (09:47 +0100)]
s3 aclocal.m4: Fix iconv checks, clean up m4 code

The check for iconv requiring giconv.h and libgiconv as well as
the check for iconv requiring biconv.h and libbiconv were using the wrong
variable to check for previous successful test results. This caused the checks
to always fall back to libbiconv on systems where that library was available.

In the course of fixing this, I had to clean up the indentation in that piece of
code, and I also rewrote/added some comments.

Many thanks to Tsurutani Naoki <turutani@scphys.kyoto-u.ac.jp> for the initial
patch and diagnosis.

9 years agos4-ldb: fixed show_deleted module not to corrupt parse trees
Andrew Tridgell [Fri, 4 Dec 2009 06:46:14 +0000 (17:46 +1100)]
s4-ldb: fixed show_deleted module not to corrupt parse trees

The show_deleted module was using a static private ptr in the module
to hold a parse tree to save on parsing. The code caused this
static ptr to change with each search, which caused incorrect
searches and numerous valgrind errors.

This patch replaces it with a hand-built parse tree.

9 years agos4-drsutil: fixed a memory leak in samdb_search_count
Andrew Tridgell [Fri, 4 Dec 2009 06:45:38 +0000 (17:45 +1100)]
s4-drsutil: fixed a memory leak in samdb_search_count

In general functions that don't return any memory should not take a memory context.
Otherwise it is too easy to have a bug like this where memory is leaked

9 years agos4 torture: Convert create_complex_file to use BASIC_INFO instead of deprecated command
Zachary Loafman [Tue, 24 Nov 2009 23:42:56 +0000 (23:42 +0000)]
s4 torture: Convert create_complex_file to use BASIC_INFO instead of deprecated command

Signed-off-by: Tim Prouty <tprouty@samba.org>
9 years agos4 torture: Fix call to smbcli_open
Zachary Loafman [Wed, 18 Nov 2009 22:42:31 +0000 (22:42 +0000)]
s4 torture: Fix call to smbcli_open

Signed-off-by: Tim Prouty <tprouty@samba.org>
9 years agos4 torture: Make RAW-SEARCH pass against win7
Zachary Loafman [Wed, 18 Nov 2009 00:29:23 +0000 (00:29 +0000)]
s4 torture: Make RAW-SEARCH pass against win7

Signed-off-by: Tim Prouty <tprouty@samba.org>
9 years agos4 torture: Parameterize WRITE_AND_CLOSE support
Zachary Loafman [Wed, 18 Nov 2009 00:29:21 +0000 (00:29 +0000)]
s4 torture: Parameterize WRITE_AND_CLOSE support

Signed-off-by: Tim Prouty <tprouty@samba.org>
9 years agos4 torture: Add lockread_supported based off of CAP_LOCK_AND_READ
Zachary Loafman [Tue, 17 Nov 2009 23:25:58 +0000 (23:25 +0000)]
s4 torture: Add lockread_supported based off of CAP_LOCK_AND_READ

Signed-off-by: Tim Prouty <tprouty@samba.org>
9 years agos4 torture: Allow READ to be parameterized, add more readx tests
Zachary Loafman [Mon, 16 Nov 2009 21:13:26 +0000 (21:13 +0000)]
s4 torture: Allow READ to be parameterized, add more readx tests

Signed-off-by: Tim Prouty <tprouty@samba.org>
9 years agos4-torture: Allow the legacy DENY_FCB/DENY_DOS share modes to be ignored
Zachary Loafman [Mon, 9 Nov 2009 18:32:06 +0000 (18:32 +0000)]
s4-torture: Allow the legacy DENY_FCB/DENY_DOS share modes to be ignored

Signed-off-by: Tim Prouty <tprouty@samba.org>
9 years agos4 selftest/quicktest: Update known failures for the sfileinfo and oplock changes
Tim Prouty [Fri, 4 Dec 2009 01:01:53 +0000 (17:01 -0800)]
s4 selftest/quicktest: Update known failures for the sfileinfo and oplock changes

Two new samba4 bugs have been filed for the two corresponding known
failures.  For the short term raw.sfileinfo had to be removed from
quicktest.  It is no longer an individual test, but a test-suite and
quicktest can only run top level tests.

9 years agos4 torture: Add a new RAW-OPLOCK test: BATCH26
Tim Prouty [Thu, 3 Dec 2009 21:46:11 +0000 (13:46 -0800)]
s4 torture: Add a new RAW-OPLOCK test: BATCH26

Try a rename with a wide-open share mode on an already open file
and the there is still share mode contention.  For the reason why
see:

http://social.msdn.microsoft.com/Forums/en-US/os_fileservices/thread/3ca14dc9-da1f-4786-a8f7-a86e9903db0c

Msft's anser:

   After further review, The reason for server to fail with sharing
   violation is that the windows server that executes a path-based
   rename request opens the file for DELETE access, but only with
   FILE_SHARED_READ as ShareAccess .  Therefore, the existing
   open(frame 76), which has shared read/write/delete , is compatible
   with the Windows servers access mode (DELETE), but Windows servers
   open is not compatible with access mode in existing open.

   Note that it is correct to state that the logic in Windows server
   could have been written to allow shared read/write/delete in which
   case it would succeed as you mention. The behavior here is
   historical based on the existing implementation.

9 years agos4 torture: Close the third handle in RAW-OPLOCK-BATCH22
Tim Prouty [Thu, 3 Dec 2009 21:16:18 +0000 (13:16 -0800)]
s4 torture: Close the third handle in RAW-OPLOCK-BATCH22

9 years agos4 torture: Convert an error to a warning in RAW-OPLOCK-BATCH22
Tim Prouty [Thu, 3 Dec 2009 02:39:05 +0000 (18:39 -0800)]
s4 torture: Convert an error to a warning in RAW-OPLOCK-BATCH22

Some servers choose to mark a client as bad if they fail an oplock
break request by timing out (win7 is an example).  Once the client is
marked as bad, future oplock requests will timeout instantly.  This
causes subsequent runs of this test to fail, so rather than erroring
out as a failure, a warning is printed instead.

There is also a bug in w2k3 where it was incorrectly returning
contending a share mode lock.  It worked in XP and has been re-fixed
in win7.

This can also now be run against samba3.

9 years agos4 torture: Add a few more windows target types
Tim Prouty [Wed, 2 Dec 2009 00:27:10 +0000 (16:27 -0800)]
s4 torture: Add a few more windows target types

9 years agos4 torture: Convert to a more modern version of read in RAW-OPLOCK-BATCH4
Tim Prouty [Fri, 20 Nov 2009 19:25:43 +0000 (11:25 -0800)]
s4 torture: Convert to a more modern version of read in RAW-OPLOCK-BATCH4

9 years agos4 torture: Allow some implementations to break from level1 to none with two breaks
Tim Prouty [Tue, 1 Dec 2009 23:29:00 +0000 (15:29 -0800)]
s4 torture: Allow some implementations to break from level1 to none with two breaks

9 years agoMake sure we're not using the old smb_fname data.
Jeremy Allison [Fri, 4 Dec 2009 01:44:38 +0000 (17:44 -0800)]
Make sure we're not using the old smb_fname data.

Jeremy.

9 years agoRemove smb_fname duplicates that just keep the same information as in fsp->fsp_name.
Jeremy Allison [Fri, 4 Dec 2009 00:45:35 +0000 (16:45 -0800)]
Remove smb_fname duplicates that just keep the same information as in fsp->fsp_name.

Moving towards making VFS_OPEN/VFS_MKDIR/VFS_RMDIR
handle based...
Jeremy.

9 years agos3-spoolss: handle SEC_FLAG_MAXIMUM_ALLOWED in spoolss_OpenPrinterEx.
Günther Deschner [Thu, 3 Dec 2009 22:23:36 +0000 (23:23 +0100)]
s3-spoolss: handle SEC_FLAG_MAXIMUM_ALLOWED in spoolss_OpenPrinterEx.

In case someone (smbtorture4) requests SEC_FLAG_MAXIMUM_ALLOWED, translate it
to a request of PRINTER_ACCESS_ADMINISTER.

Guenther

9 years agos4-smbtorture: check more WERRORs in RPC-SPOOLSS.
Günther Deschner [Thu, 3 Dec 2009 21:38:38 +0000 (22:38 +0100)]
s4-smbtorture: check more WERRORs in RPC-SPOOLSS.

Guenther

9 years agos4-smbtorture: call test_EnumPrinterDrivers with architecture in RPC-SPOOLSS.
Günther Deschner [Thu, 3 Dec 2009 21:05:35 +0000 (22:05 +0100)]
s4-smbtorture: call test_EnumPrinterDrivers with architecture in RPC-SPOOLSS.

Guenther