From: Volker Lendecke Date: Thu, 20 Oct 2022 15:08:40 +0000 (+0200) Subject: smbd: Remove "link_depth" parameter from non_widelink_open() X-Git-Tag: talloc-2.4.0~643 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=801731b60fd4a4bfea7279a6942c35fdf1a4e1c6;p=thirdparty%2Fsamba.git smbd: Remove "link_depth" parameter from non_widelink_open() We don't recurse anymore but loop inside. Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison --- diff --git a/source3/smbd/open.c b/source3/smbd/open.c index d4a679a4cb0..c2697f4732e 100644 --- a/source3/smbd/open.c +++ b/source3/smbd/open.c @@ -674,8 +674,7 @@ static NTSTATUS symlink_target_below_conn( static NTSTATUS non_widelink_open(const struct files_struct *dirfsp, files_struct *fsp, struct smb_filename *smb_fname, - const struct vfs_open_how *_how, - unsigned int link_depth) + const struct vfs_open_how *_how) { struct connection_struct *conn = fsp->conn; 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 vfs_open_how how = *_how; char *target = NULL; + size_t link_depth = 0; int ret; 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 * 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_EQUAL(status, NT_STATUS_TOO_MANY_OPENED_FILES)) { static time_t last_warned = 0L;