mirror of
https://github.com/samba-team/samba.git
synced 2024-12-25 23:21:54 +03:00
5bba79d639
share_mode_data->fresh was very similar, but only set and never used. Now we remember 'not_stored' instead, the 'not_' is easier as ndr_pull sets [skip] elements to 0. We use this as indication to move the value to memcache. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15125 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
134 lines
3.5 KiB
Plaintext
134 lines
3.5 KiB
Plaintext
#include "idl_types.h"
|
|
|
|
import "server_id.idl";
|
|
import "security.idl";
|
|
import "file_id.idl";
|
|
import "smb2_lease_struct.idl";
|
|
import "misc.idl";
|
|
|
|
[
|
|
pointer_default(unique)
|
|
]
|
|
|
|
interface open_files
|
|
{
|
|
typedef [enum16bit] enum {
|
|
SHARE_MODE_ENTRY_OP_TYPE_NONE = 0,
|
|
SHARE_MODE_ENTRY_OP_TYPE_EXCLUSIVE = 1,
|
|
SHARE_MODE_ENTRY_OP_TYPE_BATCH_WITHOUT_EXCLUSIVE = 2,
|
|
SHARE_MODE_ENTRY_OP_TYPE_BATCH = 3,
|
|
SHARE_MODE_ENTRY_OP_TYPE_LEVEL_II = 4,
|
|
SHARE_MODE_ENTRY_OP_TYPE_LEASE = 0x100
|
|
} share_mode_entry_op_type;
|
|
|
|
typedef [public] struct {
|
|
server_id pid;
|
|
hyper op_mid;
|
|
share_mode_entry_op_type op_type;
|
|
GUID client_guid;
|
|
smb2_lease_key lease_key;
|
|
uint32 access_mask;
|
|
uint32 share_access;
|
|
uint32 private_options;
|
|
timeval time;
|
|
udlong share_file_id;
|
|
uint32 uid;
|
|
uint16 flags;
|
|
uint32 name_hash;
|
|
|
|
/*
|
|
* In-memory flag indicating a non-existing pid. We don't want
|
|
* to store this share_mode_entry on disk.
|
|
*/
|
|
[skip] boolean8 stale;
|
|
} share_mode_entry;
|
|
|
|
typedef [public] struct {
|
|
uint32 name_hash;
|
|
security_token *delete_nt_token;
|
|
security_unix_token *delete_token;
|
|
} delete_token;
|
|
|
|
typedef [public,bitmap16bit] bitmap {
|
|
SHARE_MODE_SHARE_DELETE = 0x100,
|
|
SHARE_MODE_SHARE_WRITE = 0x080,
|
|
SHARE_MODE_SHARE_READ = 0x040,
|
|
SHARE_MODE_ACCESS_DELETE = 0x020,
|
|
SHARE_MODE_ACCESS_WRITE = 0x010,
|
|
SHARE_MODE_ACCESS_READ = 0x008,
|
|
SHARE_MODE_LEASE_HANDLE = 0x004,
|
|
SHARE_MODE_LEASE_WRITE = 0x002,
|
|
SHARE_MODE_LEASE_READ = 0x001
|
|
} share_mode_flags;
|
|
|
|
typedef [public] struct {
|
|
hyper unique_content_epoch;
|
|
share_mode_flags flags;
|
|
[string,charset(UTF8)] char *servicepath;
|
|
[string,charset(UTF8)] char *base_name;
|
|
[string,charset(UTF8)] char *stream_name;
|
|
uint32 num_delete_tokens;
|
|
[size_is(num_delete_tokens)] delete_token delete_tokens[];
|
|
NTTIME old_write_time;
|
|
NTTIME changed_write_time;
|
|
[skip] boolean8 not_stored;
|
|
[skip] boolean8 modified;
|
|
[ignore] file_id id; /* In memory key used to lookup cache. */
|
|
} share_mode_data;
|
|
|
|
/* these are 0x30 (48) characters */
|
|
const string VFS_DEFAULT_DURABLE_COOKIE_MAGIC =
|
|
"VFS_DEFAULT_DURABLE_COOKIE_MAGIC ";
|
|
const uint32 VFS_DEFAULT_DURABLE_COOKIE_VERSION = 0;
|
|
|
|
/* this corresponds to struct stat_ex (SMB_STRUCT_STAT) */
|
|
typedef struct {
|
|
hyper st_ex_dev;
|
|
hyper st_ex_ino;
|
|
hyper st_ex_mode;
|
|
hyper st_ex_nlink;
|
|
hyper st_ex_uid;
|
|
hyper st_ex_gid;
|
|
hyper st_ex_rdev;
|
|
hyper st_ex_size;
|
|
timespec st_ex_atime;
|
|
timespec st_ex_mtime;
|
|
timespec st_ex_ctime;
|
|
timespec st_ex_btime;
|
|
hyper st_ex_blksize;
|
|
hyper st_ex_blocks;
|
|
uint32 st_ex_flags;
|
|
uint32 st_ex_iflags;
|
|
} vfs_default_durable_stat;
|
|
|
|
typedef [public] struct {
|
|
[value(VFS_DEFAULT_DURABLE_COOKIE_MAGIC),charset(DOS)] uint8 magic[0x30];
|
|
[value(VFS_DEFAULT_DURABLE_COOKIE_VERSION)] uint32 version;
|
|
boolean8 allow_reconnect;
|
|
file_id id;
|
|
[string,charset(UTF8)] char *servicepath;
|
|
[string,charset(UTF8)] char *base_name;
|
|
hyper initial_allocation_size;
|
|
hyper position_information;
|
|
boolean8 update_write_time_triggered;
|
|
boolean8 update_write_time_on_close;
|
|
boolean8 write_time_forced;
|
|
NTTIME close_write_time;
|
|
vfs_default_durable_stat stat_info;
|
|
} vfs_default_durable_cookie;
|
|
|
|
typedef [public] struct {
|
|
file_id id;
|
|
udlong share_file_id;
|
|
uint8 break_to;
|
|
} oplock_break_message;
|
|
|
|
typedef [public] struct {
|
|
file_id id;
|
|
udlong share_file_id;
|
|
[string,charset(UTF8)] char *servicepath;
|
|
[string,charset(UTF8)] char *base_name;
|
|
[string,charset(UTF8)] char *stream_name;
|
|
} file_rename_message;
|
|
}
|