Bug 8664 - Renaming a symlink fails if the symlink target is outside of the share
Summary: Renaming a symlink fails if the symlink target is outside of the share
Status: RESOLVED FIXED
Alias: None
Product: Samba 3.5
Classification: Unclassified
Component: File services (show other bugs)
Version: unspecified
Hardware: All All
: P5 normal
Target Milestone: ---
Assignee: Karolin Seeger
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks: 8595
  Show dependency treegraph
 
Reported: 2011-12-16 01:07 UTC by Jeremy Allison
Modified: 2020-12-11 07:25 UTC (History)
3 users (show)

See Also:


Attachments
git-am fix for 3.5.next (1.37 KB, patch)
2011-12-16 20:47 UTC, Jeremy Allison
vl: review+
Details
git-am fix for 3.6.next (1.40 KB, patch)
2011-12-17 00:02 UTC, Jeremy Allison
vl: review+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jeremy Allison 2011-12-16 01:07:30 UTC
On a local filesystem:

ln -s / link1
mv link1 foobar

succeeds.

On a CIFS mount the mv fails with :

mv: cannot move `link1' to `foobar': Permission denied.

Something I decided to test based on bug 8663.

Jeremy.
Comment 1 Jeremy Allison 2011-12-16 20:47:23 UTC
Created attachment 7198 [details]
git-am fix for 3.5.next

Fix for unix extensions call of SMBmv.
Comment 2 Jeremy Allison 2011-12-17 00:02:55 UTC
Created attachment 7201 [details]
git-am fix for 3.6.next
Comment 3 Karolin Seeger 2012-01-08 19:58:54 UTC
Is there a chance to get the review done until Thursday?

Thanks,
Karolin
Comment 4 Volker Lendecke 2012-01-10 09:02:24 UTC
Comment on attachment 7201 [details]
git-am fix for 3.6.next

I really, really hate all these lp_posix special cases, as they probably make us much more vulnerable to attacks, but if it is a necessary evil, so be it. Probably at some point we should just go the same way we did with SMB2: Just write a completely separate implementation of smbd when unix extensions are active.
Comment 5 Jeremy Allison 2012-01-17 22:05:32 UTC
Re-assigning to Karolin for inclusion in 3.6.next and 3.5.next (Volker gave a + review).

Jeremy.
Comment 6 Karolin Seeger 2012-01-18 20:40:17 UTC
Pushed to both branches.
Closing out bug report.

Thanks!