There are two serious bugs in the code which processes symlinks in smbd: 1.) The programmer assumed that readlink() would NUL-terminate the result (flink). This is fixed with the first part of the patch. 2.) In case of a relative symlink, the destination (cleanlink) is constructed by concatenating realdir with the link. This is wrong, it should be dirname(name) + the link. The second part of the patch fixes that. How-To-Repeat: Raise debuglevel to 3 and access symlinks from Winblows. Watch the messed up filenames due to 1.). Fix 1.) and try to access relative symlinks from Winblows. These links must not reside on the toplevel of the share. Watch the wrongly constructed filnames.
To which version(s) of the samba port does this patch apply?
> To which version(s) of the samba port does this patch apply? Well, since I wrote "samba from ports" it must be the one in net/samba (2.2.12 at the moment) :-). Don't know if it applies to samba3 as well... BTW, your mail never made it through to me. I just ran across it in the audit-trail... -Andre
State Changed From-To: open->analyzed I will take care of it.
Responsible Changed From-To: freebsd-ports-bugs->dinoex I will take care of it.
State Changed From-To: analyzed->closed committed, thanks.