From 24cdd7c73389c9eed981313973df2c3595222781 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 12 Mar 2007 17:55:24 +0000 Subject: r21800: Check-in the DFS rewrite. I am still testing this but it works from smbclient and Windows, and I am promising to support and fix both client and server code moving forward. Still need to test the RPC admin support but I haven't changed that code. Jeremy. (This used to be commit 7a7862c01d07796ef206b255c676ad7dc2cc42fc) --- source3/rpc_server/srv_dfs_nt.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'source3/rpc_server') diff --git a/source3/rpc_server/srv_dfs_nt.c b/source3/rpc_server/srv_dfs_nt.c index 98818826df..c7adffd62f 100644 --- a/source3/rpc_server/srv_dfs_nt.c +++ b/source3/rpc_server/srv_dfs_nt.c @@ -42,6 +42,8 @@ WERROR _dfs_Add(pipes_struct *p, struct dfs_Add *r) { struct junction_map jn; struct referral* old_referral_list = NULL; + BOOL self_ref = False; + int consumedcnt = 0; BOOL exists = False; pstring altpath; @@ -59,7 +61,7 @@ WERROR _dfs_Add(pipes_struct *p, struct dfs_Add *r) pstrcat(altpath, r->in.share); /* The following call can change the cwd. */ - if(get_referred_path(p->mem_ctx, r->in.path, &jn, NULL, NULL)) { + if(get_referred_path(p->mem_ctx, r->in.path, &jn, &consumedcnt, &self_ref)) { exists = True; jn.referral_count += 1; old_referral_list = jn.referral_list; @@ -96,6 +98,8 @@ WERROR _dfs_Add(pipes_struct *p, struct dfs_Add *r) WERROR _dfs_Remove(pipes_struct *p, struct dfs_Remove *r) { struct junction_map jn; + BOOL self_ref = False; + int consumedcnt = 0; BOOL found = False; pstring altpath; @@ -115,7 +119,7 @@ WERROR _dfs_Remove(pipes_struct *p, struct dfs_Remove *r) DEBUG(5,("init_reply_dfs_remove: Request to remove %s -> %s\\%s.\n", r->in.path, r->in.server, r->in.share)); - if(!get_referred_path(p->mem_ctx, r->in.path, &jn, NULL, NULL)) { + if(!get_referred_path(p->mem_ctx, r->in.path, &jn, &consumedcnt, &self_ref)) { return WERR_DFS_NO_SUCH_VOL; } @@ -302,13 +306,14 @@ WERROR _dfs_GetInfo(pipes_struct *p, struct dfs_GetInfo *r) { int consumedcnt = sizeof(pstring); struct junction_map jn; + BOOL self_ref = False; BOOL ret; if(!create_junction(r->in.path, &jn)) return WERR_DFS_NO_SUCH_SERVER; /* The following call can change the cwd. */ - if(!get_referred_path(p->mem_ctx, r->in.path, &jn, &consumedcnt, NULL) || consumedcnt < strlen(r->in.path)) { + if(!get_referred_path(p->mem_ctx, r->in.path, &jn, &consumedcnt, &self_ref) || consumedcnt < strlen(r->in.path)) { vfs_ChDir(p->conn,p->conn->connectpath); return WERR_DFS_NO_SUCH_VOL; } @@ -456,4 +461,3 @@ WERROR _dfs_SetInfo2(pipes_struct *p, struct dfs_SetInfo2 *r) p->rng_fault_state = True; return WERR_NOT_SUPPORTED; } - -- cgit