const char *stream_name,
const SMB_STRUCT_STAT *psbuf);
struct smb_filename *synthetic_smb_fname_split(TALLOC_CTX *ctx,
- const char *fname);
+ const char *fname,
+ bool posix_path);
const char *smb_fname_str_dbg(const struct smb_filename *smb_fname);
const char *fsp_str_dbg(const struct files_struct *fsp);
const char *fsp_fnum_dbg(const struct files_struct *fsp);
* There are a few legitimate users of this.
*/
struct smb_filename *synthetic_smb_fname_split(TALLOC_CTX *ctx,
- const char *fname)
+ const char *fname,
+ bool posix_path)
{
char *stream_name = NULL;
char *base_name = NULL;
struct smb_filename *ret;
bool ok;
- if (lp_posix_pathnames()) {
+ if (posix_path) {
/* No stream name looked for. */
return synthetic_smb_fname(ctx, fname, NULL, NULL);
}
so set our umask to 0 */
saved_umask = umask(0);
- smb_fname = synthetic_smb_fname_split(fsp, fname);
+ smb_fname = synthetic_smb_fname_split(fsp,
+ fname,
+ lp_posix_pathnames());
if (smb_fname == NULL) {
TALLOC_FREE(frame);
umask(saved_umask);
return NULL;
}
- smb_fname = synthetic_smb_fname_split(frame, fname);
+ smb_fname = synthetic_smb_fname_split(frame,
+ fname,
+ lp_posix_pathnames());
if (smb_fname == NULL) {
TALLOC_FREE(frame);
return PyErr_NoMemory();
* component of the destination.
*/
smb_fname_orig_lcomp = synthetic_smb_fname_split(
- ctx, smb_fname_dst->original_lcomp);
+ ctx,
+ smb_fname_dst->original_lcomp,
+ lp_posix_pathnames());
if (smb_fname_orig_lcomp == NULL) {
status = NT_STATUS_NO_MEMORY;
TALLOC_FREE(fname_dst_lcomp_base_mod);
}
fsp->conn = vfs->conn;
- smb_fname = synthetic_smb_fname_split(NULL, argv[1]);
+ smb_fname = synthetic_smb_fname_split(NULL,
+ argv[1],
+ lp_posix_pathnames());
if (smb_fname == NULL) {
TALLOC_FREE(fsp);
return NT_STATUS_NO_MEMORY;
return NT_STATUS_OK;
}
- smb_fname_src = synthetic_smb_fname_split(mem_ctx, argv[1]);
+ smb_fname_src = synthetic_smb_fname_split(mem_ctx,
+ argv[1],
+ lp_posix_pathnames());
if (smb_fname_src == NULL) {
return NT_STATUS_NO_MEMORY;
}
- smb_fname_dst = synthetic_smb_fname_split(mem_ctx, argv[2]);
+ smb_fname_dst = synthetic_smb_fname_split(mem_ctx,
+ argv[2],
+ lp_posix_pathnames());
if (smb_fname_dst == NULL) {
TALLOC_FREE(smb_fname_src);
return NT_STATUS_NO_MEMORY;
return NT_STATUS_OK;
}
- smb_fname = synthetic_smb_fname_split(mem_ctx, argv[1]);
+ smb_fname = synthetic_smb_fname_split(mem_ctx,
+ argv[1],
+ lp_posix_pathnames());
if (smb_fname == NULL) {
return NT_STATUS_NO_MEMORY;
}
return NT_STATUS_OK;
}
- smb_fname = synthetic_smb_fname_split(mem_ctx, argv[1]);
+ smb_fname = synthetic_smb_fname_split(mem_ctx,
+ argv[1],
+ lp_posix_pathnames());
if (smb_fname == NULL) {
return NT_STATUS_NO_MEMORY;
}
ft.atime = convert_time_t_to_timespec(atoi(argv[2]));
ft.mtime = convert_time_t_to_timespec(atoi(argv[3]));
- smb_fname = synthetic_smb_fname_split(mem_ctx, argv[1]);
+ smb_fname = synthetic_smb_fname_split(mem_ctx,
+ argv[1],
+ lp_posix_pathnames());
if (smb_fname == NULL) {
return NT_STATUS_NO_MEMORY;
}
}
fsp->conn = vfs->conn;
- smb_fname = synthetic_smb_fname_split(NULL, argv[1]);
+ smb_fname = synthetic_smb_fname_split(NULL,
+ argv[1],
+ lp_posix_pathnames());
if (smb_fname == NULL) {
TALLOC_FREE(fsp);
return NT_STATUS_NO_MEMORY;