From 50eb42e3c91a51eb0872288433d067c8c7ed2b41 Mon Sep 17 00:00:00 2001 From: Matt Kraai Date: Tue, 15 Sep 2009 14:56:24 -0700 Subject: [PATCH] Prevent structure function pointer members from being expanded. --- source4/ntvfs/ntvfs_generic.c | 12 ++++++------ source4/ntvfs/ntvfs_interface.c | 16 ++++++++-------- source4/rpc_server/dcerpc_server.c | 4 ++-- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/source4/ntvfs/ntvfs_generic.c b/source4/ntvfs/ntvfs_generic.c index 5838178..c637532 100644 --- a/source4/ntvfs/ntvfs_generic.c +++ b/source4/ntvfs/ntvfs_generic.c @@ -1224,7 +1224,7 @@ static NTSTATUS ntvfs_map_write_finish(struct ntvfs_module_context *ntvfs, /* do the close sync for now */ state = req->async_states->state; req->async_states->state &= ~NTVFS_ASYNC_STATE_MAY_ASYNC; - status = ntvfs->ops->close(ntvfs, req, cl); + status = (ntvfs->ops->close)(ntvfs, req, cl); req->async_states->state = state; } break; @@ -1397,7 +1397,7 @@ NTSTATUS ntvfs_map_read(struct ntvfs_module_context *ntvfs, rd2->readx.in.maxcnt = rd->read.in.count; rd2->readx.in.remaining = rd->read.in.remaining; rd2->readx.out.data = rd->read.out.data; - status = ntvfs->ops->read(ntvfs, req, rd2); + status = (ntvfs->ops->read)(ntvfs, req, rd2); break; case RAW_READ_READBRAW: @@ -1407,7 +1407,7 @@ NTSTATUS ntvfs_map_read(struct ntvfs_module_context *ntvfs, rd2->readx.in.maxcnt = rd->readbraw.in.maxcnt; rd2->readx.in.remaining = 0; rd2->readx.out.data = rd->readbraw.out.data; - status = ntvfs->ops->read(ntvfs, req, rd2); + status = (ntvfs->ops->read)(ntvfs, req, rd2); break; case RAW_READ_LOCKREAD: @@ -1435,7 +1435,7 @@ NTSTATUS ntvfs_map_read(struct ntvfs_module_context *ntvfs, rd2->readx.out.data = rd->lockread.out.data; if (NT_STATUS_IS_OK(status)) { - status = ntvfs->ops->read(ntvfs, req, rd2); + status = (ntvfs->ops->read)(ntvfs, req, rd2); } break; @@ -1446,7 +1446,7 @@ NTSTATUS ntvfs_map_read(struct ntvfs_module_context *ntvfs, rd2->readx.in.maxcnt = rd->smb2.in.length; rd2->readx.in.remaining = 0; rd2->readx.out.data = rd->smb2.out.data.data; - status = ntvfs->ops->read(ntvfs, req, rd2); + status = (ntvfs->ops->read)(ntvfs, req, rd2); break; } @@ -1530,7 +1530,7 @@ NTSTATUS ntvfs_map_close(struct ntvfs_module_context *ntvfs, (second_stage_t)ntvfs_map_close_finish); NT_STATUS_NOT_OK_RETURN(status); - status = ntvfs->ops->close(ntvfs, req, cl2); + status = (ntvfs->ops->close)(ntvfs, req, cl2); return ntvfs_map_async_finish(req, status); } diff --git a/source4/ntvfs/ntvfs_interface.c b/source4/ntvfs/ntvfs_interface.c index 808bd97..b1af2b4 100644 --- a/source4/ntvfs/ntvfs_interface.c +++ b/source4/ntvfs/ntvfs_interface.c @@ -28,7 +28,7 @@ NTSTATUS ntvfs_connect(struct ntvfs_request *req, union smb_tcon *tcon) if (!ntvfs->ops->connect) { return NT_STATUS_NOT_IMPLEMENTED; } - return ntvfs->ops->connect(ntvfs, req, tcon); + return (ntvfs->ops->connect)(ntvfs, req, tcon); } NTSTATUS ntvfs_disconnect(struct ntvfs_context *ntvfs_ctx) @@ -184,7 +184,7 @@ NTSTATUS ntvfs_ioctl(struct ntvfs_request *req, union smb_ioctl *io) if (!ntvfs->ops->ioctl) { return NT_STATUS_NOT_IMPLEMENTED; } - return ntvfs->ops->ioctl(ntvfs, req, io); + return (ntvfs->ops->ioctl)(ntvfs, req, io); } NTSTATUS ntvfs_read(struct ntvfs_request *req, union smb_read *io) @@ -193,7 +193,7 @@ NTSTATUS ntvfs_read(struct ntvfs_request *req, union smb_read *io) if (!ntvfs->ops->read) { return NT_STATUS_NOT_IMPLEMENTED; } - return ntvfs->ops->read(ntvfs, req, io); + return (ntvfs->ops->read)(ntvfs, req, io); } NTSTATUS ntvfs_write(struct ntvfs_request *req, union smb_write *io) @@ -257,7 +257,7 @@ NTSTATUS ntvfs_close(struct ntvfs_request *req, union smb_close *io) if (!ntvfs->ops->close) { return NT_STATUS_NOT_IMPLEMENTED; } - return ntvfs->ops->close(ntvfs, req, io); + return (ntvfs->ops->close)(ntvfs, req, io); } /* trans interface - used by IPC backend for pipes and RAP calls */ @@ -341,7 +341,7 @@ NTSTATUS ntvfs_next_connect(struct ntvfs_module_context *ntvfs, if (!ntvfs->next || !ntvfs->next->ops->connect) { return NT_STATUS_NOT_IMPLEMENTED; } - return ntvfs->next->ops->connect(ntvfs->next, req, tcon); + return (ntvfs->next->ops->connect)(ntvfs->next, req, tcon); } NTSTATUS ntvfs_next_disconnect(struct ntvfs_module_context *ntvfs) @@ -507,7 +507,7 @@ NTSTATUS ntvfs_next_ioctl(struct ntvfs_module_context *ntvfs, if (!ntvfs->next || !ntvfs->next->ops->ioctl) { return NT_STATUS_NOT_IMPLEMENTED; } - return ntvfs->next->ops->ioctl(ntvfs->next, req, io); + return (ntvfs->next->ops->ioctl)(ntvfs->next, req, io); } NTSTATUS ntvfs_next_read(struct ntvfs_module_context *ntvfs, @@ -517,7 +517,7 @@ NTSTATUS ntvfs_next_read(struct ntvfs_module_context *ntvfs, if (!ntvfs->next || !ntvfs->next->ops->read) { return NT_STATUS_NOT_IMPLEMENTED; } - return ntvfs->next->ops->read(ntvfs->next, req, io); + return (ntvfs->next->ops->read)(ntvfs->next, req, io); } NTSTATUS ntvfs_next_write(struct ntvfs_module_context *ntvfs, @@ -587,7 +587,7 @@ NTSTATUS ntvfs_next_close(struct ntvfs_module_context *ntvfs, if (!ntvfs->next || !ntvfs->next->ops->close) { return NT_STATUS_NOT_IMPLEMENTED; } - return ntvfs->next->ops->close(ntvfs->next, req, io); + return (ntvfs->next->ops->close)(ntvfs->next, req, io); } /* trans interface - used by IPC backend for pipes and RAP calls */ diff --git a/source4/rpc_server/dcerpc_server.c b/source4/rpc_server/dcerpc_server.c index b529e60..68d90bc 100644 --- a/source4/rpc_server/dcerpc_server.c +++ b/source4/rpc_server/dcerpc_server.c @@ -621,7 +621,7 @@ static NTSTATUS dcesrv_bind(struct dcesrv_call_state *call) call->context = context; talloc_set_destructor(context, dcesrv_connection_context_destructor); - status = iface->bind(call, iface); + status = (iface->bind)(call, iface); if (!NT_STATUS_IS_OK(status)) { char *uuid_str = GUID_string(call, &uuid); DEBUG(2,("Request for dcerpc interface %s/%d rejected: %s\n", @@ -791,7 +791,7 @@ static NTSTATUS dcesrv_alter_new_context(struct dcesrv_call_state *call, uint32_ call->context = context; talloc_set_destructor(context, dcesrv_connection_context_destructor); - status = iface->bind(call, iface); + status = (iface->bind)(call, iface); if (!NT_STATUS_IS_OK(status)) { /* we don't want to trigger the iface->unbind() hook */ context->iface = NULL; -- 1.6.4.2