PATCH samba cache and read-ahead

Amin Azez azez at ufomechanic.net
Thu Jan 10 17:08:21 GMT 2008


[recipients trimmed]

* Volker Lendecke wrote, On 04/01/08 13:38:
> On Fri, Jan 04, 2008 at 01:21:33PM +0000, Amin Azez wrote:
>   
>>> Yes, it's exactly that. Your advantage is that you don't
>>> need to marshall anything on your own, and you don't have to
>>> ask anybody for name space. Just invent a named pipe name,
>>> run uuidgen and you're done with your local sandbox. In
>>> theory you could even ride on one of the existing named
>>> pipes, but this might be sub-obtimal.
>>>   
>>>       
>> This sounds brillig. Do you have any URLs handy with practical tips, or
>> any names of suitable existing named pipes for which I can examine the
>> related source for tips?
>>     
>
> Not really, sorry. You might look at the rpc-echo pipe and
> its implementation.
>   
I bit the bullet and decided to do rpc. I cloned the rpcecho (OK. I
think), and I attach a patch of changes apart from proxy.idl and
rpc_proxy.c (which are just sed s/echo/proxy/ on the original)

Volker, please could you check the changes in this patch to see if they
make sense and are all required?

The change to rpc_server/config.mk made sense (and it almost looks as if
a machine could have done it for me) but librpc/config.mk seems a bit
long winded in comparison, with subsystems RPC_NDR_PROXY and NDR_PROXY
and RPC_EJS_PROXY not to mention being a dependency of NDR_TABLE. So I'm
not sure if I needed them all....

Finally, is there any tool to derive one of proxy.idl and rpc_proxy.c
from the other, or keep them in sync (apart from weave, I suppose :-) ),
or do I do that by hand?

Thanks for your help on this.


Sam
-------------- next part --------------
diff --git a/source/librpc/config.mk b/source/librpc/config.mk
index 40bfb5c..00af1ad 100644
--- a/source/librpc/config.mk
+++ b/source/librpc/config.mk
@@ -67,6 +67,10 @@ PUBLIC_DEPENDENCIES = LIBNDR
 OBJ_FILES = gen_ndr/ndr_echo.o
 PUBLIC_DEPENDENCIES = LIBNDR
 
+[SUBSYSTEM::NDR_PROXY]
+OBJ_FILES = gen_ndr/ndr_proxy.o
+PUBLIC_DEPENDENCIES = LIBNDR
+
 [SUBSYSTEM::NDR_IRPC]
 OBJ_FILES = gen_ndr/ndr_irpc.o
 PUBLIC_DEPENDENCIES = LIBNDR NDR_SECURITY NDR_NBT
@@ -290,7 +294,7 @@ librpc/gen_ndr/tables.c: $(IDL_NDR_PARSE_H_FILES)
 OBJ_FILES = ndr/ndr_table.o gen_ndr/tables.o
 PRIVATE_PROTO_HEADER = ndr/ndr_table.h
 PUBLIC_DEPENDENCIES = \
-	NDR_AUDIOSRV NDR_ECHO NDR_DCERPC \
+	NDR_AUDIOSRV NDR_ECHO NDR_PROXY NDR_DCERPC \
 	NDR_DSBACKUP NDR_EFS NDR_MISC NDR_LSA NDR_DFS NDR_DRSUAPI \
 	NDR_POLICYAGENT NDR_UNIXINFO NDR_SAMR NDR_SPOOLSS NDR_WKSSVC NDR_SRVSVC NDR_ATSVC \
 	NDR_EVENTLOG NDR_EPMAPPER NDR_DBGIDL NDR_DSSETUP NDR_MSGSVC NDR_WINS \
@@ -313,6 +317,10 @@ PUBLIC_DEPENDENCIES = NDR_AUDIOSRV dcerpc
 OBJ_FILES = gen_ndr/ndr_echo_c.o
 PUBLIC_DEPENDENCIES = dcerpc NDR_ECHO
 
+[SUBSYSTEM::RPC_NDR_PROXY]
+OBJ_FILES = gen_ndr/ndr_proxy_c.o
+PUBLIC_DEPENDENCIES = dcerpc NDR_PROXY
+
 [SUBSYSTEM::RPC_NDR_DSBACKUP]
 OBJ_FILES = gen_ndr/ndr_dsbackup_c.o
 PUBLIC_DEPENDENCIES = dcerpc NDR_DSBACKUP
@@ -496,6 +504,12 @@ OBJ_FILES = gen_ndr/ndr_echo_ejs.o
 SUBSYSTEM = smbcalls
 PRIVATE_DEPENDENCIES = dcerpc NDR_ECHO EJSRPC
 
+[MODULE::RPC_EJS_PROXY]
+INIT_FUNCTION = ejs_init_rpcproxy
+OBJ_FILES = gen_ndr/ndr_proxy_ejs.o
+SUBSYSTEM = smbcalls
+PRIVATE_DEPENDENCIES = dcerpc NDR_PROXY EJSRPC
+
 [MODULE::RPC_EJS_MISC]
 INIT_FUNCTION = ejs_init_misc
 OBJ_FILES = gen_ndr/ndr_misc_ejs.o
diff --git a/source/rpc_server/config.mk b/source/rpc_server/config.mk
index d794b94..51fd17a 100644
--- a/source/rpc_server/config.mk
+++ b/source/rpc_server/config.mk
@@ -24,6 +24,17 @@ PRIVATE_DEPENDENCIES = NDR_ECHO
 ################################################
 
 ################################################
+# Start MODULE dcerpc_rpcproxy
+[MODULE::dcerpc_rpcproxy]
+INIT_FUNCTION = dcerpc_server_rpcproxy_init
+SUBSYSTEM = dcerpc_server
+OBJ_FILES = \
+		proxy/rpc_proxy.o
+PRIVATE_DEPENDENCIES = NDR_PROXY 
+# End MODULE dcerpc_rpcecho
+################################################
+
+################################################
 # Start MODULE dcerpc_epmapper
 [MODULE::dcerpc_epmapper]
 INIT_FUNCTION = dcerpc_server_epmapper_init


More information about the samba-technical mailing list