#ifdef O_DIRECTORY
open_flags |= O_DIRECTORY;
#endif
- status = fd_open(conn, fsp, open_flags, 0);
+ status = fd_open(fsp, open_flags, 0);
if (!NT_STATUS_IS_OK(status)) {
DBG_INFO("Could not open fd for %s (%s)\n",
smb_fname_str_dbg(smb_dname),
fd support routines - attempt to do a dos_open.
****************************************************************************/
-NTSTATUS fd_open(struct connection_struct *conn,
- files_struct *fsp,
+NTSTATUS fd_open(files_struct *fsp,
int flags,
mode_t mode)
{
+ struct connection_struct *conn = fsp->conn;
struct smb_filename *smb_fname = fsp->fsp_name;
NTSTATUS status = NT_STATUS_OK;
int saved_errno = 0;
mode_t mode,
bool *file_created)
{
- struct connection_struct *conn = fsp->conn;
NTSTATUS status = NT_STATUS_UNSUCCESSFUL;
NTSTATUS retry_status;
bool file_existed = VALID_STAT(fsp->fsp_name->st);
/*
* We're not creating the file, just pass through.
*/
- status = fd_open(conn, fsp, flags, mode);
+ status = fd_open(fsp, flags, mode);
*file_created = false;
return status;
}
/*
* Fail if already exists, just pass through.
*/
- status = fd_open(conn, fsp, flags, mode);
+ status = fd_open(fsp, flags, mode);
/*
* Here we've opened with O_CREAT|O_EXCL. If that went
retry_status = NT_STATUS_OBJECT_NAME_COLLISION;
}
- status = fd_open(conn, fsp, curr_flags, mode);
+ status = fd_open(fsp, curr_flags, mode);
if (NT_STATUS_IS_OK(status)) {
*file_created = !file_existed;
return NT_STATUS_OK;
curr_flags = flags | O_EXCL;
}
- status = fd_open(conn, fsp, curr_flags, mode);
+ status = fd_open(fsp, curr_flags, mode);
}
*file_created = (NT_STATUS_IS_OK(status) && !file_existed);
flags |= O_DIRECTORY;
#endif
- status = fd_open(conn, fsp, flags, 0);
+ status = fd_open(fsp, flags, 0);
if (!NT_STATUS_IS_OK(status)) {
DBG_INFO("Could not open fd for "
"%s (%s)\n",
struct files_struct *dirfsp,
struct smb_filename *smb_fname,
uint32_t access_mask);
-NTSTATUS fd_open(struct connection_struct *conn, files_struct *fsp,
+NTSTATUS fd_open(files_struct *fsp,
int flags, mode_t mode);
NTSTATUS fd_close(files_struct *fsp);
void change_file_owner_to_parent(connection_struct *conn,