s3:smbd: use smbXsrv_open_close() instead of smbXsrv_open_update()

This makes sure we store the correct disconnect_time for disconnected
durable handles.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
s4:torture: add a durable-open-disconnect test (suite)

this opens a durable, disconnects it and exits

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
s4:torture:smb2:durable: make test functions static

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
s4:torture:smb2: fix segfault on error condition in durable-open.reopen2 test

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
s4:torture:smb2: fix segfault on error condition in the durable-open.reopen2a test

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
s4:torture:smb2: fix segfault on error condition in the durable-open.reopen3 test

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
s4:torture:smb2: fix segfault on error condition in the durable-open.reopen4 test

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
s4:torture:smb2: fix segfault on error condition in the durable-open.delete_on_close1 test

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
s4:torture:smb2: fix segfault on error condition in the durable-open.delete_on_close2 test

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
s4:torture: fix segfault in test_durable_open_open2_oplock()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
s3:smbd: add debugging to close code (regarding disconnect of a durable)

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Mon Feb 18 17:42:45 CET 2013 on sn-devel-104
samba_upgradeprovision: Remove options to fix FS ACLs

samba-tool ntacl sysvolreset handles this better, and makes this tool
much less confusing internally.

Andrew Bartlett

Reviewed-by: Matthieu Patou <mat@samba.org>

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Tue Feb 19 06:06:41 CET 2013 on sn-devel-104
scripting: Make tdb_copy use the python subprocess module

This makes the code more robust to spaces in the file names (etc).

Andrew Bartlett

Reviewed-by: Matthieu Patou <mat@samba.org>
scripting: Make tdb_copy a common util function in samba.tdb_util

This will allow samba_upgradeprovision to also call it.

Andrew Bartlett

Reviewed-by: Matthieu Patou <mat@samba.org>
samba_upgradeprovision: Do not update privileges.ldb any more (unchanged since 2009)

This update was only a total oblitoration of the existing database
and not a merge, and the shutil.copy would both disregard and break
locks on the database that are held at this point.

Andrew Bartlett

Reviewed-by: Matthieu Patou <mat@samba.org>
samba_upgradeprovision: Use tdb_util.tdb_copy not shutil.copy2

This is really important, because copying a file will both ignore
locks held by another process and break any locks we hold (due to
POSIX brain-damage regarding multiple fds on one file in a process).

By leaving this to tdbbackup in a child, both of these issues are avoided.

Andrew Bartlett

Reviewed-by: Matthieu Patou <mat@samba.org>

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Tue Feb 19 07:48:18 CET 2013 on sn-devel-104
s3:smbd:smb2: fix segfault (access after free) in durable disconnect code

Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>

Signed-off-by: Michael Adam <obnox@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Tue Feb 19 11:12:01 CET 2013 on sn-devel-104
s3:smbXsrv_session: pass record in smbXsrv_session_global_traverse()

Signed-off-by: Gregor Beck <gbeck@sernet.de>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
s3:smbXsrv_tcon: pass record in smbXsrv_tcon_global_traverse()

Signed-off-by: Gregor Beck <gbeck@sernet.de>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
s3:smbXsrv_open: add smbXsrv_open_global_traverse()

Signed-off-by: Gregor Beck <gbeck@sernet.de>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>