Bug 14380 - root_dir_fid logic broken
Summary: root_dir_fid logic broken
Status: RESOLVED FIXED
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: File services (show other bugs)
Version: 4.12.0
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Ralph Böhme
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-05-14 13:56 UTC by Ralph Böhme
Modified: 2021-11-19 15:55 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ralph Böhme 2020-05-14 13:56:22 UTC
The only two callers that pass a root_dir_fid != 0 are reply_ntcreate_and_X()
and call_nt_transact_create().

Both functions pass the relative wirename to filename_convert() which is wrong it is relative to root_dir_fid so filename_convert() will not be able to stat() the relative path and it's components.

As the only test I can find that uses a root dir_fid is raw.samba3rootdirfid and
that uses a handle on the share root which will work, the relative name hits the "creating file" codepath in unix_convert(), so the special testcase covered by the test works.

Have patch, need bugnumber...
Comment 1 Ralph Böhme 2021-11-19 15:55:00 UTC
This landed a year ago...