X-Git-Url: http://git.samba.org/?a=blobdiff_plain;f=source3%2Flib%2Fnetapi%2Flibnetapi.c;h=6e89cb566ca4fe888ea53912848ddc649c831857;hb=a4c3553b5ad4c016a4154f1077e78fb83c791a30;hp=45bb1d5d821a359c209ddd5d8905e7b7bb7edbfb;hpb=a1fcd71f9aad98428e33bc2e31cf6d077b0c02fc;p=mat%2Fsamba.git diff --git a/source3/lib/netapi/libnetapi.c b/source3/lib/netapi/libnetapi.c index 45bb1d5d82..6e89cb566c 100644 --- a/source3/lib/netapi/libnetapi.c +++ b/source3/lib/netapi/libnetapi.c @@ -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 ****************************************************************/