mirror of
https://github.com/samba-team/samba.git
synced 2025-07-31 20:22:15 +03:00
Add NetWkstaGetInfo.
Modified to include common.h entry for netapitest_wksta function by Kai Blin <kai@samba.org> Signed-off-by: Hans Leidekker <hans@meelstraat.net> Reviewed-by: Kai Blin <kai@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Wed Oct 16 07:00:45 CEST 2013 on sn-devel-104
This commit is contained in:
committed by
Jeremy Allison
parent
a1fcd71f9a
commit
a4c3553b5a
@ -373,6 +373,53 @@ NET_API_STATUS NetServerSetInfo(const char * server_name /* [in] [unique] */,
|
||||
return (NET_API_STATUS)r.out.result;
|
||||
}
|
||||
|
||||
/****************************************************************
|
||||
NetWkstaGetInfo
|
||||
****************************************************************/
|
||||
|
||||
NET_API_STATUS NetWkstaGetInfo(const char * wksta_name /* [in] [unique] */,
|
||||
uint32_t level /* [in] */,
|
||||
uint8_t **buffer /* [out] [ref] */)
|
||||
{
|
||||
struct NetWkstaGetInfo r;
|
||||
struct libnetapi_ctx *ctx = NULL;
|
||||
NET_API_STATUS status;
|
||||
WERROR werr;
|
||||
TALLOC_CTX *frame = talloc_stackframe();
|
||||
|
||||
status = libnetapi_getctx(&ctx);
|
||||
if (status != 0) {
|
||||
TALLOC_FREE(frame);
|
||||
return status;
|
||||
}
|
||||
|
||||
/* In parameters */
|
||||
r.in.server_name = wksta_name;
|
||||
r.in.level = level;
|
||||
|
||||
/* Out parameters */
|
||||
r.out.buffer = buffer;
|
||||
|
||||
if (DEBUGLEVEL >= 10) {
|
||||
NDR_PRINT_IN_DEBUG(NetWkstaGetInfo, &r);
|
||||
}
|
||||
|
||||
if (LIBNETAPI_LOCAL_SERVER(wksta_name)) {
|
||||
werr = NetWkstaGetInfo_l(ctx, &r);
|
||||
} else {
|
||||
werr = NetWkstaGetInfo_r(ctx, &r);
|
||||
}
|
||||
|
||||
r.out.result = W_ERROR_V(werr);
|
||||
|
||||
if (DEBUGLEVEL >= 10) {
|
||||
NDR_PRINT_OUT_DEBUG(NetWkstaGetInfo, &r);
|
||||
}
|
||||
|
||||
TALLOC_FREE(frame);
|
||||
return (NET_API_STATUS)r.out.result;
|
||||
}
|
||||
|
||||
/****************************************************************
|
||||
NetGetDCName
|
||||
****************************************************************/
|
||||
|
Reference in New Issue
Block a user