diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/samba/Makefile | 1 | ||||
-rw-r--r-- | net/samba/files/patch-vfs.c | 29 |
2 files changed, 30 insertions, 0 deletions
diff --git a/net/samba/Makefile b/net/samba/Makefile index cb490713c5d6..32e2d4d41abf 100644 --- a/net/samba/Makefile +++ b/net/samba/Makefile @@ -7,6 +7,7 @@ PORTNAME= samba PORTVERSION= 2.2.12 +PORTREVISION= 1 CATEGORIES= net MASTER_SITES= ${MASTER_SITE_SAMBA} MASTER_SITE_SUBDIR= . old-versions diff --git a/net/samba/files/patch-vfs.c b/net/samba/files/patch-vfs.c new file mode 100644 index 000000000000..d615eec537ba --- /dev/null +++ b/net/samba/files/patch-vfs.c @@ -0,0 +1,29 @@ +--- source/smbd/vfs.c.ORI Wed Sep 29 19:37:44 2004 ++++ source/smbd/vfs.c Fri Apr 22 21:11:57 2005 +@@ -717,6 +717,7 @@ + pstring savedir; + pstring realdir; + size_t reallen; ++ int linklen; + + if (!vfs_GetWd(conn, savedir)) { + DEBUG(0,("couldn't vfs_GetWd for %s %s\n", name, dir)); +@@ -740,12 +741,16 @@ + realdir[reallen] = 0; + } + +- if (conn->vfs_ops.readlink(conn, name, flink, sizeof(pstring) -1) != -1) { ++ if( (linklen = conn->vfs_ops.readlink(conn, name, flink, sizeof(pstring) -1)) != -1 ) { ++ flink[linklen] = '\0'; + DEBUG(3,("reduce_name: file path name %s is a symlink\nChecking it's path\n", name)); + if (*flink == '/') { + pstrcpy(cleanlink, flink); + } else { +- pstrcpy(cleanlink, realdir); ++ char* cp; ++ pstrcpy( cleanlink, name ); ++ if( (cp = strrchr( cleanlink, '/' )) != NULL ) ++ *cp = '\0'; + pstrcat(cleanlink, "/"); + pstrcat(cleanlink, flink); + } |