diff options
author | Volker Lendecke <vl@samba.org> | 2011-09-24 05:42:48 +0200 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2011-09-26 14:59:12 +0200 |
commit | fba833d0557969fe0c1c943465c1b1f833fe1bdb (patch) | |
tree | d913f50b57386af5b9dd693d7b60365069d6cafe /source3/rpc_server | |
parent | cb2b5c521b2c13b6b453e0f4d7db8845da1fa1cf (diff) | |
download | samba-fba833d0557969fe0c1c943465c1b1f833fe1bdb.tar.gz samba-fba833d0557969fe0c1c943465c1b1f833fe1bdb.tar.bz2 samba-fba833d0557969fe0c1c943465c1b1f833fe1bdb.zip |
s3: Remove the smbd_server_conn ref from get_referred_path
Diffstat (limited to 'source3/rpc_server')
-rw-r--r-- | source3/rpc_server/dfs/srv_dfs_nt.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/source3/rpc_server/dfs/srv_dfs_nt.c b/source3/rpc_server/dfs/srv_dfs_nt.c index d77989db2f..56f4de551d 100644 --- a/source3/rpc_server/dfs/srv_dfs_nt.c +++ b/source3/rpc_server/dfs/srv_dfs_nt.c @@ -75,8 +75,8 @@ WERROR _dfs_Add(struct pipes_struct *p, struct dfs_Add *r) } /* The following call can change the cwd. */ - status = get_referred_path(ctx, r->in.path, jn, - &consumedcnt, &self_ref); + status = get_referred_path(ctx, r->in.path, smbd_server_conn, jn, + &consumedcnt, &self_ref); if(!NT_STATUS_IS_OK(status)) { return ntstatus_to_werror(status); } @@ -118,6 +118,7 @@ WERROR _dfs_Remove(struct pipes_struct *p, struct dfs_Remove *r) bool found = False; TALLOC_CTX *ctx = talloc_tos(); char *altpath = NULL; + NTSTATUS status; if (p->session_info->unix_token->uid != sec_initial_uid()) { DEBUG(10,("_dfs_remove: uid != 0. Access denied.\n")); @@ -141,8 +142,9 @@ WERROR _dfs_Remove(struct pipes_struct *p, struct dfs_Remove *r) r->in.dfs_entry_path, r->in.servername, r->in.sharename)); } - if(!NT_STATUS_IS_OK(get_referred_path(ctx, r->in.dfs_entry_path, jn, - &consumedcnt, &self_ref))) { + status = get_referred_path(ctx, r->in.dfs_entry_path, smbd_server_conn, + jn, &consumedcnt, &self_ref); + if(!NT_STATUS_IS_OK(status)) { return WERR_DFS_NO_SUCH_VOL; } @@ -353,6 +355,7 @@ WERROR _dfs_GetInfo(struct pipes_struct *p, struct dfs_GetInfo *r) bool self_ref = False; TALLOC_CTX *ctx = talloc_tos(); bool ret; + NTSTATUS status; jn = talloc_zero(ctx, struct junction_map); if (!jn) { @@ -364,8 +367,9 @@ WERROR _dfs_GetInfo(struct pipes_struct *p, struct dfs_GetInfo *r) } /* The following call can change the cwd. */ - if(!NT_STATUS_IS_OK(get_referred_path(ctx, r->in.dfs_entry_path, - jn, &consumedcnt, &self_ref)) || + status = get_referred_path(ctx, r->in.dfs_entry_path, smbd_server_conn, + jn, &consumedcnt, &self_ref); + if(!NT_STATUS_IS_OK(status) || consumedcnt < strlen(r->in.dfs_entry_path)) { return WERR_DFS_NO_SUCH_VOL; } |