summaryrefslogtreecommitdiff
path: root/source4/librpc
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-05-04 06:07:52 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:51:44 -0500
commit21e6b1531b4e656af5962fdbeb671350f653fc26 (patch)
treeda19a7700ea239f83782eb8f3ea5836945b145c3 /source4/librpc
parent73744d1ed6ba3b2d003eb029b9e9a0296ce895e6 (diff)
downloadsamba-21e6b1531b4e656af5962fdbeb671350f653fc26.tar.gz
samba-21e6b1531b4e656af5962fdbeb671350f653fc26.tar.bz2
samba-21e6b1531b4e656af5962fdbeb671350f653fc26.zip
r464: a big improvement to the API for writing server-side RPC
servers. Previously the server pipe code needed to return the RPC level status (nearly always "OK") and separately set the function call return using r->out.result. All the programmers writing servers (metze, jelmer and me) were often getting this wrong, by doing things like "return NT_STATUS_NO_MEMORY" which was really quite meaningless as there is no code like that at the dcerpc level. I have now modified pidl to generate the necessary boilerplate so that just returning the status you want from the function will work. So for a NTSTATUS function you return NT_STATUS_XXX and from a WERROR function you return WERR_XXX. If you really want to generate a DCERPC level fault rather than just a return value in your function then you should use the DCESRV_FAULT() macro which will correctly generate a fault for you. As a side effect, this also adds automatic type checking of all of our server side rpc functions, which was impossible with the old API. When I changed the API I found and fixed quite a few functions with the wrong type information, so this is definately useful. I have also changed the server side template generation to generate a DCERPC "operation range error" by default when you have not yet filled in a server side function. This allows us to correctly implement functions in any order in our rpc pipe servers and give the client the right information about the fault. (This used to be commit a4df5c7cf88891a78d82c8d6d7f058d8485e73f0)
Diffstat (limited to 'source4/librpc')
-rw-r--r--source4/librpc/idl/srvsvc.idl56
1 files changed, 28 insertions, 28 deletions
diff --git a/source4/librpc/idl/srvsvc.idl b/source4/librpc/idl/srvsvc.idl
index a9d43539e9..9881f8f499 100644
--- a/source4/librpc/idl/srvsvc.idl
+++ b/source4/librpc/idl/srvsvc.idl
@@ -1016,12 +1016,12 @@
/******************/
/* Function: 0x18 */
- NTSTATUS srvsvc_NETRSERVERSTATISTICSGET(
+ WERROR srvsvc_NETRSERVERSTATISTICSGET(
);
/******************/
/* Function: 0x19 */
- NTSTATUS srvsvc_NETRSERVERTRANSPORTADD(
+ WERROR srvsvc_NETRSERVERTRANSPORTADD(
);
/**************************/
@@ -1106,47 +1106,47 @@
/******************/
/* Function: 0x1b */
- NTSTATUS srvsvc_NETRSERVERTRANSPORTDEL(
+ WERROR srvsvc_NETRSERVERTRANSPORTDEL(
);
/******************/
/* Function: 0x1c */
- NTSTATUS srvsvc_NET_REMOTE_TOD(
+ WERROR srvsvc_NET_REMOTE_TOD(
);
/******************/
/* Function: 0x1d */
- NTSTATUS srvsvc_NETRSERVERSETSERVICEBITS(
+ WERROR srvsvc_NETRSERVERSETSERVICEBITS(
);
/******************/
/* Function: 0x1e */
- NTSTATUS srvsvc_NETRPRPATHTYPE(
+ WERROR srvsvc_NETRPRPATHTYPE(
);
/******************/
/* Function: 0x1f */
- NTSTATUS srvsvc_NETRPRPATHCANONICALIZE(
+ WERROR srvsvc_NETRPRPATHCANONICALIZE(
);
/******************/
/* Function: 0x20 */
- NTSTATUS srvsvc_NETRPRPATHCOMPARE(
+ WERROR srvsvc_NETRPRPATHCOMPARE(
);
/******************/
/* Function: 0x21 */
- NTSTATUS srvsvc_NET_NAME_VALIDATE(
+ WERROR srvsvc_NET_NAME_VALIDATE(
);
/******************/
/* Function: 0x22 */
- NTSTATUS srvsvc_NETRPRNAMECANONICALIZE(
+ WERROR srvsvc_NETRPRNAMECANONICALIZE(
);
/******************/
/* Function: 0x23 */
- NTSTATUS srvsvc_NETRPRNAMECOMPARE(
+ WERROR srvsvc_NETRPRNAMECOMPARE(
);
/******************/
@@ -1164,86 +1164,86 @@
/******************/
/* Function: 0x25 */
- NTSTATUS srvsvc_NETRSHAREDELSTART(
+ WERROR srvsvc_NETRSHAREDELSTART(
);
/******************/
/* Function: 0x26 */
- NTSTATUS srvsvc_NETRSHAREDELCOMMIT(
+ WERROR srvsvc_NETRSHAREDELCOMMIT(
);
/******************/
/* Function: 0x27 */
- NTSTATUS srvsvc_NET_FILE_QUERY_SECDESC(
+ WERROR srvsvc_NET_FILE_QUERY_SECDESC(
);
/******************/
/* Function: 0x28 */
- NTSTATUS srvsvc_NET_FILE_SET_SECDESC(
+ WERROR srvsvc_NET_FILE_SET_SECDESC(
);
/******************/
/* Function: 0x29 */
- NTSTATUS srvsvc_NETRSERVERTRANSPORTADDEX(
+ WERROR srvsvc_NETRSERVERTRANSPORTADDEX(
);
/******************/
/* Function: 0x2a */
- NTSTATUS srvsvc_NETRSERVERSETSERVICEBITSEX(
+ WERROR srvsvc_NETRSERVERSETSERVICEBITSEX(
);
/******************/
/* Function: 0x2b */
- NTSTATUS srvsvc_NETRDFSGETVERSION(
+ WERROR srvsvc_NETRDFSGETVERSION(
);
/******************/
/* Function: 0x2c */
- NTSTATUS srvsvc_NETRDFSCREATELOCALPARTITION(
+ WERROR srvsvc_NETRDFSCREATELOCALPARTITION(
);
/******************/
/* Function: 0x2d */
- NTSTATUS srvsvc_NETRDFSDELETELOCALPARTITION(
+ WERROR srvsvc_NETRDFSDELETELOCALPARTITION(
);
/******************/
/* Function: 0x2e */
- NTSTATUS srvsvc_NETRDFSSETLOCALVOLUMESTATE(
+ WERROR srvsvc_NETRDFSSETLOCALVOLUMESTATE(
);
/******************/
/* Function: 0x2f */
- NTSTATUS srvsvc_NETRDFSSETSERVERINFO(
+ WERROR srvsvc_NETRDFSSETSERVERINFO(
);
/******************/
/* Function: 0x30 */
- NTSTATUS srvsvc_NETRDFSCREATEEXITPOINT(
+ WERROR srvsvc_NETRDFSCREATEEXITPOINT(
);
/******************/
/* Function: 0x31 */
- NTSTATUS srvsvc_NETRDFSDELETEEXITPOINT(
+ WERROR srvsvc_NETRDFSDELETEEXITPOINT(
);
/******************/
/* Function: 0x32 */
- NTSTATUS srvsvc_NETRDFSMODIFYPREFIX(
+ WERROR srvsvc_NETRDFSMODIFYPREFIX(
);
/******************/
/* Function: 0x33 */
- NTSTATUS srvsvc_NETRDFSFIXLOCALVOLUME(
+ WERROR srvsvc_NETRDFSFIXLOCALVOLUME(
);
/******************/
/* Function: 0x34 */
- NTSTATUS srvsvc_NETRDFSMANAGERREPORTSITEINFO(
+ WERROR srvsvc_NETRDFSMANAGERREPORTSITEINFO(
);
/******************/
/* Function: 0x35 */
- NTSTATUS srvsvc_NETRSERVERTRANSPORTDELEX(
+ WERROR srvsvc_NETRSERVERTRANSPORTDELEX(
);
}