summaryrefslogtreecommitdiff
path: root/source4/librpc
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2006-02-28 03:47:02 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:52:08 -0500
commit40a8d58551526a0f367d23d0c9603a5b9d86b270 (patch)
treeecc25f71a1ae366b757e711c8f69bd206903092e /source4/librpc
parente3e048630be2fbf20d580850e5673ad372bd34f0 (diff)
downloadsamba-40a8d58551526a0f367d23d0c9603a5b9d86b270.tar.gz
samba-40a8d58551526a0f367d23d0c9603a5b9d86b270.tar.bz2
samba-40a8d58551526a0f367d23d0c9603a5b9d86b270.zip
r13739: a fairly major overhaul of the opendb code to allow the BASE-DELETE
test to pass. To try to make the code a bit more understandable, I moved to using an IDL description of the opendb tdb record format. One of the larger changes was to make directory opens and creates go via the opendb code, so directory operations now obey all the share mode restrictions, as well as delete on close semantics. I also changed the period over which the opendb locks are held, to try to minimise races due to two open operations happening at the same time. (This used to be commit cd2602d05725e1734b0862131dd91601c6b6d51a)
Diffstat (limited to 'source4/librpc')
-rw-r--r--source4/librpc/config.mk7
-rw-r--r--source4/librpc/idl/opendb.idl39
2 files changed, 45 insertions, 1 deletions
diff --git a/source4/librpc/config.mk b/source4/librpc/config.mk
index 131531dad5..a827e481f8 100644
--- a/source4/librpc/config.mk
+++ b/source4/librpc/config.mk
@@ -286,6 +286,11 @@ OBJ_FILES = gen_ndr/ndr_xattr.o
NOPROTO = YES
REQUIRED_SUBSYSTEMS = LIBNDR
+[SUBSYSTEM::NDR_OPENDB]
+OBJ_FILES = gen_ndr/ndr_opendb.o
+NOPROTO = YES
+REQUIRED_SUBSYSTEMS = LIBNDR
+
[SUBSYSTEM::NDR_SCHANNEL]
OBJ_FILES = gen_ndr/ndr_schannel.o
NOPROTO = YES
@@ -319,7 +324,7 @@ REQUIRED_SUBSYSTEMS = NDR_IFACE_TABLE NDR_AUDIOSRV NDR_ECHO NDR_DCERPC NDR_EXCHA
NDR_REMACT NDR_WZCSVC NDR_BROWSER NDR_W32TIME NDR_SCERPC NDR_NTSVCS \
NDR_NETLOGON NDR_TRKWKS NDR_KEYSVC NDR_KRB5PAC NDR_XATTR NDR_SCHANNEL \
NDR_ROT NDR_DRSBLOBS NDR_SVCCTL NDR_NBT NDR_WINSREPL NDR_SECURITY \
- NDR_INITSHUTDOWN NDR_DNSSERVER NDR_WINSTATION NDR_IRPC NDR_DCOM \
+ NDR_INITSHUTDOWN NDR_DNSSERVER NDR_WINSTATION NDR_IRPC NDR_DCOM NDR_OPENDB \
NDR_SASL_HELPERS
[SUBSYSTEM::RPC_NDR_ROT]
diff --git a/source4/librpc/idl/opendb.idl b/source4/librpc/idl/opendb.idl
new file mode 100644
index 0000000000..3754d233f6
--- /dev/null
+++ b/source4/librpc/idl/opendb.idl
@@ -0,0 +1,39 @@
+#include "idl_types.h"
+
+/*
+ IDL structures for opendb code
+
+ this defines the structures used in the opendb database code, in
+ ntvfs/common/opendb.c
+*/
+
+[
+ pointer_default(unique)
+]
+interface opendb
+{
+ typedef struct {
+ uint32 server;
+ uint32 stream_id;
+ uint32 share_access;
+ uint32 access_mask;
+ pointer file_handle;
+ /* we need a per-entry delete on close, as well as a per-file
+ one, to cope with strange semantics on open */
+ bool8 delete_on_close;
+ } opendb_entry;
+
+ typedef struct {
+ uint32 server;
+ pointer notify_ptr;
+ } opendb_pending;
+
+ typedef [public] struct {
+ bool8 delete_on_close;
+ utf8string path;
+ uint32 num_entries;
+ opendb_entry entries[num_entries];
+ uint32 num_pending;
+ opendb_pending pending[num_pending];
+ } opendb_file;
+}