s3:smbd map_username() doesn't need sconn anymore
[Samba/ekacnet.git] / source3 / rpc_server / srv_samr_util.h
blobfb6d02620ddc446f61b57fe0a783ec4f0a35f7cf
1 /*
2 Unix SMB/CIFS implementation.
3 SAMR Pipe utility functions.
5 Copyright (C) Luke Kenneth Casson Leighton 1996-1998
6 Copyright (C) Gerald (Jerry) Carter 2000-2001
7 Copyright (C) Andrew Bartlett 2001-2002
8 Copyright (C) Stefan (metze) Metzmacher 2002
9 Copyright (C) Guenther Deschner 2008
11 This program is free software; you can redistribute it and/or modify
12 it under the terms of the GNU General Public License as published by
13 the Free Software Foundation; either version 3 of the License, or
14 (at your option) any later version.
16 This program is distributed in the hope that it will be useful,
17 but WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 GNU General Public License for more details.
21 You should have received a copy of the GNU General Public License
22 along with this program. If not, see <http://www.gnu.org/licenses/>.
25 /* The following definitions come from rpc_server/srv_samr_util.c */
27 void copy_id2_to_sam_passwd(struct samu *to,
28 struct samr_UserInfo2 *from);
29 void copy_id4_to_sam_passwd(struct samu *to,
30 struct samr_UserInfo4 *from);
31 void copy_id6_to_sam_passwd(struct samu *to,
32 struct samr_UserInfo6 *from);
33 void copy_id8_to_sam_passwd(struct samu *to,
34 struct samr_UserInfo8 *from);
35 void copy_id10_to_sam_passwd(struct samu *to,
36 struct samr_UserInfo10 *from);
37 void copy_id11_to_sam_passwd(struct samu *to,
38 struct samr_UserInfo11 *from);
39 void copy_id12_to_sam_passwd(struct samu *to,
40 struct samr_UserInfo12 *from);
41 void copy_id13_to_sam_passwd(struct samu *to,
42 struct samr_UserInfo13 *from);
43 void copy_id14_to_sam_passwd(struct samu *to,
44 struct samr_UserInfo14 *from);
45 void copy_id16_to_sam_passwd(struct samu *to,
46 struct samr_UserInfo16 *from);
47 void copy_id17_to_sam_passwd(struct samu *to,
48 struct samr_UserInfo17 *from);
49 void copy_id18_to_sam_passwd(struct samu *to,
50 struct samr_UserInfo18 *from);
51 void copy_id20_to_sam_passwd(struct samu *to,
52 struct samr_UserInfo20 *from);
53 void copy_id21_to_sam_passwd(const char *log_prefix,
54 struct samu *to,
55 struct samr_UserInfo21 *from);
56 void copy_id23_to_sam_passwd(struct samu *to,
57 struct samr_UserInfo23 *from);
58 void copy_id24_to_sam_passwd(struct samu *to,
59 struct samr_UserInfo24 *from);
60 void copy_id25_to_sam_passwd(struct samu *to,
61 struct samr_UserInfo25 *from);
62 void copy_id26_to_sam_passwd(struct samu *to,
63 struct samr_UserInfo26 *from);
65 /* The following definitions come from rpc_server/srv_samr_chgpasswd.c */
67 bool chgpasswd(const char *name, const struct passwd *pass,
68 const char *oldpass, const char *newpass, bool as_root);
69 NTSTATUS pass_oem_change(char *user,
70 uchar password_encrypted_with_lm_hash[516],
71 const uchar old_lm_hash_encrypted[16],
72 uchar password_encrypted_with_nt_hash[516],
73 const uchar old_nt_hash_encrypted[16],
74 enum samPwdChangeReason *reject_reason);
75 NTSTATUS check_password_complexity(const char *username,
76 const char *password,
77 enum samPwdChangeReason *samr_reject_reason);