]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
Add new privileged RPC call to RPC out library
authorVMware, Inc <>
Mon, 15 Oct 2012 04:56:10 +0000 (21:56 -0700)
committerDmitry Torokhov <dtor@vmware.com>
Fri, 19 Oct 2012 18:32:42 +0000 (11:32 -0700)
Some tools require a privileged RPC out call for example the VGAuthImport for
the namespace DB interface.

This adds the RpcOUt_SendOneRawPriv call which will make a privileged RPC call
with the same arguments as the pre-exisiting RpcOUt_SendOneRaw API. It is expected
that the caller of the RpcOUt_SendOneRawPriv be running as root or Administrator.

The intention here is to keep the same model as the RpcOUt_SendOneRaw where the
caller can just make the standalone RPC call which internally handles the RPC
creation of a connection and destroys it before returning.
So the Posix RpcOUt_SendOneRawPriv expets the caller to raise and lower the IO
privilege level (on Linux platforms only) until the RPC internally calls a kernel
mode driver to do the real privileged call. On Windows, the
RpcOUt_SendOneRawPriv opens a connection to the kernel mode driver and
pass the RPC request to it to send and then close the driver connection before
returning.

Signed-off-by: Dmitry Torokhov <dtor@vmware.com>
open-vm-tools/lib/include/rpcout.h

index 4af405b7b53c11f501c40a7202e9cd608437d702..d5fd25c4f6aee3db96d3fd06333d2f5ec316b8b6 100644 (file)
@@ -70,4 +70,9 @@ Bool RpcOut_sendOne(char **reply, size_t *repLen, char const *reqFmt, ...);
 
 Bool RpcOut_SendOneRaw(void *request, size_t reqLen, char **reply, size_t *repLen);
 
+/*
+ * As the above but must be run by admin/root to make the privileged RPC call successfully.
+ */
+Bool RpcOut_SendOneRawPriv(void *request, size_t reqLen, char **reply, size_t *repLen);
+
 #endif /* __RPCOUT_H__ */