Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
26 files changed:
bool can_read : 1;
bool can_write : 1;
bool modified : 1;
bool can_read : 1;
bool can_write : 1;
bool modified : 1;
} fsp_flags;
struct tevent_timer *update_write_time_event;
} fsp_flags;
struct tevent_timer *update_write_time_event;
struct lock_struct last_lock_failure;
int current_lock_count; /* Count the number of outstanding locks and pending locks. */
struct lock_struct last_lock_failure;
int current_lock_count; /* Count the number of outstanding locks and pending locks. */
bool aio_write_behind;
bool initial_delete_on_close; /* Only set at NTCreateX if file was created. */
bool delete_on_close;
bool aio_write_behind;
bool initial_delete_on_close; /* Only set at NTCreateX if file was created. */
bool delete_on_close;
struct byte_range_lock *br_lck = NULL;
if (!fsp->fsp_flags.can_lock) {
struct byte_range_lock *br_lck = NULL;
if (!fsp->fsp_flags.can_lock) {
- return fsp->is_directory ? NT_STATUS_INVALID_DEVICE_REQUEST : NT_STATUS_INVALID_HANDLE;
+ return fsp->fsp_flags.is_directory ?
+ NT_STATUS_INVALID_DEVICE_REQUEST :
+ NT_STATUS_INVALID_HANDLE;
}
if (!lp_locking(fsp->conn->params)) {
}
if (!lp_locking(fsp->conn->params)) {
}
if (!fsp->fsp_flags.can_lock) {
}
if (!fsp->fsp_flags.can_lock) {
- if (fsp->is_directory) {
+ if (fsp->fsp_flags.is_directory) {
return NT_STATUS_INVALID_DEVICE_REQUEST;
}
return NT_STATUS_INVALID_HANDLE;
return NT_STATUS_INVALID_DEVICE_REQUEST;
}
return NT_STATUS_INVALID_HANDLE;
struct byte_range_lock *br_lck = NULL;
if (!fsp->fsp_flags.can_lock) {
struct byte_range_lock *br_lck = NULL;
if (!fsp->fsp_flags.can_lock) {
- return fsp->is_directory ? NT_STATUS_INVALID_DEVICE_REQUEST : NT_STATUS_INVALID_HANDLE;
+ return fsp->fsp_flags.is_directory ?
+ NT_STATUS_INVALID_DEVICE_REQUEST :
+ NT_STATUS_INVALID_HANDLE;
}
if (!lp_locking(fsp->conn->params)) {
}
if (!lp_locking(fsp->conn->params)) {
reset_delete_on_close_lck(fsp, lck);
}
reset_delete_on_close_lck(fsp, lck);
}
- if (fsp->is_directory) {
+ if (fsp->fsp_flags.is_directory) {
SMB_ASSERT(!is_ntfs_stream_smb_fname(fsp->fsp_name));
send_stat_cache_delete_message(fsp->conn->sconn->msg_ctx,
fsp->fsp_name->base_name);
SMB_ASSERT(!is_ntfs_stream_smb_fname(fsp->fsp_name));
send_stat_cache_delete_message(fsp->conn->sconn->msg_ctx,
fsp->fsp_name->base_name);
return NT_STATUS_ACCESS_DENIED;
}
return NT_STATUS_ACCESS_DENIED;
}
- if (src_fsp->is_directory) {
+ if (src_fsp->fsp_flags.is_directory) {
DBG_INFO("copy chunk no read on src directory handle (%s).\n",
smb_fname_str_dbg(src_fsp->fsp_name));
return NT_STATUS_ACCESS_DENIED;
}
DBG_INFO("copy chunk no read on src directory handle (%s).\n",
smb_fname_str_dbg(src_fsp->fsp_name));
return NT_STATUS_ACCESS_DENIED;
}
- if (dst_fsp->is_directory) {
+ if (dst_fsp->fsp_flags.is_directory) {
DBG_INFO("copy chunk no read on dst directory handle (%s).\n",
smb_fname_str_dbg(dst_fsp->fsp_name));
return NT_STATUS_ACCESS_DENIED;
DBG_INFO("copy chunk no read on dst directory handle (%s).\n",
smb_fname_str_dbg(dst_fsp->fsp_name));
return NT_STATUS_ACCESS_DENIED;
return NT_STATUS_NO_MEMORY;
}
return NT_STATUS_NO_MEMORY;
}
- if (!fsp->is_directory) {
+ if (!fsp->fsp_flags.is_directory) {
/* We need to get the name of the directory containing the
* file, this is where the AFS acls live */
char *p = strrchr(name, '/');
/* We need to get the name of the directory containing the
* file, this is where the AFS acls live */
char *p = strrchr(name, '/');
split_afs_acl(&old_afs_acl, &dir_acl, &file_acl);
split_afs_acl(&old_afs_acl, &dir_acl, &file_acl);
- if (fsp->is_directory) {
+ if (fsp->fsp_flags.is_directory) {
if (!strequal(fileacls, "yes")) {
/* Throw away file acls, we depend on the
if (!strequal(fileacls, "yes")) {
/* Throw away file acls, we depend on the
- if (fsp->is_directory) {
+ if (fsp->fsp_flags.is_directory) {
parent_dir = fsp->fsp_name->base_name;
} else {
ret = ceph_snap_get_parent_path(handle->conn->connectpath,
parent_dir = fsp->fsp_name->base_name;
} else {
ret = ceph_snap_get_parent_path(handle->conn->connectpath,
struct stream_struct *tmp_streams = NULL;
int ret;
struct stream_struct *tmp_streams = NULL;
int ret;
- if ((fsp != NULL) && (fsp->is_directory)) {
+ if ((fsp != NULL) && (fsp->fsp_flags.is_directory)) {
/*
* No default streams on directories
*/
/*
* No default streams on directories
*/
fsp = *result;
if (global_fruit_config.nego_aapl) {
fsp = *result;
if (global_fruit_config.nego_aapl) {
- if (config->posix_rename && fsp->is_directory) {
+ if (config->posix_rename && fsp->fsp_flags.is_directory) {
/*
* Enable POSIX directory rename behaviour
*/
/*
* Enable POSIX directory rename behaviour
*/
- if (is_named_stream(smb_fname)
- || fsp->is_directory) {
+ if (is_named_stream(smb_fname) || fsp->fsp_flags.is_directory) {
SMB_VFS_HANDLE_GET_DATA(handle, config,
struct virusfilter_config, return -1);
SMB_VFS_HANDLE_GET_DATA(handle, config,
struct virusfilter_config, return -1);
- if (fsp->is_directory) {
+ if (fsp->fsp_flags.is_directory) {
DBG_INFO("Not scanned: Directory: %s/\n", cwd_fname);
goto virusfilter_vfs_open_next;
}
DBG_INFO("Not scanned: Directory: %s/\n", cwd_fname);
goto virusfilter_vfs_open_next;
}
goto virusfilter_vfs_close_fail;
}
goto virusfilter_vfs_close_fail;
}
- if (fsp->is_directory) {
+ if (fsp->fsp_flags.is_directory) {
DBG_INFO("Not scanned: Directory: %s/\n", cwd_fname);
return close_result;
}
DBG_INFO("Not scanned: Directory: %s/\n", cwd_fname);
return close_result;
}
fsp->fsp_flags.modified = false;
fsp->oplock_type = NO_OPLOCK;
fsp->sent_oplock_break = NO_BREAK_SENT;
fsp->fsp_flags.modified = false;
fsp->oplock_type = NO_OPLOCK;
fsp->sent_oplock_break = NO_BREAK_SENT;
- fsp->is_directory = false;
+ fsp->fsp_flags.is_directory = false;
NTSTATUS status;
struct files_struct *base_fsp = fsp->base_fsp;
NTSTATUS status;
struct files_struct *base_fsp = fsp->base_fsp;
- if(fsp->is_directory) {
+ if (fsp->fsp_flags.is_directory) {
status = close_directory(req, fsp, close_type);
} else if (fsp->fake_file_handle != NULL) {
status = close_fake_file(req, fsp);
status = close_directory(req, fsp, close_type);
} else if (fsp->fake_file_handle != NULL) {
status = close_fake_file(req, fsp);
- if (!fsp->is_directory) {
+ if (!fsp->fsp_flags.is_directory) {
errno = EBADF;
goto fail;
}
errno = EBADF;
goto fail;
}
return NT_STATUS_ACCESS_DENIED;
}
return NT_STATUS_ACCESS_DENIED;
}
- if (fsp->is_directory) {
+ if (fsp->fsp_flags.is_directory) {
DEBUG(9, ("invalid attempt to %s sparse flag on dir %s\n",
(sparse ? "set" : "clear"),
smb_fname_str_dbg(fsp->fsp_name)));
DEBUG(9, ("invalid attempt to %s sparse flag on dir %s\n",
(sparse ? "set" : "clear"),
smb_fname_str_dbg(fsp->fsp_name)));
return NT_STATUS_NOT_SUPPORTED;
}
return NT_STATUS_NOT_SUPPORTED;
}
- if (fsp->is_directory) {
+ if (fsp->fsp_flags.is_directory) {
return NT_STATUS_NOT_SUPPORTED;
}
return NT_STATUS_NOT_SUPPORTED;
}
/*
* no durables for directories
*/
/*
* no durables for directories
*/
- fsp->is_directory = false;
+ fsp->fsp_flags.is_directory = false;
/*
* For normal files, can_lock == !is_directory
*/
/*
* For normal files, can_lock == !is_directory
*/
}
/* Don't allow delete on close for non-empty directories. */
}
/* Don't allow delete on close for non-empty directories. */
- if (fsp->is_directory) {
+ if (fsp->fsp_flags.is_directory) {
SMB_ASSERT(!is_ntfs_stream_smb_fname(fsp->fsp_name));
/* Or the root of a share. */
SMB_ASSERT(!is_ntfs_stream_smb_fname(fsp->fsp_name));
/* Or the root of a share. */
fsp->file_id = vfs_file_id_from_sbuf(conn, &fsp->fsp_name->st);
fsp->access_mask = FILE_LIST_DIRECTORY;
fsp->file_id = vfs_file_id_from_sbuf(conn, &fsp->fsp_name->st);
fsp->access_mask = FILE_LIST_DIRECTORY;
- fsp->is_directory = true;
+ fsp->fsp_flags.is_directory = true;
*_fsp = fsp;
return NT_STATUS_OK;
*_fsp = fsp;
return NT_STATUS_OK;
CAN_WRITE(from->conn) &&
((access_mask & (FILE_WRITE_DATA | FILE_APPEND_DATA)) != 0);
to->fsp_flags.modified = from->fsp_flags.modified;
CAN_WRITE(from->conn) &&
((access_mask & (FILE_WRITE_DATA | FILE_APPEND_DATA)) != 0);
to->fsp_flags.modified = from->fsp_flags.modified;
- to->is_directory = from->is_directory;
+ to->fsp_flags.is_directory = from->fsp_flags.is_directory;
to->aio_write_behind = from->aio_write_behind;
return fsp_set_smb_fname(to, from->fsp_name);
to->aio_write_behind = from->aio_write_behind;
return fsp_set_smb_fname(to, from->fsp_name);
SSVAL(p,2,file_status);
}
p += 4;
SSVAL(p,2,file_status);
}
p += 4;
- SCVAL(p,0,fsp->is_directory ? 1 : 0);
+ SCVAL(p,0,fsp->fsp_flags.is_directory ? 1 : 0);
if (flags & EXTENDED_RESPONSE_REQUIRED) {
uint32_t perms = 0;
p += 25;
if (flags & EXTENDED_RESPONSE_REQUIRED) {
uint32_t perms = 0;
p += 25;
- if (fsp->is_directory ||
+ if (fsp->fsp_flags.is_directory ||
fsp->fsp_flags.can_write ||
can_write_to_file(conn, smb_fname)) {
perms = FILE_GENERIC_ALL;
fsp->fsp_flags.can_write ||
can_write_to_file(conn, smb_fname)) {
perms = FILE_GENERIC_ALL;
SSVAL(p,2,file_status);
}
p += 4;
SSVAL(p,2,file_status);
}
p += 4;
- SCVAL(p,0,fsp->is_directory ? 1 : 0);
+ SCVAL(p,0,fsp->fsp_flags.is_directory ? 1 : 0);
if (flags & EXTENDED_RESPONSE_REQUIRED) {
uint32_t perms = 0;
p += 25;
if (flags & EXTENDED_RESPONSE_REQUIRED) {
uint32_t perms = 0;
p += 25;
- if (fsp->is_directory ||
+ if (fsp->fsp_flags.is_directory ||
fsp->fsp_flags.can_write ||
can_write_to_file(conn, smb_fname)) {
perms = FILE_GENERIC_ALL;
fsp->fsp_flags.can_write ||
can_write_to_file(conn, smb_fname)) {
perms = FILE_GENERIC_ALL;
TALLOC_FREE(filter_string);
}
TALLOC_FREE(filter_string);
}
- if((!fsp->is_directory) || (conn != fsp->conn)) {
+ if((!fsp->fsp_flags.is_directory) || (conn != fsp->conn)) {
reply_nterror(req, NT_STATUS_INVALID_PARAMETER);
return;
}
reply_nterror(req, NT_STATUS_INVALID_PARAMETER);
return;
}
const char *final_component = NULL;
bool ok;
const char *final_component = NULL;
bool ok;
- if (fsp->is_directory) {
+ if (fsp->fsp_flags.is_directory) {
parent_dir = talloc_strdup(talloc_tos(), smb_fname->base_name);
if (parent_dir == NULL) {
saved_errno = errno;
parent_dir = talloc_strdup(talloc_tos(), smb_fname->base_name);
if (parent_dir == NULL) {
saved_errno = errno;
fsp->print_file = NULL;
fsp->fsp_flags.modified = false;
fsp->sent_oplock_break = NO_BREAK_SENT;
fsp->print_file = NULL;
fsp->fsp_flags.modified = false;
fsp->sent_oplock_break = NO_BREAK_SENT;
- fsp->is_directory = False;
+ fsp->fsp_flags.is_directory = false;
if (conn->aio_write_behind_list &&
is_in_path(smb_fname->base_name, conn->aio_write_behind_list,
conn->case_sensitive)) {
if (conn->aio_write_behind_list &&
is_in_path(smb_fname->base_name, conn->aio_write_behind_list,
conn->case_sensitive)) {
fsp->fsp_flags.modified = false;
fsp->oplock_type = NO_OPLOCK;
fsp->sent_oplock_break = NO_BREAK_SENT;
fsp->fsp_flags.modified = false;
fsp->oplock_type = NO_OPLOCK;
fsp->sent_oplock_break = NO_BREAK_SENT;
- fsp->is_directory = True;
+ fsp->fsp_flags.is_directory = true;
if (file_attributes & FILE_FLAG_POSIX_SEMANTICS) {
fsp->posix_flags |= FSP_POSIX_FLAGS_ALL;
}
if (file_attributes & FILE_FLAG_POSIX_SEMANTICS) {
fsp->posix_flags |= FSP_POSIX_FLAGS_ALL;
}
}
inheritable_components = sd_has_inheritable_components(parent_desc,
}
inheritable_components = sd_has_inheritable_components(parent_desc,
+ fsp->fsp_flags.is_directory);
if (!inheritable_components && !inherit_owner) {
TALLOC_FREE(frame);
if (!inheritable_components && !inherit_owner) {
TALLOC_FREE(frame);
parent_desc,
owner_sid,
group_sid,
parent_desc,
owner_sid,
group_sid,
+ fsp->fsp_flags.is_directory);
if (!NT_STATUS_IS_OK(status)) {
TALLOC_FREE(frame);
return status;
if (!NT_STATUS_IS_OK(status)) {
TALLOC_FREE(frame);
return status;
- if (!fsp->is_directory && S_ISDIR(fsp->fsp_name->st.st_ex_mode)) {
+ if (!fsp->fsp_flags.is_directory &&
+ S_ISDIR(fsp->fsp_name->st.st_ex_mode))
+ {
status = NT_STATUS_ACCESS_DENIED;
goto fail;
}
status = NT_STATUS_ACCESS_DENIED;
goto fail;
}
/* Save the requested allocation size. */
if ((info == FILE_WAS_CREATED) || (info == FILE_WAS_OVERWRITTEN)) {
if ((allocation_size > (uint64_t)fsp->fsp_name->st.st_ex_size)
/* Save the requested allocation size. */
if ((info == FILE_WAS_CREATED) || (info == FILE_WAS_OVERWRITTEN)) {
if ((allocation_size > (uint64_t)fsp->fsp_name->st.st_ex_size)
- && !(fsp->is_directory))
+ && !(fsp->fsp_flags.is_directory))
{
fsp->initial_allocation_size = smb_roundup(
fsp->conn, allocation_size);
{
fsp->initial_allocation_size = smb_roundup(
fsp->conn, allocation_size);
- if (!dir_fsp->is_directory) {
+ if (!dir_fsp->fsp_flags.is_directory) {
/*
* Check to see if this is a mac fork of some kind.
/*
* Check to see if this is a mac fork of some kind.
* DLIST_ADD_END) as NT ACLs are order dependent.
*/
* DLIST_ADD_END) as NT ACLs are order dependent.
*/
- if (fsp->is_directory) {
+ if (fsp->fsp_flags.is_directory) {
/*
* We can only add to the default POSIX ACE list if the ACE is
/*
* We can only add to the default POSIX ACE list if the ACE is
canon_ace **ppdir_ace,
const struct security_acl *dacl)
{
canon_ace **ppdir_ace,
const struct security_acl *dacl)
{
- bool all_aces_are_inherit_only = (fsp->is_directory ? True : False);
+ bool all_aces_are_inherit_only = (fsp->fsp_flags.is_directory);
canon_ace *file_ace = NULL;
canon_ace *dir_ace = NULL;
canon_ace *current_ace = NULL;
canon_ace *file_ace = NULL;
canon_ace *dir_ace = NULL;
canon_ace *current_ace = NULL;
- if (fsp->is_directory && all_aces_are_inherit_only) {
+ if (fsp->fsp_flags.is_directory && all_aces_are_inherit_only) {
/*
* Windows 2000 is doing one of these weird 'inherit acl'
* traverses to conserve NTFS ACL resources. Just pretend
/*
* Windows 2000 is doing one of these weird 'inherit acl'
* traverses to conserve NTFS ACL resources. Just pretend
&file_ace,
false,
fsp->conn->params,
&file_ace,
false,
fsp->conn->params,
+ fsp->fsp_flags.is_directory,
pfile_owner_sid,
pfile_grp_sid,
pst);
pfile_owner_sid,
pfile_grp_sid,
pst);
&dir_ace,
true,
fsp->conn->params,
&dir_ace,
true,
fsp->conn->params,
+ fsp->fsp_flags.is_directory,
pfile_owner_sid,
pfile_grp_sid,
pst);
pfile_owner_sid,
pfile_grp_sid,
pst);
* Finally apply it to the file or directory.
*/
* Finally apply it to the file or directory.
*/
- if(default_ace || fsp->is_directory || fsp->fh->fd == -1) {
+ if (default_ace || fsp->fsp_flags.is_directory || fsp->fh->fd == -1) {
if (SMB_VFS_SYS_ACL_SET_FILE(conn, fsp->fsp_name,
the_acl_type, the_acl) == -1) {
/*
if (SMB_VFS_SYS_ACL_SET_FILE(conn, fsp->fsp_name,
the_acl_type, the_acl) == -1) {
/*
/* The owner must have at least read access. */
*posix_perms |= S_IRUSR;
/* The owner must have at least read access. */
*posix_perms |= S_IRUSR;
+ if (fsp->fsp_flags.is_directory)
*posix_perms |= (S_IWUSR|S_IXUSR);
DEBUG(10,("convert_canon_ace_to_posix_perms: converted u=%o,g=%o,w=%o "
*posix_perms |= (S_IWUSR|S_IXUSR);
DEBUG(10,("convert_canon_ace_to_posix_perms: converted u=%o,g=%o,w=%o "
fsp_str_dbg(fsp)));
/* can it happen that fsp_name == NULL ? */
fsp_str_dbg(fsp)));
/* can it happen that fsp_name == NULL ? */
- if (fsp->is_directory || fsp->fh->fd == -1) {
+ if (fsp->fsp_flags.is_directory || fsp->fh->fd == -1) {
status = posix_get_nt_acl(fsp->conn, fsp->fsp_name,
security_info, mem_ctx, ppdesc);
TALLOC_FREE(frame);
status = posix_get_nt_acl(fsp->conn, fsp->fsp_name,
security_info, mem_ctx, ppdesc);
TALLOC_FREE(frame);
- if (acl_perms && acl_set_support && fsp->is_directory) {
+ if (acl_perms && acl_set_support && fsp->fsp_flags.is_directory) {
if (dir_ace_list) {
if (set_acl_as_root) {
become_root();
if (dir_ace_list) {
if (set_acl_as_root) {
become_root();
NTSTATUS status;
int ret;
NTSTATUS status;
int ret;
- if (!fsp->is_directory) {
+ if (!fsp->fsp_flags.is_directory) {
return NT_STATUS_INVALID_HANDLE;
}
return NT_STATUS_INVALID_HANDLE;
}
int ret;
/* This ensures that we also consider the default ACL */
int ret;
/* This ensures that we also consider the default ACL */
- if (fsp->is_directory || fsp->fh->fd == -1) {
+ if (fsp->fsp_flags.is_directory || fsp->fh->fd == -1) {
return posix_sys_acl_blob_get_file(handle,
fsp->fsp_name,
mem_ctx,
return posix_sys_acl_blob_get_file(handle,
fsp->fsp_name,
mem_ctx,
fsp->print_file = NULL;
fsp->fsp_flags.modified = false;
fsp->sent_oplock_break = NO_BREAK_SENT;
fsp->print_file = NULL;
fsp->fsp_flags.modified = false;
fsp->sent_oplock_break = NO_BREAK_SENT;
- fsp->is_directory = S_ISDIR(smb_fname->st.st_ex_mode);
+ fsp->fsp_flags.is_directory = S_ISDIR(smb_fname->st.st_ex_mode);
if (!check_fsp_open(conn, req, fsp)) {
return False;
}
if (!check_fsp_open(conn, req, fsp)) {
return False;
}
- if (fsp->is_directory) {
+ if (fsp->fsp_flags.is_directory) {
reply_nterror(req, NT_STATUS_INVALID_DEVICE_REQUEST);
return False;
}
reply_nterror(req, NT_STATUS_INVALID_DEVICE_REQUEST);
return False;
}
- if (fsp->is_directory) {
+ if (fsp->fsp_flags.is_directory) {
conn == NULL ||
conn != fsp->conn ||
req->vuid != fsp->vuid ||
conn == NULL ||
conn != fsp->conn ||
req->vuid != fsp->vuid ||
+ fsp->fsp_flags.is_directory ||
}
DBG_NOTICE("Close %s fd=%d %s (numopen=%d)\n",
}
DBG_NOTICE("Close %s fd=%d %s (numopen=%d)\n",
- fsp->is_directory ? "directory" : "file",
+ fsp->fsp_flags.is_directory ?
+ "directory" : "file",
fsp->fh->fd, fsp_fnum_dbg(fsp),
conn->num_files_open);
fsp->fh->fd, fsp_fnum_dbg(fsp),
conn->num_files_open);
- if (!fsp->is_directory) {
+ if (!fsp->fsp_flags.is_directory) {
"%s -> %s\n", smb_fname_str_dbg(fsp->fsp_name),
smb_fname_str_dbg(smb_fname_dst)));
"%s -> %s\n", smb_fname_str_dbg(fsp->fsp_name),
smb_fname_str_dbg(smb_fname_dst)));
- if (!fsp->is_directory &&
+ if (!fsp->fsp_flags.is_directory &&
!(fsp->posix_flags & FSP_POSIX_FLAGS_PATHNAMES) &&
(lp_map_archive(SNUM(conn)) ||
lp_store_dos_attributes(SNUM(conn)))) {
!(fsp->posix_flags & FSP_POSIX_FLAGS_PATHNAMES) &&
(lp_map_archive(SNUM(conn)) ||
lp_store_dos_attributes(SNUM(conn)))) {
+ fsp->fsp_flags.is_directory,
fsp->fsp_name,
smb_fname_dst);
fsp->fsp_name,
smb_fname_dst);
bool allow_dir_flush = false;
uint32_t flush_access = FILE_ADD_FILE | FILE_ADD_SUBDIRECTORY;
bool allow_dir_flush = false;
uint32_t flush_access = FILE_ADD_FILE | FILE_ADD_SUBDIRECTORY;
- if (!fsp->is_directory) {
+ if (!fsp->fsp_flags.is_directory) {
tevent_req_nterror(req, NT_STATUS_ACCESS_DENIED);
return tevent_req_post(req, ev);
}
tevent_req_nterror(req, NT_STATUS_ACCESS_DENIED);
return tevent_req_post(req, ev);
}
TALLOC_FREE(filter_string);
}
TALLOC_FREE(filter_string);
}
- if ((!fsp->is_directory) || (conn != fsp->conn)) {
+ if ((!fsp->fsp_flags.is_directory) || (conn != fsp->conn)) {
tevent_req_nterror(req, NT_STATUS_INVALID_PARAMETER);
return tevent_req_post(req, ev);
}
tevent_req_nterror(req, NT_STATUS_INVALID_PARAMETER);
return tevent_req_post(req, ev);
}
return tevent_req_post(req, ev);
}
return tevent_req_post(req, ev);
}
- if (!fsp->is_directory) {
+ if (!fsp->fsp_flags.is_directory) {
tevent_req_nterror(req, NT_STATUS_NOT_SUPPORTED);
return tevent_req_post(req, ev);
}
tevent_req_nterror(req, NT_STATUS_NOT_SUPPORTED);
return tevent_req_post(req, ev);
}
}
state->smbreq = smbreq;
}
state->smbreq = smbreq;
- if (fsp->is_directory) {
+ if (fsp->fsp_flags.is_directory) {
tevent_req_nterror(req, NT_STATUS_INVALID_DEVICE_REQUEST);
return tevent_req_post(req, ev);
}
tevent_req_nterror(req, NT_STATUS_INVALID_DEVICE_REQUEST);
return tevent_req_post(req, ev);
}
* We can only have default POSIX ACLs on
* directories.
*/
* We can only have default POSIX ACLs on
* directories.
*/
- if (!fsp->is_directory) {
+ if (!fsp->fsp_flags.is_directory) {
DBG_INFO("Non-directory open %s\n",
fsp_str_dbg(fsp));
status = NT_STATUS_INVALID_HANDLE;
DBG_INFO("Non-directory open %s\n",
fsp_str_dbg(fsp));
status = NT_STATUS_INVALID_HANDLE;
}
/* If we have a default acl, this *must* be a directory. */
}
/* If we have a default acl, this *must* be a directory. */
- if (valid_def_acls && !fsp->is_directory) {
+ if (valid_def_acls && !fsp->fsp_flags.is_directory) {
DBG_INFO("Can't set default acls on "
"non-directory %s\n",
fsp_str_dbg(fsp));
DBG_INFO("Can't set default acls on "
"non-directory %s\n",
fsp_str_dbg(fsp));
fsp->print_file = NULL;
fsp->fsp_flags.modified = false;
fsp->sent_oplock_break = NO_BREAK_SENT;
fsp->print_file = NULL;
fsp->fsp_flags.modified = false;
fsp->sent_oplock_break = NO_BREAK_SENT;
- fsp->is_directory = False;
+ fsp->fsp_flags.is_directory = false;
vfs->files[fsp->fh->fd] = fsp;
printf("open: fd=%d\n", fsp->fh->fd);
vfs->files[fsp->fh->fd] = fsp;
printf("open: fd=%d\n", fsp->fh->fd);
fsp->print_file = NULL;
fsp->fsp_flags.modified = false;
fsp->sent_oplock_break = NO_BREAK_SENT;
fsp->print_file = NULL;
fsp->fsp_flags.modified = false;
fsp->sent_oplock_break = NO_BREAK_SENT;
- fsp->is_directory = S_ISDIR(smb_fname->st.st_ex_mode);
-
+ fsp->fsp_flags.is_directory = S_ISDIR(smb_fname->st.st_ex_mode);
sd = sddl_decode(talloc_tos(), argv[2], get_global_sam_sid());
if (!sd) {
sd = sddl_decode(talloc_tos(), argv[2], get_global_sam_sid());
if (!sd) {