SMB_ASSERT(smb_fname->stream_name[0] != '\0');
}
- if (lp_posix_pathnames()) {
+ if (smb_fname->flags & SMB_FILENAME_POSIX_PATH) {
return false;
}
const struct smb_filename *smb_fname,
mode_t mode)
{
- if (lp_posix_pathnames()) {
+ if (smb_fname->flags & SMB_FILENAME_POSIX_PATH) {
/* Only allow this on POSIX pathnames. */
return SMB_VFS_NEXT_CHMOD(handle, smb_fname, mode);
}
const struct smb_filename *smb_fname,
mode_t mode)
{
- if (lp_posix_pathnames()) {
+ if (smb_fname->flags & SMB_FILENAME_POSIX_PATH) {
/* Only allow this on POSIX pathnames. */
return SMB_VFS_NEXT_CHMOD_ACL(handle, smb_fname, mode);
}
goto out;
}
- if (lp_posix_pathnames()) {
+ if (smb_fname_tmp->flags & SMB_FILENAME_POSIX_PATH) {
ret = SMB_VFS_LSTAT(handle->conn, smb_fname_tmp);
} else {
ret = SMB_VFS_STAT(handle->conn, smb_fname_tmp);
smb_fname->base_name);
smb_fname_cp.flags = smb_fname->flags;
- if (lp_posix_pathnames()) {
+ if (smb_fname_cp.flags & SMB_FILENAME_POSIX_PATH) {
ret = SMB_VFS_LSTAT(handle->conn, &smb_fname_cp);
} else {
ret = SMB_VFS_STAT(handle->conn, &smb_fname_cp);
return -1;
}
- if (lp_posix_pathnames()) {
+ if (smb_fname->flags & SMB_FILENAME_POSIX_PATH) {
ret = SMB_VFS_NEXT_LSTAT(handle, smb_fname_tmp);
} else {
ret = SMB_VFS_NEXT_STAT(handle, smb_fname_tmp);
return -1;
}
- if (lp_posix_pathnames()) {
+ if (smb_fname_base->flags & SMB_FILENAME_POSIX_PATH) {
ret = SMB_VFS_NEXT_LSTAT(handle, smb_fname_base);
} else {
ret = SMB_VFS_NEXT_STAT(handle, smb_fname_base);
return -1;
}
- if (lp_posix_pathnames()) {
+ if (smb_fname_base->flags & SMB_FILENAME_POSIX_PATH) {
ret = SMB_VFS_NEXT_LSTAT(handle, smb_fname_base);
} else {
ret = SMB_VFS_NEXT_STAT(handle, smb_fname_base);
ret = SMB_VFS_NEXT_FSTAT(handle, fsp, &smb_fname_base->st);
}
else {
- if (lp_posix_pathnames()) {
+ if (smb_fname_base->flags & SMB_FILENAME_POSIX_PATH) {
ret = SMB_VFS_NEXT_LSTAT(handle, smb_fname_base);
} else {
ret = SMB_VFS_NEXT_STAT(handle, smb_fname_base);
return -1;
}
- if (lp_posix_pathnames()) {
+ if (smb_fname_base->flags & SMB_FILENAME_POSIX_PATH) {
ret = SMB_VFS_LSTAT(handle->conn, smb_fname_base);
} else {
ret = SMB_VFS_STAT(handle->conn, smb_fname_base);
return -1;
}
- if (lp_posix_pathnames()) {
+ if (smb_fname_tmp->flags & SMB_FILENAME_POSIX_PATH) {
ret = SMB_VFS_NEXT_LSTAT(handle, smb_fname_tmp);
} else {
ret = SMB_VFS_NEXT_STAT(handle, smb_fname_tmp);
goto out;
}
- if (!lp_posix_pathnames() &&
+ if (!req->posix_pathnames &&
ea_list_has_invalid_name(ea_list)) {
/* Realloc the size of parameters and data we will return */
if (flags & EXTENDED_RESPONSE_REQUIRED) {
size_t i, num_names;
char **names;
struct ea_list *ea_list_head = NULL;
+ bool posix_pathnames = false;
NTSTATUS status;
*pea_total_len = 0;
*ea_list = NULL;
+ if (fsp) {
+ posix_pathnames =
+ (fsp->fsp_name->flags & SMB_FILENAME_POSIX_PATH);
+ } else {
+ posix_pathnames = (smb_fname->flags & SMB_FILENAME_POSIX_PATH);
+ }
+
status = get_ea_names_from_file(talloc_tos(),
conn,
fsp,
* Filter out any underlying POSIX EA names
* that a Windows client can't handle.
*/
- if (!lp_posix_pathnames() &&
+ if (!posix_pathnames &&
is_invalid_windows_ea_name(names[i])) {
continue;
}
const struct smb_filename *smb_fname, struct ea_list *ea_list)
{
NTSTATUS status;
+ bool posix_pathnames = false;
if (!lp_ea_support(SNUM(conn))) {
return NT_STATUS_EAS_NOT_SUPPORTED;
}
+ if (fsp) {
+ posix_pathnames =
+ (fsp->fsp_name->flags & SMB_FILENAME_POSIX_PATH);
+ } else {
+ posix_pathnames = (smb_fname->flags & SMB_FILENAME_POSIX_PATH);
+ }
+
status = refuse_symlink(conn, fsp, smb_fname);
if (!NT_STATUS_IS_OK(status)) {
return status;
* we set *any* of them.
*/
- if (!lp_posix_pathnames() && ea_list_has_invalid_name(ea_list)) {
+ if (!posix_pathnames && ea_list_has_invalid_name(ea_list)) {
return STATUS_INVALID_EA_NAME;
}
goto out;
}
- if (!lp_posix_pathnames() &&
+ if (!req->posix_pathnames &&
ea_list_has_invalid_name(ea_list)) {
int param_len = 30;
*pparams = (char *)SMB_REALLOC(*pparams, param_len);