return NULL;
}
+/*******************************************************************
+ Create a storable data blob from a modified share_mode_data struct.
+********************************************************************/
+
static TDB_DATA unparse_share_modes(struct share_mode_data *d)
{
DATA_BLOB blob;
return make_tdb_data(blob.data, blob.length);
}
+/*******************************************************************
+ If modified, store the share_mode_data back into the database.
+********************************************************************/
+
static int share_mode_data_destructor(struct share_mode_data *d)
{
NTSTATUS status;
return 0;
}
+/*******************************************************************
+ Allocate a new share_mode_data struct, mark it unmodified.
+ fresh is set to note that currently there is no database entry.
+********************************************************************/
+
static struct share_mode_data *fresh_share_mode_lock(
TALLOC_CTX *mem_ctx, const char *servicepath,
const struct smb_filename *smb_fname,
return NULL;
}
+/*******************************************************************
+ Either fetch a share mode from the database, or allocate a fresh
+ one if the record doesn't exist.
+********************************************************************/
+
static struct share_mode_lock *get_share_mode_lock_internal(
TALLOC_CTX *mem_ctx, const struct file_id id,
const char *servicepath, const struct smb_filename *smb_fname,
return 0;
}
+/*******************************************************************
+ Get a share_mode_lock, Reference counted to allow nexted calls.
+********************************************************************/
+
struct share_mode_lock *get_share_mode_lock_fresh(
TALLOC_CTX *mem_ctx,
const struct file_id id,
return NULL;
}
+/*******************************************************************
+ Get a share_mode_lock without locking the database or reference
+ counting. Used by smbstatus to display existing share modes.
+********************************************************************/
+
struct share_mode_lock *fetch_share_mode_unlocked(TALLOC_CTX *mem_ctx,
const struct file_id id)
{