From 1c46fb5c3e8a1b5ce0d61f39d934bb68074953cb Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Thu, 24 Nov 2011 14:11:28 +0100 Subject: s3: Use autogenerated open_files.idl --- source3/libsmb/smb_share_modes.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'source3/libsmb') diff --git a/source3/libsmb/smb_share_modes.c b/source3/libsmb/smb_share_modes.c index 42640e0cea..f6f8bf9a1b 100644 --- a/source3/libsmb/smb_share_modes.c +++ b/source3/libsmb/smb_share_modes.c @@ -29,6 +29,7 @@ #include "system/filesys.h" #include "smb_share_modes.h" #include "tdb_compat.h" +#include "librpc/gen_ndr/open_files.h" #include /* Database context handle. */ @@ -41,6 +42,35 @@ struct smbdb_ctx { #undef malloc #endif +/* + * Internal structure of locking.tdb share mode db. + * Used by locking.c and libsmbsharemodes.c + */ + +struct locking_data { + union { + struct { + int num_share_mode_entries; + struct timespec old_write_time; + struct timespec changed_write_time; + uint32 num_delete_token_entries; + } s; + struct share_mode_entry dummy; /* Needed for alignment. */ + } u; + /* The following four entries are implicit + + (1) struct share_mode_entry modes[num_share_mode_entries]; + + (2) A num_delete_token_entries of structs { + uint32_t len_delete_token; + char unix_token[len_delete_token] (divisible by 4). + }; + + (3) char share_name[]; + (4) char file_name[]; + */ +}; + int smb_create_share_mode_entry_ex(struct smbdb_ctx *db_ctx, uint64_t dev, uint64_t ino, uint64_t extid, const struct smb_share_mode_entry *new_entry, -- cgit