From 668ce210ce8f280771625208e105f90e6375aee6 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Wed, 16 Jul 2008 10:47:38 +0200 Subject: netapi: add skeleton for NetUserGetInfo(). Guenther (This used to be commit 84962bf50d2c3265c0134481f24f6fa34f1dfc99) --- source3/lib/netapi/libnetapi.c | 46 ++++++++++++++++++++++++++++++++++++++++++ source3/lib/netapi/libnetapi.h | 8 ++++++++ source3/lib/netapi/user.c | 19 +++++++++++++++++ 3 files changed, 73 insertions(+) diff --git a/source3/lib/netapi/libnetapi.c b/source3/lib/netapi/libnetapi.c index 0953de6058..8013c74fd6 100644 --- a/source3/lib/netapi/libnetapi.c +++ b/source3/lib/netapi/libnetapi.c @@ -631,6 +631,52 @@ NET_API_STATUS NetUserChangePassword(const char * domain_name /* [in] */, return r.out.result; } +/**************************************************************** + NetUserGetInfo +****************************************************************/ + +NET_API_STATUS NetUserGetInfo(const char * server_name /* [in] */, + const char * user_name /* [in] */, + uint32_t level /* [in] */, + uint8_t **buffer /* [out] [ref] */) +{ + struct NetUserGetInfo r; + struct libnetapi_ctx *ctx = NULL; + NET_API_STATUS status; + WERROR werr; + + status = libnetapi_getctx(&ctx); + if (status != 0) { + return status; + } + + /* In parameters */ + r.in.server_name = server_name; + r.in.user_name = user_name; + r.in.level = level; + + /* Out parameters */ + r.out.buffer = buffer; + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(NetUserGetInfo, &r); + } + + if (LIBNETAPI_LOCAL_SERVER(server_name)) { + werr = NetUserGetInfo_l(ctx, &r); + } else { + werr = NetUserGetInfo_r(ctx, &r); + } + + r.out.result = W_ERROR_V(werr); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(NetUserGetInfo, &r); + } + + return r.out.result; +} + /**************************************************************** NetQueryDisplayInformation ****************************************************************/ diff --git a/source3/lib/netapi/libnetapi.h b/source3/lib/netapi/libnetapi.h index a6c8e84b6b..349c3c1d3c 100644 --- a/source3/lib/netapi/libnetapi.h +++ b/source3/lib/netapi/libnetapi.h @@ -108,6 +108,14 @@ WERROR NetUserChangePassword_r(struct libnetapi_ctx *ctx, struct NetUserChangePassword *r); WERROR NetUserChangePassword_l(struct libnetapi_ctx *ctx, struct NetUserChangePassword *r); +NET_API_STATUS NetUserGetInfo(const char * server_name /* [in] */, + const char * user_name /* [in] */, + uint32_t level /* [in] */, + uint8_t **buffer /* [out] [ref] */); +WERROR NetUserGetInfo_r(struct libnetapi_ctx *ctx, + struct NetUserGetInfo *r); +WERROR NetUserGetInfo_l(struct libnetapi_ctx *ctx, + struct NetUserGetInfo *r); NET_API_STATUS NetQueryDisplayInformation(const char * server_name /* [in] [unique] */, uint32_t level /* [in] */, uint32_t idx /* [in] */, diff --git a/source3/lib/netapi/user.c b/source3/lib/netapi/user.c index 8b1287e300..b5e64fb67d 100644 --- a/source3/lib/netapi/user.c +++ b/source3/lib/netapi/user.c @@ -1082,3 +1082,22 @@ WERROR NetUserChangePassword_l(struct libnetapi_ctx *ctx, { return WERR_NOT_SUPPORTED; } + +/**************************************************************** +****************************************************************/ + +WERROR NetUserGetInfo_r(struct libnetapi_ctx *ctx, + struct NetUserGetInfo *r) +{ + return WERR_NOT_SUPPORTED; +} + +/**************************************************************** +****************************************************************/ + +WERROR NetUserGetInfo_l(struct libnetapi_ctx *ctx, + struct NetUserGetInfo *r) +{ + return WERR_NOT_SUPPORTED; +} + -- cgit