uint32 security_info, SEC_DESC **ppdesc);
NTSTATUS onefs_fset_nt_acl(vfs_handle_struct *handle, files_struct *fsp,
- uint32 security_info_sent, SEC_DESC *psd);
+ uint32 security_info_sent, const SEC_DESC *psd);
/*
* Utility functions
*/
struct ifs_security_descriptor;
-NTSTATUS onefs_samba_sd_to_sd(uint32_t security_info_sent, SEC_DESC *psd,
+NTSTATUS onefs_samba_sd_to_sd(uint32_t security_info_sent, const SEC_DESC *psd,
struct ifs_security_descriptor *sd, int snum,
uint32_t *security_info_effective);
*
* @return NTSTATUS_OK if successful
*/
-NTSTATUS onefs_samba_sd_to_sd(uint32_t security_info_sent, SEC_DESC *psd,
+NTSTATUS onefs_samba_sd_to_sd(uint32_t security_info_sent, const SEC_DESC *psd,
struct ifs_security_descriptor *sd, int snum,
uint32_t *security_info_effective)
{
*/
NTSTATUS
onefs_fset_nt_acl(vfs_handle_struct *handle, files_struct *fsp,
- uint32_t sec_info_sent, SEC_DESC *psd)
+ uint32_t sec_info_sent, const SEC_DESC *psd)
{
struct ifs_security_descriptor sd = {};
int fd = -1;
}
static struct file_id onefs_file_id_create(struct vfs_handle_struct *handle,
- SMB_STRUCT_STAT *sbuf)
+ const SMB_STRUCT_STAT *sbuf)
{
struct file_id key;
}
static struct vfs_fn_pointers onefs_fns = {
- .connect = onefs_connect,
+ .connect_fn = onefs_connect,
.fs_capabilities = onefs_fs_capabilities,
.opendir = onefs_opendir,
.readdir = onefs_readdir,
.seekdir = onefs_seekdir,
.telldir = onefs_telldir,
- .rewinddir = onefs_rewinddir,
+ .rewind_dir = onefs_rewinddir,
.mkdir = onefs_mkdir,
.closedir = onefs_closedir,
.init_search_op = onefs_init_search_op,
.open = onefs_open,
.create_file = onefs_create_file,
- .close = onefs_close,
+ .close_fn = onefs_close,
.sendfile = onefs_sendfile,
.recvfile = onefs_recvfile,
.rename = onefs_rename,
/**
* XXX: macro-ize
*/
-static bool
+static int
onefs_shadow_copy_symlink(vfs_handle_struct *handle,
const char *oldpath, const char *newpath)
{
.chdir = onefs_shadow_copy_chdir,
.ntimes = onefs_shadow_copy_ntimes,
.symlink = onefs_shadow_copy_symlink,
- .readlink = onefs_shadow_copy_readlink,
+ .vfs_readlink = onefs_shadow_copy_readlink,
.link = onefs_shadow_copy_link,
.mknod = onefs_shadow_copy_mknod,
.realpath = onefs_shadow_copy_realpath,
char *result;
if (r == NULL) {
- result = talloc_strdup(dbg_ctx(), "NULL callback record");
+ result = talloc_strdup(debug_ctx(), "NULL callback record");
return result;
}
switch (r->state) {
case ONEFS_OPEN_FILE:
- result = talloc_asprintf(dbg_ctx(), "cb record %llu for file "
- "%s", r->id,
+ result = talloc_asprintf(debug_ctx(), "cb record %llu for "
+ "file %s", r->id,
fsp_str_dbg(r->data.fsp));
case ONEFS_WAITING_FOR_OPLOCK:
- result = talloc_asprintf(dbg_ctx(), "cb record %llu for "
+ result = talloc_asprintf(debug_ctx(), "cb record %llu for "
"pending mid %d", r->id,
(int)r->data.mid);
break;
default:
- result = talloc_asprintf(dbg_ctx(), "cb record %llu unknown "
+ result = talloc_asprintf(debug_ctx(), "cb record %llu unknown "
"state %d", r->id, r->state);
break;
}
DEBUG(10, ("cb records (%s):\n", fn));
for (rec = callback_recs; rec; rec = rec->next) {
- DEBUGADD(10, ("%s\n", onefs_cb_record_dbg_str(rec)));
+ DEBUGADD(10, ("%s\n", onefs_cb_record_str_dbg(rec)));
}
}
for (rec = callback_recs; rec; rec = rec->next) {
if (rec->id == id) {
DEBUG(10, ("found %s\n",
- onefs_cb_record_dbg_str(rec)));
+ onefs_cb_record_str_dbg(rec)));
break;
}
}
if (rec->state != expected_state) {
DEBUG(0, ("Expected cb type %d, got %s", expected_state,
- onefs_cb_record_dbg_str(rec)));
+ onefs_cb_record_str_dbg(rec)));
SMB_ASSERT(0);
return NULL;
}
}
DEBUG(10, ("oplock_break_to_none_handler called for file %s\n",
- cb->data.fsp_str_dbg(fsp)));
+ fsp_str_dbg(cb->data.fsp)));
init_share_mode_entry(&sme, cb, FORCE_OPLOCK_BREAK_TO_NONE);
share_mode_entry_to_message(msg, &sme);
}
DEBUG(10, ("oplock_break_to_level_two_handler called for file %s\n",
- cb->data.fsp_str_dbg(fsp)));
+ fsp_str_dbg(cb->data.fsp)));
init_share_mode_entry(&sme, cb, LEVEL_II_OPLOCK);
share_mode_entry_to_message(msg, &sme);
char *msg;
if (asprintf(&msg, "Semlock available on an open that wasn't "
"deferred: %s\n",
- onefs_cb_record_dbg_str(cb)) != -1) {
+ onefs_cb_record_str_dbg(cb)) != -1) {
smb_panic(msg);
}
smb_panic("Semlock available on an open that wasn't "
char *msg;
if (asprintf(&msg, "Semlock failure on an open that wasn't "
"deferred: %s\n",
- onefs_cb_record_dbg_str(cb)) != -1) {
+ onefs_cb_record_str_dbg(cb)) != -1) {
smb_panic(msg);
}
smb_panic("Semlock failure on an open that wasn't deferred\n");