git.samba.org
/
metze
/
samba
/
wip.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
772cf15
)
s4:rpc_server/srvsvc: pass tsocket_address to the ntvfs layer
author
Stefan Metzmacher
<metze@samba.org>
Mon, 26 Apr 2010 11:27:51 +0000
(13:27 +0200)
committer
Stefan Metzmacher
<metze@samba.org>
Tue, 27 Apr 2010 11:00:25 +0000
(13:00 +0200)
metze
source4/rpc_server/srvsvc/srvsvc_ntvfs.c
patch
|
blob
|
history
diff --git
a/source4/rpc_server/srvsvc/srvsvc_ntvfs.c
b/source4/rpc_server/srvsvc/srvsvc_ntvfs.c
index d95c307d1655854e6714ca67b9cb78bd2eb2360d..da1a65047c8e5063ef59e9593cf0e4bb3b9c36a2 100644
(file)
--- a/
source4/rpc_server/srvsvc/srvsvc_ntvfs.c
+++ b/
source4/rpc_server/srvsvc/srvsvc_ntvfs.c
@@
-23,18
+23,6
@@
#include "rpc_server/dcerpc_server.h"
#include "param/param.h"
#include "rpc_server/dcerpc_server.h"
#include "param/param.h"
-struct socket_address *srvsvc_get_my_addr(void *p, TALLOC_CTX *mem_ctx)
-{
- struct dcesrv_connection *conn = talloc_get_type(p, struct dcesrv_connection);
- return dcesrv_connection_get_my_addr(conn, mem_ctx);
-}
-
-struct socket_address *srvsvc_get_peer_addr(void *p, TALLOC_CTX *mem_ctx)
-{
- struct dcesrv_connection *conn = talloc_get_type(p, struct dcesrv_connection);
- return dcesrv_connection_get_peer_addr(conn, mem_ctx);
-}
-
struct srvsvc_ntvfs_ctx {
struct ntvfs_context *ntvfs;
};
struct srvsvc_ntvfs_ctx {
struct ntvfs_context *ntvfs;
};
@@
-58,6
+46,8
@@
NTSTATUS srvsvc_create_ntvfs_context(struct dcesrv_call_state *dce_call,
struct share_config *scfg;
const char *sharetype;
union smb_tcon tcon;
struct share_config *scfg;
const char *sharetype;
union smb_tcon tcon;
+ const struct tsocket_address *local_address;
+ const struct tsocket_address *remote_address;
status = share_get_context_by_name(mem_ctx, lp_share_backend(dce_call->conn->dce_ctx->lp_ctx), dce_call->event_ctx, dce_call->conn->dce_ctx->lp_ctx, &sctx);
if (!NT_STATUS_IS_OK(status)) {
status = share_get_context_by_name(mem_ctx, lp_share_backend(dce_call->conn->dce_ctx->lp_ctx), dce_call->event_ctx, dce_call->conn->dce_ctx->lp_ctx, &sctx);
if (!NT_STATUS_IS_OK(status)) {
@@
-111,7
+101,9
@@
NTSTATUS srvsvc_create_ntvfs_context(struct dcesrv_call_state *dce_call,
/*
* NOTE: we only set the addr callbacks as we're not interesseted in oplocks or in getting file handles
*/
/*
* NOTE: we only set the addr callbacks as we're not interesseted in oplocks or in getting file handles
*/
- status = ntvfs_set_addr_callbacks(c->ntvfs, srvsvc_get_my_addr, srvsvc_get_peer_addr, dce_call->conn);
+ local_address = dcesrv_connection_get_local_address(dce_call->conn);
+ remote_address = dcesrv_connection_get_remote_address(dce_call->conn);
+ status = ntvfs_set_addresses(c->ntvfs, local_address, remote_address);
if (!NT_STATUS_IS_OK(status)) {
DEBUG(0,("srvsvc_create_ntvfs_context: NTVFS failed to set the addr callbacks!\n"));
return status;
if (!NT_STATUS_IS_OK(status)) {
DEBUG(0,("srvsvc_create_ntvfs_context: NTVFS failed to set the addr callbacks!\n"));
return status;