Bug 14427 - vfs_ChDir() may not set conn->cwd_fsp->fh->fd = AT_FDCWD
Summary: vfs_ChDir() may not set conn->cwd_fsp->fh->fd = AT_FDCWD
Status: RESOLVED FIXED
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: File services (show other bugs)
Version: 4.12.4
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Karolin Seeger
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-07-02 10:06 UTC by Stefan Metzmacher
Modified: 2020-07-17 09:37 UTC (History)
3 users (show)

See Also:


Attachments
Patch for 4.12 cherry-picked from master (6.31 KB, patch)
2020-07-03 09:13 UTC, Ralph Böhme
metze: review+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Metzmacher 2020-07-02 10:06:01 UTC
When a client does two tree connects to the same path,
vfs_ChDir() may leave conn->cwd_fsp->fh->fd as -1.
But all consumers of it expect AT_FDCWD and get an error
(typically EBADF, NT_STATUS_INVALID_HANDLE).
Comment 1 Ralph Böhme 2020-07-03 09:13:04 UTC
Created attachment 16112 [details]
Patch for 4.12 cherry-picked from master
Comment 2 Karolin Seeger 2020-07-09 07:51:48 UTC
(In reply to Ralph Böhme from comment #1)
Pushed to autobuild-v4-12-test.
Comment 3 Karolin Seeger 2020-07-17 09:37:40 UTC
Pushed to v4-12-test.
Closing out bug report.

Thanks!