2 * Unix SMB/CIFS implementation.
6 * Copyright (c) 2000-2001 Tim Potter
7 * Copyright (c) 1992-2000 Andrew Tridgell
8 * Copyright (c) 2002 Rafal Szczesniak
9 * Copyright (c) 2005 Jeremy Allison
10 * Copyright (c) 2007 Michael Adam
11 * Copyright (c) 2008 Guenther Deschner
13 * This program is free software; you can redistribute it and/or modify
14 * it under the terms of the GNU General Public License as published by
15 * the Free Software Foundation; either version 3 of the License, or
16 * (at your option) any later version.
18 * This program is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU General Public License for more details.
23 * You should have received a copy of the GNU General Public License
24 * along with this program; if not, see <http://www.gnu.org/licenses/>.
30 /* The following definitions come from rpc_client/cli_samr.c */
33 * @brief Change the password of a user.
35 * @param[in] h The dcerpc binding hanlde to use.
37 * @param[in] mem_ctx The memory context to use.
39 * @param[in] user_handle The password of the user to chang the handle
41 * @param[in] newpassword The new password to set.
43 * @param[in] oldpassword The old password for verification
45 * @param[out] presult A pointer for the NDR NTSTATUS error code.
47 * @return A corresponding NTSTATUS error code for the connection.
49 NTSTATUS dcerpc_samr_chgpasswd_user(struct dcerpc_binding_handle *h,
51 struct policy_handle *user_handle,
52 const char *newpassword,
53 const char *oldpassword,
56 NTSTATUS rpccli_samr_chgpasswd_user(struct rpc_pipe_client *cli,
58 struct policy_handle *user_handle,
59 const char *newpassword,
60 const char *oldpassword);
61 NTSTATUS rpccli_samr_chgpasswd_user2(struct rpc_pipe_client *cli,
64 const char *newpassword,
65 const char *oldpassword);
66 NTSTATUS rpccli_samr_chng_pswd_auth_crap(struct rpc_pipe_client *cli,
69 DATA_BLOB new_nt_password_blob,
70 DATA_BLOB old_nt_hash_enc_blob,
71 DATA_BLOB new_lm_password_blob,
72 DATA_BLOB old_lm_hash_enc_blob);
73 NTSTATUS rpccli_samr_chgpasswd_user3(struct rpc_pipe_client *cli,
76 const char *newpassword,
77 const char *oldpassword,
78 struct samr_DomInfo1 **dominfo1,
79 struct userPwdChangeFailureInformation **reject);
80 void get_query_dispinfo_params(int loop_count, uint32 *max_entries,
82 NTSTATUS rpccli_try_samr_connects(struct rpc_pipe_client *cli,
85 struct policy_handle *connect_pol);
87 #endif /* _CLI_SAMR_H */