SHARE_ENTRY_FLAG_POSIX_OPEN = 0x0001,
SHARE_ENTRY_FLAG_STREAM_BASEOPEN = 0x0002,
SHARE_ENTRY_FLAG_DENY_DOS = 0x0004,
- SHARE_ENTRY_FLAG_DENY_FCB = 0x0008
+ SHARE_ENTRY_FLAG_DENY_FCB = 0x0008,
+ SHARE_ENTRY_FLAG_PERSISTENT_OPEN = 0x0010
} share_entry_flags;
typedef [enum16bit] enum {
hyper op_mid;
share_mode_entry_op_type op_type;
GUID client_guid;
+ GUID create_guid;
smb2_lease_key lease_key;
uint32 access_mask;
uint32 share_access;
* to store this share_mode_entry on disk.
*/
[skip] boolean8 stale;
+ /*
+ * In-memory flag indicating a disconnected Persistent Handle.
+ * We don't want to store this in the share_mode_entry on disk.
+ */
+ [skip] boolean8 protect;
} share_mode_entry;
typedef [public] struct {
uint32 name_hash;
smb2_lease_key parent_lease_key;
+ hyper open_persistent_id;
security_token *delete_nt_token;
security_unix_token *delete_token;
} delete_token;
[string,charset(UTF8)] char *servicepath;
[string,charset(UTF8)] char *base_name;
[string,charset(UTF8)] char *stream_name;
+ uint32 num_persistent;
uint32 num_delete_tokens;
[size_is(num_delete_tokens)] delete_token delete_tokens[];
[skip] boolean8 not_stored;
hyper initial_allocation_size;
hyper position_information;
boolean8 write_time_forced;
+ boolean8 initial_delete_on_close;
vfs_default_durable_stat stat_info;
} vfs_default_durable_cookie;
dtl->parent_lease_key = lease->parent_lease_key;
}
+ if (fsp->op != NULL) {
+ dtl->open_persistent_id = fsp->op->global->open_persistent_id;
+ }
+
dtl->delete_nt_token = security_token_duplicate(d->delete_tokens, nt_tok);
if (dtl->delete_nt_token == NULL) {
return false;
dt->parent_lease_key = lease->parent_lease_key;
}
+ if (fsp->op != NULL) {
+ dt->open_persistent_id =
+ fsp->op->global->open_persistent_id;
+ }
+
TALLOC_FREE(dt->delete_nt_token);
dt->delete_nt_token = security_token_duplicate(dt, nt_tok);
SMB_ASSERT(dt->delete_nt_token != NULL);
}
/*
- * 124 is the sizeof an ndr-encoded struct share_mode_entry_buf.
+ * 140 is the sizeof an ndr-encoded struct share_mode_entry_buf.
* Reading/writing entries will immediately error out if this
* size differs (push/pull is done without allocs).
*/
struct share_mode_entry_buf {
- uint8_t buf[124];
+ uint8_t buf[140];
};
#define SHARE_MODE_ENTRY_SIZE (sizeof(struct share_mode_entry_buf))