mirror of
https://github.com/samba-team/samba.git
synced 2025-01-27 14:04:05 +03:00
smbd: Remove "link_depth" parameter from non_widelink_open()
We don't recurse anymore but loop inside. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
parent
80856941bf
commit
801731b60f
@ -674,8 +674,7 @@ static NTSTATUS symlink_target_below_conn(
|
|||||||
static NTSTATUS non_widelink_open(const struct files_struct *dirfsp,
|
static NTSTATUS non_widelink_open(const struct files_struct *dirfsp,
|
||||||
files_struct *fsp,
|
files_struct *fsp,
|
||||||
struct smb_filename *smb_fname,
|
struct smb_filename *smb_fname,
|
||||||
const struct vfs_open_how *_how,
|
const struct vfs_open_how *_how)
|
||||||
unsigned int link_depth)
|
|
||||||
{
|
{
|
||||||
struct connection_struct *conn = fsp->conn;
|
struct connection_struct *conn = fsp->conn;
|
||||||
const char *connpath = SMB_VFS_CONNECTPATH(conn, dirfsp, smb_fname);
|
const char *connpath = SMB_VFS_CONNECTPATH(conn, dirfsp, smb_fname);
|
||||||
@ -689,6 +688,7 @@ static NTSTATUS non_widelink_open(const struct files_struct *dirfsp,
|
|||||||
struct smb_filename *parent_dir_fname = NULL;
|
struct smb_filename *parent_dir_fname = NULL;
|
||||||
struct vfs_open_how how = *_how;
|
struct vfs_open_how how = *_how;
|
||||||
char *target = NULL;
|
char *target = NULL;
|
||||||
|
size_t link_depth = 0;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
SMB_ASSERT(!fsp_is_alternate_stream(fsp));
|
SMB_ASSERT(!fsp_is_alternate_stream(fsp));
|
||||||
@ -944,7 +944,7 @@ NTSTATUS fd_openat(const struct files_struct *dirfsp,
|
|||||||
* Only follow symlinks within a share
|
* Only follow symlinks within a share
|
||||||
* definition.
|
* definition.
|
||||||
*/
|
*/
|
||||||
status = non_widelink_open(dirfsp, fsp, smb_fname, &how, 0);
|
status = non_widelink_open(dirfsp, fsp, smb_fname, &how);
|
||||||
if (!NT_STATUS_IS_OK(status)) {
|
if (!NT_STATUS_IS_OK(status)) {
|
||||||
if (NT_STATUS_EQUAL(status, NT_STATUS_TOO_MANY_OPENED_FILES)) {
|
if (NT_STATUS_EQUAL(status, NT_STATUS_TOO_MANY_OPENED_FILES)) {
|
||||||
static time_t last_warned = 0L;
|
static time_t last_warned = 0L;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user