]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
Patch for #263 from jpjanosi@us.ibm.com.
authorJeremy Allison <jra@samba.org>
Tue, 25 Nov 2003 02:04:10 +0000 (02:04 +0000)
committerJeremy Allison <jra@samba.org>
Tue, 25 Nov 2003 02:04:10 +0000 (02:04 +0000)
Jeremy.

source/rpc_server/srv_dfs_nt.c

index ac3ed9c3947db3280d06d331bfe9678a86201ff3..f324fd126ed00a5fde30876dd274e33f1c3821f0 100644 (file)
@@ -369,6 +369,7 @@ WERROR _dfs_get_info(pipes_struct *p, DFS_Q_DFS_GET_INFO *q_u,
 {
        UNISTR2* uni_path = &q_u->uni_path;
        uint32 level = q_u->level;
+       int consumedcnt = sizeof(pstring);
        pstring path;
        struct junction_map jn;
 
@@ -377,7 +378,7 @@ WERROR _dfs_get_info(pipes_struct *p, DFS_Q_DFS_GET_INFO *q_u,
                return WERR_DFS_NO_SUCH_SERVER;
   
        /* The following call can change the cwd. */
-       if(!get_referred_path(path, &jn, NULL, NULL)) {
+       if(!get_referred_path(path, &jn, &consumedcnt, NULL) || consumedcnt < strlen(path)) {
                vfs_ChDir(p->conn,p->conn->connectpath);
                return WERR_DFS_NO_SUCH_VOL;
        }