mirror of
https://github.com/samba-team/samba.git
synced 2025-08-04 08:22:08 +03:00
netapi: add NetUserChangePassword skeleton.
Guenther
(This used to be commit f4ce688710
)
This commit is contained in:
@ -585,6 +585,52 @@ NET_API_STATUS NetUserEnum(const char * server_name /* [in] [unique] */,
|
|||||||
return r.out.result;
|
return r.out.result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/****************************************************************
|
||||||
|
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
|
NetQueryDisplayInformation
|
||||||
****************************************************************/
|
****************************************************************/
|
||||||
|
@ -100,6 +100,14 @@ WERROR NetUserEnum_r(struct libnetapi_ctx *ctx,
|
|||||||
struct NetUserEnum *r);
|
struct NetUserEnum *r);
|
||||||
WERROR NetUserEnum_l(struct libnetapi_ctx *ctx,
|
WERROR NetUserEnum_l(struct libnetapi_ctx *ctx,
|
||||||
struct NetUserEnum *r);
|
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] */,
|
NET_API_STATUS NetQueryDisplayInformation(const char * server_name /* [in] [unique] */,
|
||||||
uint32_t level /* [in] */,
|
uint32_t level /* [in] */,
|
||||||
uint32_t idx /* [in] */,
|
uint32_t idx /* [in] */,
|
||||||
|
@ -833,3 +833,21 @@ WERROR NetQueryDisplayInformation_l(struct libnetapi_ctx *ctx,
|
|||||||
{
|
{
|
||||||
return WERR_NOT_SUPPORTED;
|
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;
|
||||||
|
}
|
||||||
|
Reference in New Issue
Block a user