s3: smbd: Move the call to fsp_set_fd(conn->cwd_fsp, AT_FDCWD) to just after SMB_VFS_...
commitb63ac2ed97f92e1c435e72e8edaee00a8366a31d
authorJeremy Allison <jra@samba.org>
Wed, 23 Jun 2021 06:38:44 +0000 (22 23:38 -0700)
committerRalph Boehme <slow@samba.org>
Fri, 25 Jun 2021 15:53:31 +0000 (25 15:53 +0000)
tree132328ae809703efa5f9e0f0f692e500c8a15754
parentbd0bad6f58ab9aff789392ba1a8e817d7bdca5c8
s3: smbd: Move the call to fsp_set_fd(conn->cwd_fsp, AT_FDCWD) to just after SMB_VFS_CHDIR().

Once SMB_VFS_CHDIR() has been called and returned success, cwd_fsp *must* be AT_FDCWD.

We needs this so that SMB_VFS_STAT() can work correctly with
at startup time with modules that need to create pathref fsp's.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/smbd/vfs.c