diff options
author | Günther Deschner <gd@samba.org> | 2008-07-16 10:47:38 +0200 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2008-07-18 17:16:36 +0200 |
commit | 668ce210ce8f280771625208e105f90e6375aee6 (patch) | |
tree | 722cf7c409e5d79b2dde8872b9ccec21e451e494 /source3/lib/netapi | |
parent | 9569621e95c034e2300ee29eacaf7442360bc63e (diff) | |
download | samba-668ce210ce8f280771625208e105f90e6375aee6.tar.gz samba-668ce210ce8f280771625208e105f90e6375aee6.tar.bz2 samba-668ce210ce8f280771625208e105f90e6375aee6.zip |
netapi: add skeleton for NetUserGetInfo().
Guenther
(This used to be commit 84962bf50d2c3265c0134481f24f6fa34f1dfc99)
Diffstat (limited to 'source3/lib/netapi')
-rw-r--r-- | source3/lib/netapi/libnetapi.c | 46 | ||||
-rw-r--r-- | source3/lib/netapi/libnetapi.h | 8 | ||||
-rw-r--r-- | source3/lib/netapi/user.c | 19 |
3 files changed, 73 insertions, 0 deletions
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 @@ -632,6 +632,52 @@ NET_API_STATUS NetUserChangePassword(const char * domain_name /* [in] */, } /**************************************************************** + 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; +} + |