struct smb_filename *smb_fname = NULL;
char *name = NULL;
NTSTATUS status;
- uint32_t ucf_flags = (req->posix_pathnames ? UCF_POSIX_PATHNAMES : 0);
+ uint32_t ucf_flags = ucf_flags_from_smb_request(req);
TALLOC_CTX *ctx = talloc_tos();
START_PROFILE(SMBcheckpath);
size = 0;
mtime = 0;
} else {
- uint32_t ucf_flags = (req->posix_pathnames ?
- UCF_POSIX_PATHNAMES : 0);
+ uint32_t ucf_flags = ucf_flags_from_smb_request(req);
status = filename_convert(ctx,
conn,
req->flags2 & FLAGS2_DFS_PATHNAMES,
time_t mtime;
const char *p;
NTSTATUS status;
- uint32_t ucf_flags = (req->posix_pathnames ? UCF_POSIX_PATHNAMES : 0);
+ uint32_t ucf_flags = ucf_flags_from_smb_request(req);
TALLOC_CTX *ctx = talloc_tos();
START_PROFILE(SMBsetatr);
if (status_len == 0) {
struct smb_filename *smb_dname = NULL;
uint32_t ucf_flags = UCF_ALWAYS_ALLOW_WCARD_LCOMP |
- (req->posix_pathnames ? UCF_POSIX_PATHNAMES : 0);
+ ucf_flags_from_smb_request(req);
nt_status = filename_convert(ctx, conn,
req->flags2 & FLAGS2_DFS_PATHNAMES,
path,
NTSTATUS status;
bool path_contains_wcard = False;
uint32_t ucf_flags = UCF_COND_ALLOW_WCARD_LCOMP |
- (req->posix_pathnames ? UCF_POSIX_PATHNAMES : 0);
+ ucf_flags_from_smb_request(req);
TALLOC_CTX *ctx = talloc_tos();
START_PROFILE(SMBunlink);
TALLOC_CTX *ctx = talloc_tos();
files_struct *fsp = NULL;
int info = 0;
- uint32_t ucf_flags = (req->posix_pathnames ? UCF_POSIX_PATHNAMES : 0);
+ uint32_t ucf_flags = ucf_flags_from_smb_request(req);
struct smbd_server_connection *sconn = req->sconn;
START_PROFILE(SMBrmdir);
TALLOC_CTX *ctx = talloc_tos();
struct smb_filename *smb_fname_src = NULL;
struct smb_filename *smb_fname_dst = NULL;
- uint32_t src_ucf_flags = (req->posix_pathnames ?
- (UCF_UNIX_NAME_LOOKUP|UCF_POSIX_PATHNAMES) :
- UCF_COND_ALLOW_WCARD_LCOMP);
- uint32_t dst_ucf_flags = UCF_SAVE_LCOMP |
- (req->posix_pathnames ? UCF_POSIX_PATHNAMES :
- UCF_COND_ALLOW_WCARD_LCOMP);
+ uint32_t src_ucf_flags = ucf_flags_from_smb_request(req) |
+ (req->posix_pathnames ?
+ UCF_UNIX_NAME_LOOKUP :
+ UCF_COND_ALLOW_WCARD_LCOMP);
+ uint32_t dst_ucf_flags = ucf_flags_from_smb_request(req) |
+ UCF_SAVE_LCOMP |
+ (req->posix_pathnames ?
+ 0 :
+ UCF_COND_ALLOW_WCARD_LCOMP);
bool stream_rename = false;
START_PROFILE(SMBmv);
bool dest_has_wild = False;
NTSTATUS status;
uint32_t ucf_flags_src = UCF_COND_ALLOW_WCARD_LCOMP |
- (req->posix_pathnames ? UCF_POSIX_PATHNAMES : 0);
+ ucf_flags_from_smb_request(req);
uint32_t ucf_flags_dst = UCF_COND_ALLOW_WCARD_LCOMP |
- (req->posix_pathnames ? UCF_POSIX_PATHNAMES : 0);
+ ucf_flags_from_smb_request(req);
TALLOC_CTX *ctx = talloc_tos();
START_PROFILE(SMBcopy);
uint32_t create_disposition;
uint32_t create_options = 0;
uint32_t private_flags = 0;
- uint32_t ucf_flags = (req->posix_pathnames ? UCF_POSIX_PATHNAMES : 0);
+ uint32_t ucf_flags = ucf_flags_from_smb_request(req);
TALLOC_CTX *ctx = talloc_tos();
/*
struct dptr_struct *dirptr = NULL;
struct smbd_server_connection *sconn = req->sconn;
uint32_t ucf_flags = UCF_SAVE_LCOMP | UCF_ALWAYS_ALLOW_WCARD_LCOMP |
- (req->posix_pathnames ? UCF_POSIX_PATHNAMES : 0);
+ ucf_flags_from_smb_request(req);
bool backup_priv = false;
bool as_root = false;
} else {
uint32_t name_hash;
char *fname = NULL;
- uint32_t ucf_flags = (req->posix_pathnames ?
- UCF_POSIX_PATHNAMES : 0);
+ uint32_t ucf_flags = ucf_flags_from_smb_request(req);
/* qpathinfo */
if (total_params < 7) {
{
char *oldname = NULL;
struct smb_filename *smb_fname_old = NULL;
- uint32_t ucf_flags = (req->posix_pathnames ? UCF_POSIX_PATHNAMES : 0);
+ uint32_t ucf_flags = ucf_flags_from_smb_request(req);
TALLOC_CTX *ctx = talloc_tos();
NTSTATUS status = NT_STATUS_OK;
char *newname = NULL;
struct smb_filename *smb_fname_dst = NULL;
uint32_t ucf_flags = UCF_SAVE_LCOMP |
- (req->posix_pathnames ? UCF_POSIX_PATHNAMES : 0);
+ ucf_flags_from_smb_request(req);
NTSTATUS status = NT_STATUS_OK;
TALLOC_CTX *ctx = talloc_tos();
struct smb_filename *smb_fname_dst = NULL;
NTSTATUS status = NT_STATUS_OK;
uint32_t ucf_flags = UCF_SAVE_LCOMP |
- (req->posix_pathnames ? UCF_POSIX_PATHNAMES : 0);
+ ucf_flags_from_smb_request(req);
TALLOC_CTX *ctx = talloc_tos();
if (!fsp) {
}
} else {
char *fname = NULL;
- uint32_t ucf_flags = (req->posix_pathnames ?
- UCF_POSIX_PATHNAMES : 0);
+ uint32_t ucf_flags = ucf_flags_from_smb_request(req);
/* set path info */
if (total_params < 7) {
char *directory = NULL;
NTSTATUS status = NT_STATUS_OK;
struct ea_list *ea_list = NULL;
- uint32_t ucf_flags = (req->posix_pathnames ? UCF_POSIX_PATHNAMES : 0);
+ uint32_t ucf_flags = ucf_flags_from_smb_request(req);
TALLOC_CTX *ctx = talloc_tos();
if (!CAN_WRITE(conn)) {