Bug 9811 - Old DOS SMB CTEMP request uses a non-VFS function to access the filesystem.
Summary: Old DOS SMB CTEMP request uses a non-VFS function to access the filesystem.
Status: RESOLVED FIXED
Alias: None
Product: Samba 4.0
Classification: Unclassified
Component: File services (show other bugs)
Version: unspecified
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Karolin Seeger
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-18 17:18 UTC by Jeremy Allison
Modified: 2013-04-22 09:34 UTC (History)
1 user (show)

See Also:


Attachments
git-am fix for master and 4.0.next (4.73 KB, patch)
2013-04-18 17:24 UTC, Jeremy Allison
no flags Details
git-am fix for 3.6.next. (5.20 KB, patch)
2013-04-18 18:19 UTC, Jeremy Allison
ddiss: review+
Details
updated git-am fix for master and 4.0.next (4.74 KB, patch)
2013-04-19 17:20 UTC, Jeremy Allison
ddiss: review+
Details
git-am fix for 3.6.next (5.23 KB, patch)
2013-04-19 17:32 UTC, Jeremy Allison
ddiss: review+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jeremy Allison 2013-04-18 17:18:14 UTC
The old code in smbd implementing CTEMP uses a non-VFS function mkstemp().

Found when testing CEPH VFS module. Fix to follow.
Comment 1 Jeremy Allison 2013-04-18 17:24:18 UTC
Created attachment 8785 [details]
git-am fix for master and 4.0.next

Here is the fix that just uses VFS_OPEN with a create disposition of FILE_CREATE.

Tested by the CEPH VFS author and works.

I will also submit to samba-technical.

Jeremy.
Comment 2 Jeremy Allison 2013-04-18 18:19:52 UTC
Created attachment 8786 [details]
git-am fix for 3.6.next.

Same fix for 3.6.next.
Comment 3 David Disseldorp 2013-04-19 09:43:20 UTC
Comment on attachment 8786 [details]
git-am fix for 3.6.next.

Looks good. Same smb_fname tos leakage on retry comment applies.
Comment 4 Jeremy Allison 2013-04-19 17:20:59 UTC
Created attachment 8794 [details]
updated git-am fix for master and 4.0.next

> Looks good Jeremy, a couple of minor comments:
> - There's some white space damage on line 2484.

Fixed.

> - smb_fname leaks onto tos on retry.

Fixed.
Comment 5 Jeremy Allison 2013-04-19 17:32:12 UTC
Created attachment 8795 [details]
git-am fix for 3.6.next

Fixed the smb_fname leak on continue.
Comment 6 David Disseldorp 2013-04-20 17:33:54 UTC
Karolin, please merge to the 3.6 and 4.0 branches.
Comment 7 Karolin Seeger 2013-04-22 07:42:27 UTC
Pushed to v3-6-test and autobuild-v4-0-test.
Comment 8 Karolin Seeger 2013-04-22 09:34:22 UTC
Pushed to v4-0-test.
Closing out bug report.

Thanks!