[PATCH v2 3/6] s3-rpcclient: add mgmt command support

Stefan (metze) Metzmacher metze at samba.org
Fri Jan 17 00:45:06 MST 2014


Hi David,

> Signed-off-by: David Disseldorp <ddiss at samba.org>
> ---
>  librpc/idl/mgmt.idl           |  1 +
>  source3/rpcclient/cmd_mgmt.c  | 80 +++++++++++++++++++++++++++++++++++++++++++
>  source3/rpcclient/rpcclient.c |  2 ++
>  source3/wscript_build         |  4 ++-
>  4 files changed, 86 insertions(+), 1 deletion(-)
>  create mode 100644 source3/rpcclient/cmd_mgmt.c
> 
> diff --git a/librpc/idl/mgmt.idl b/librpc/idl/mgmt.idl
> index 17c8cc4..ea6d654 100644
> --- a/librpc/idl/mgmt.idl
> +++ b/librpc/idl/mgmt.idl
> @@ -8,6 +8,7 @@ import "misc.idl";
>    uuid("afa8bd80-7d8a-11c9-bef4-08002b102989"), 
>    version(1.0),
>    pointer_default(unique),
> +  endpoint("ncacn_np:[\\pipe\\svcctl]", "ncalrpc:"),
>    helpstring("DCE/RPC Remote Management")
>  ] 

The mgmt interface is a special one, it's available on every
endpoint and the results are only valid for the specific endpoint.

E.g. different services may provide different interfaces and
also support different auth types and may use different server credentials.

So the used endpoint should be specified by the caller.

The same comments apply to the torture patch (there's also an unrelated hunk
to source4/torture/rpc/fsrvp.c).

Adding the torture test to make test should be a separate commit.
There we should call smbtorture for every endpoint we provide.

metze


More information about the samba-technical mailing list