smbd: avoid double chdir() in chdir_current_service()
commitdbff6af0acf36e2f377694d9f83a4a49d28b8ba6
authorRalph Boehme <slow@samba.org>
Wed, 22 Jan 2020 09:52:39 +0000 (22 10:52 +0100)
committerKarolin Seeger <kseeger@samba.org>
Tue, 7 Apr 2020 09:37:25 +0000 (7 09:37 +0000)
treedc6071ef85c685370b139cf359aeb0be15862569
parent0a8d442fe535e0bcb69e927449cd1f4b26975fb8
smbd: avoid double chdir() in chdir_current_service()

Since 8e81090789e4cc3ba9e5aa792d4e52971909c894 we're doing chdir() twice, first
into conn->connectpath, then into conn->origpath.

Before commit 8e81090789e4cc3ba9e5aa792d4e52971909c894 if
chdir(conn->connectpath) succeeded, we wouldn't do the second chdir().

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14256
RN: smbd does a chdir() twice per request

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Thu Feb  6 11:44:07 UTC 2020 on sn-devel-184

(backported from commit f705629a171c1411131164f3adff36175154c093)
source3/smbd/service.c