From 13ebf889b39e0b71f1f98198b0d003f5461d42a6 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sun, 22 Jun 2008 20:33:28 +0200 Subject: Remove the "exists" parameter from create_msdfs_link Jeremy, setting "exists" to True in _dfs_Add prevented the initial creation of a new symlink for me, because the SMB_VFS_UNLINK failed. This also exists in 3.2. I only check it into 3.3 as I would like you to look at it first. Thanks, Volker (This used to be commit f58b098a4172949018e84c4d0c722d6eb9bba514) --- source3/rpc_server/srv_dfs_nt.c | 6 ++---- 1 file changed, 2 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 974523dded..72b8236fb9 100644 --- a/source3/rpc_server/srv_dfs_nt.c +++ b/source3/rpc_server/srv_dfs_nt.c @@ -44,7 +44,6 @@ WERROR _dfs_Add(pipes_struct *p, struct dfs_Add *r) struct referral *old_referral_list = NULL; bool self_ref = False; int consumedcnt = 0; - bool exists = False; char *altpath = NULL; NTSTATUS status; TALLOC_CTX *ctx = talloc_tos(); @@ -76,7 +75,6 @@ WERROR _dfs_Add(pipes_struct *p, struct dfs_Add *r) return ntstatus_to_werror(status); } - exists = True; jn->referral_count += 1; old_referral_list = jn->referral_list; @@ -101,7 +99,7 @@ WERROR _dfs_Add(pipes_struct *p, struct dfs_Add *r) jn->referral_list[jn->referral_count-1].ttl = REFERRAL_TTL; jn->referral_list[jn->referral_count-1].alternate_path = altpath; - if(!create_msdfs_link(jn, exists)) { + if(!create_msdfs_link(jn)) { vfs_ChDir(p->conn,p->conn->connectpath); return WERR_DFS_CANT_CREATE_JUNCT; } @@ -184,7 +182,7 @@ WERROR _dfs_Remove(pipes_struct *p, struct dfs_Remove *r) return WERR_DFS_NO_SUCH_VOL; } } else { - if(!create_msdfs_link(jn, True)) { + if(!create_msdfs_link(jn)) { vfs_ChDir(p->conn,p->conn->connectpath); return WERR_DFS_CANT_CREATE_JUNCT; } -- cgit