samba-tool: add `samba-tool domain kds root_key create`
[samba.git] / auth / auth_sam_reply.h
blob57a98249b08c5a525e5d4a025127865823ce3c01
1 /*
2 Unix SMB/CIFS implementation.
4 Convert a server info struct into the form for PAC and NETLOGON replies
6 Copyright (C) Andrew Bartlett <abartlet@samba.org> 2004
7 Copyright (C) Stefan Metzmacher <metze@samba.org> 2005
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.
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.
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/>.
23 #ifndef __AUTH_AUTH_SAM_REPLY_H__
24 #define __AUTH_AUTH_SAM_REPLY_H__
26 #include "libcli/util/ntstatus.h"
27 #include "libcli/util/werror.h"
28 #include "librpc/gen_ndr/auth.h"
30 #undef _PRINTF_ATTRIBUTE
31 #define _PRINTF_ATTRIBUTE(a1, a2) PRINTF_ATTRIBUTE(a1, a2)
32 /* this file contains prototypes for functions that are private
33 * to this subsystem or library. These functions should not be
34 * used outside this particular subsystem! */
37 /* The following definitions come from auth/auth_sam_reply.c */
39 NTSTATUS make_user_info_SamBaseInfo(TALLOC_CTX *mem_ctx,
40 const char *account_name,
41 const struct netr_SamBaseInfo *base,
42 bool authenticated,
43 struct auth_user_info **_user_info);
45 struct auth_user_info *auth_user_info_copy(TALLOC_CTX *mem_ctx,
46 const struct auth_user_info *src);
48 NTSTATUS auth_convert_user_info_dc_saminfo6(TALLOC_CTX *mem_ctx,
49 const struct auth_user_info_dc *user_info_dc,
50 enum auth_group_inclusion group_inclusion,
51 struct netr_SamInfo6 **_sam6,
52 struct PAC_DOMAIN_GROUP_MEMBERSHIP **_resource_groups);
53 NTSTATUS auth_convert_user_info_dc_saminfo2(TALLOC_CTX *mem_ctx,
54 const struct auth_user_info_dc *user_info_dc,
55 enum auth_group_inclusion group_inclusion,
56 struct netr_SamInfo2 **_sam2);
57 NTSTATUS auth_convert_user_info_dc_saminfo3(TALLOC_CTX *mem_ctx,
58 const struct auth_user_info_dc *user_info_dc,
59 enum auth_group_inclusion group_inclusion,
60 struct netr_SamInfo3 **_sam3,
61 struct PAC_DOMAIN_GROUP_MEMBERSHIP **_resource_groups);
63 /**
64 * Make a user_info_dc struct from the info3 returned by a domain logon
66 NTSTATUS make_user_info_dc_netlogon_validation(TALLOC_CTX *mem_ctx,
67 const char *account_name,
68 uint16_t validation_level,
69 const union netr_Validation *validation,
70 bool authenticated,
71 struct auth_user_info_dc **_user_info_dc);
73 /**
74 * Make a user_info_dc struct from the PAC_LOGON_INFO supplied in the krb5 logon
76 NTSTATUS make_user_info_dc_pac(TALLOC_CTX *mem_ctx,
77 const struct PAC_LOGON_INFO *pac_logon_info,
78 const struct PAC_UPN_DNS_INFO *pac_upn_dns_info,
79 enum auth_group_inclusion group_inclusion,
80 struct auth_user_info_dc **_user_info_dc);
82 /* The following definitions come from auth/wbc_auth_util.c */
84 struct wbcAuthUserInfo;
86 struct netr_SamInfo6 *wbcAuthUserInfo_to_netr_SamInfo6(TALLOC_CTX *mem_ctx,
87 const struct wbcAuthUserInfo *info);
89 #undef _PRINTF_ATTRIBUTE
90 #define _PRINTF_ATTRIBUTE(a1, a2)
92 #endif /* __AUTH_AUTH_SAM_REPLY_H__ */