Bug 6090 - renaming or deleting a "not matching/resolving" symlink is failing
Summary: renaming or deleting a "not matching/resolving" symlink is failing
Status: RESOLVED FIXED
Alias: None
Product: Samba 3.3
Classification: Unclassified
Component: File services (show other bugs)
Version: unspecified
Hardware: All Linux
: P3 normal
Target Milestone: ---
Assignee: Jeremy Allison
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-04 17:20 UTC by Jeremy Allison
Modified: 2011-01-01 23:10 UTC (History)
2 users (show)

See Also:


Attachments
test program. (2.03 KB, text/plain)
2009-02-04 17:21 UTC, Jeremy Allison
no flags Details
Patch for 3.3.0. (7.30 KB, patch)
2009-02-04 17:35 UTC, Jeremy Allison
no flags Details
Patch for master (6.52 KB, patch)
2009-02-04 18:43 UTC, Jeremy Allison
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jeremy Allison 2009-02-04 17:20:29 UTC
Hi Jeremy,

i'm in contact with a user, who is using subversion
in a production environment.
He already helped to fix an opendir() bug in cifs vfs.

Now he is facing a different problem regarding renaming
(or deleting) a "not matching/resolving" symlink,
when accessing a svn repository located on a samba share.

I'm not quite sure, whether it's an "internal svn glitch",
a limitation of some smb "rules" or just a samba bug...

The following does work on a local file system, but not
on a samba share (atm using here 3.3.0-GIT-5265411-test),
when being accessed from latest git cifs vfs:

  mkdir test
  ln -s test/abc test/mylink     /* OK! (but the link does not resolve!) */
  mv test/mylink test/mylinknew  /* is failing with ENOENT on samba */

BTW - obviously, the just created symlink "test/mylink" can't be removed, too:
// the symlink could be created, but will now stay there forever :-)
  rm test/mylink                 /* again ENOENT on samba */

Anyway, what do you think about this?

I append the user's test applet, which I've converted from C++ to C,
which also includes some strace logging of subversion.
(It just mimics the above console cmds behaviour)

Cheers, Günter
Comment 1 Jeremy Allison 2009-02-04 17:21:06 UTC
Created attachment 3914 [details]
test program.
Comment 2 Jeremy Allison 2009-02-04 17:35:12 UTC
Created attachment 3915 [details]
Patch for 3.3.0.
Comment 3 Jeremy Allison 2009-02-04 18:43:33 UTC
Created attachment 3916 [details]
Patch for master
Comment 4 Guenter Kukkukk 2009-02-04 20:35:49 UTC
First of all many thanks to Toby Collett for reporting this
and his very helpful test applet!  :-)

I've tested the patch and all is working now as expected. :-)
Thanks Jeremy

I have notified Toby about the patch. When i get a positive
answer back, I'll drop a note to close this one.
Cheers, Günter
Comment 5 Toby Collett 2009-03-14 19:15:07 UTC
Sorry about taking so long to verify this. Unfortunately I was not able to verify in the production configuration as we use samba 3.0 (from ubuntu hardy). I have verified that subversion works with symlinks in samba 3.3.1 which includes this patch (according to changelogs)

Thanks for the fix,
Toby Collett
Comment 6 Jelmer Vernooij 2011-01-01 23:10:40 UTC
Fixed by Jeremy in e7c09d8b105d8182e7ae3948a664169dc13198e9