22e3c77e267c522b1191b8d84086cd7dab98cfec
[sharpe/samba-autobuild/.git] / auth / auth_sam_reply.h
1 /*
2    Unix SMB/CIFS implementation.
3
4    Convert a server info struct into the form for PAC and NETLOGON replies
5
6    Copyright (C) Andrew Bartlett <abartlet@samba.org> 2004
7    Copyright (C) Stefan Metzmacher <metze@samba.org>  2005
8
9    This program is free software; you can redistribute it and/or modify
10    it under the terms of the GNU General Public License as published by
11    the Free Software Foundation; either version 3 of the License, or
12    (at your option) any later version.
13
14    This program is distributed in the hope that it will be useful,
15    but WITHOUT ANY WARRANTY; without even the implied warranty of
16    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17    GNU General Public License for more details.
18
19    You should have received a copy of the GNU General Public License
20    along with this program.  If not, see <http://www.gnu.org/licenses/>.
21 */
22
23 #ifndef __AUTH_AUTH_SAM_REPLY_H__
24 #define __AUTH_AUTH_SAM_REPLY_H__
25
26 #undef _PRINTF_ATTRIBUTE
27 #define _PRINTF_ATTRIBUTE(a1, a2) PRINTF_ATTRIBUTE(a1, a2)
28 /* this file contains prototypes for functions that are private
29  * to this subsystem or library. These functions should not be
30  * used outside this particular subsystem! */
31
32
33 /* The following definitions come from auth/auth_sam_reply.c  */
34
35 NTSTATUS make_user_info_SamBaseInfo(TALLOC_CTX *mem_ctx,
36                                     const const char *account_name,
37                                     const struct netr_SamBaseInfo *base,
38                                     bool authenticated,
39                                     struct auth_user_info **_user_info);
40
41 NTSTATUS auth_convert_user_info_dc_sambaseinfo(TALLOC_CTX *mem_ctx,
42                                               const struct auth_user_info_dc *user_info_dc,
43                                               struct netr_SamBaseInfo **_sam);
44 NTSTATUS auth_convert_user_info_dc_saminfo6(TALLOC_CTX *mem_ctx,
45                                            const struct auth_user_info_dc *user_info_dc,
46                                            struct netr_SamInfo6 **_sam6);
47 NTSTATUS auth_convert_user_info_dc_saminfo2(TALLOC_CTX *mem_ctx,
48                                            const struct auth_user_info_dc *user_info_dc,
49                                            struct netr_SamInfo2 **_sam2);
50 NTSTATUS auth_convert_user_info_dc_saminfo3(TALLOC_CTX *mem_ctx,
51                                            const struct auth_user_info_dc *user_info_dc,
52                                            struct netr_SamInfo3 **_sam3);
53
54 /**
55  * Make a user_info_dc struct from the info3 returned by a domain logon
56  */
57 NTSTATUS make_user_info_dc_netlogon_validation(TALLOC_CTX *mem_ctx,
58                                               const char *account_name,
59                                               uint16_t validation_level,
60                                               const union netr_Validation *validation,
61                                               bool authenticated,
62                                               struct auth_user_info_dc **_user_info_dc);
63
64 /**
65  * Make a user_info_dc struct from the PAC_LOGON_INFO supplied in the krb5 logon
66  */
67 NTSTATUS make_user_info_dc_pac(TALLOC_CTX *mem_ctx,
68                               const struct PAC_LOGON_INFO *pac_logon_info,
69                               struct auth_user_info_dc **_user_info_dc);
70
71 /* The following definitions come from auth/wbc_auth_util.c  */
72
73 struct wbcAuthUserInfo;
74
75 struct netr_SamInfo6 *wbcAuthUserInfo_to_netr_SamInfo6(TALLOC_CTX *mem_ctx,
76                                                        const struct wbcAuthUserInfo *info);
77
78 #undef _PRINTF_ATTRIBUTE
79 #define _PRINTF_ATTRIBUTE(a1, a2)
80
81 #endif /* __AUTH_AUTH_SAM_REPLY_H__ */