We can't deal with snapdir paths in non_widelink_open fully with
snapdirseverywhere active: There is no way for
shadow_copy2_parent_pathname() to work when a snapshot directory is
below the directory that we want to calculate the parent for. What is
the parent directory supposed to point at? I don't know.
For me the only way out is to accept that we should ignore what
happens behind shadow_copy2's path manipulation in core
smbd. This *might* open symlink races, but the whole point of
snapshots is that they are r/o copies of the real active file system
and as such they should be immune to those races.
Found while trying to refactor code around fd_openat()
P.S: This code will go away pretty soon
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
".",
NULL,
NULL,
- dir_fname->twrp,
+ 0,
dir_fname->flags);
if (smb_fname_dot == NULL) {
status = NT_STATUS_NO_MEMORY;
const struct vfs_open_how *_how)
{
struct connection_struct *conn = fsp->conn;
- const char *connpath = SMB_VFS_CONNECTPATH(conn, dirfsp, smb_fname);
+ const char *connpath = conn->connectpath;
size_t connpath_len;
NTSTATUS status = NT_STATUS_OK;
int fd = -1;