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>
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__ */