connection_struct *conn;
NTSTATUS status;
char *cwd;
+ struct smb_filename *smb_fname = NULL;
if(*connect_path == '\0') {
return 0;
goto out;
}
+ smb_fname = synthetic_smb_fname(talloc_tos(),
+ ".",
+ NULL,
+ NULL);
+ if (smb_fname == NULL) {
+ goto out;
+ }
+
/* Now enumerate all dfs links */
- dirp = SMB_VFS_OPENDIR(conn, ".", NULL, 0);
+ dirp = SMB_VFS_OPENDIR(conn, smb_fname, NULL, 0);
if(!dirp) {
goto out;
}
SMB_VFS_CLOSEDIR(conn,dirp);
out:
+ TALLOC_FREE(smb_fname);
vfs_ChDir(conn, cwd);
SMB_VFS_DISCONNECT(conn);
conn_free(conn);
connection_struct *conn;
struct referral *ref = NULL;
char *cwd;
+ struct smb_filename *smb_fname = NULL;
NTSTATUS status;
if (jn_remain == 0) {
goto out;
}
+ smb_fname = synthetic_smb_fname(talloc_tos(),
+ ".",
+ NULL,
+ NULL);
+ if (smb_fname == NULL) {
+ goto out;
+ }
+
/* Now enumerate all dfs links */
- dirp = SMB_VFS_OPENDIR(conn, ".", NULL, 0);
+ dirp = SMB_VFS_OPENDIR(conn, smb_fname, NULL, 0);
if(!dirp) {
goto out;
}
SMB_VFS_CLOSEDIR(conn,dirp);
}
+ TALLOC_FREE(smb_fname);
vfs_ChDir(conn, cwd);
conn_free(conn);
return cnt;