diff options
author | Günther Deschner <gd@samba.org> | 2008-06-25 00:32:02 +0200 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2008-06-25 09:55:11 +0200 |
commit | 6fa8ac6ab4e99f16c5e47e78343266d77cc646c0 (patch) | |
tree | 78fb967904e9cb1e384c4eafa91d5f9ffe0678a1 /source3 | |
parent | 84cf8dc8c62da71e36d196581cce8038d8a05fe2 (diff) | |
download | samba-6fa8ac6ab4e99f16c5e47e78343266d77cc646c0.tar.gz samba-6fa8ac6ab4e99f16c5e47e78343266d77cc646c0.tar.bz2 samba-6fa8ac6ab4e99f16c5e47e78343266d77cc646c0.zip |
netapi: add NetUserChangePassword skeleton.
Guenther
(This used to be commit f4ce6887103d0f50bf9a91251e2aceb77674604f)
Diffstat (limited to 'source3')
-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 | 18 |
3 files changed, 72 insertions, 0 deletions
diff --git a/source3/lib/netapi/libnetapi.c b/source3/lib/netapi/libnetapi.c index 173c4d3c66..659c4c7e5f 100644 --- a/source3/lib/netapi/libnetapi.c +++ b/source3/lib/netapi/libnetapi.c @@ -586,6 +586,52 @@ NET_API_STATUS NetUserEnum(const char * server_name /* [in] [unique] */, } /**************************************************************** + NetUserChangePassword +****************************************************************/ + +NET_API_STATUS NetUserChangePassword(const char * domain_name /* [in] */, + const char * user_name /* [in] */, + const char * old_password /* [in] */, + const char * new_password /* [in] */) +{ + struct NetUserChangePassword 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.domain_name = domain_name; + r.in.user_name = user_name; + r.in.old_password = old_password; + r.in.new_password = new_password; + + /* Out parameters */ + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(NetUserChangePassword, &r); + } + + if (LIBNETAPI_LOCAL_SERVER(domain_name)) { + werr = NetUserChangePassword_l(ctx, &r); + } else { + werr = NetUserChangePassword_r(ctx, &r); + } + + r.out.result = W_ERROR_V(werr); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(NetUserChangePassword, &r); + } + + return r.out.result; +} + +/**************************************************************** NetQueryDisplayInformation ****************************************************************/ diff --git a/source3/lib/netapi/libnetapi.h b/source3/lib/netapi/libnetapi.h index 12be1cc074..1364a4c08f 100644 --- a/source3/lib/netapi/libnetapi.h +++ b/source3/lib/netapi/libnetapi.h @@ -100,6 +100,14 @@ WERROR NetUserEnum_r(struct libnetapi_ctx *ctx, struct NetUserEnum *r); WERROR NetUserEnum_l(struct libnetapi_ctx *ctx, struct NetUserEnum *r); +NET_API_STATUS NetUserChangePassword(const char * domain_name /* [in] */, + const char * user_name /* [in] */, + const char * old_password /* [in] */, + const char * new_password /* [in] */); +WERROR NetUserChangePassword_r(struct libnetapi_ctx *ctx, + struct NetUserChangePassword *r); +WERROR NetUserChangePassword_l(struct libnetapi_ctx *ctx, + struct NetUserChangePassword *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 53a307a6aa..0d8065dd7f 100644 --- a/source3/lib/netapi/user.c +++ b/source3/lib/netapi/user.c @@ -833,3 +833,21 @@ WERROR NetQueryDisplayInformation_l(struct libnetapi_ctx *ctx, { return WERR_NOT_SUPPORTED; } + +/**************************************************************** +****************************************************************/ + +WERROR NetUserChangePassword_r(struct libnetapi_ctx *ctx, + struct NetUserChangePassword *r) +{ + return WERR_NOT_SUPPORTED; +} + +/**************************************************************** +****************************************************************/ + +WERROR NetUserChangePassword_l(struct libnetapi_ctx *ctx, + struct NetUserChangePassword *r) +{ + return WERR_NOT_SUPPORTED; +} |