2 Unix SMB/CIFS implementation.
4 PAC Glue between Samba and the KDC
6 Copyright (C) Catalyst.Net Ltd 2023
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 3 of the License, or
11 (at your option) any later version.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program. If not, see <http://www.gnu.org/licenses/>.
22 #include "lib/replace/replace.h"
27 #include "system/kerberos.h"
28 #include "auth/kerberos/kerberos.h"
29 #include <krb5/krb5.h>
31 #include "lib/util/data_blob.h"
32 #include "librpc/gen_ndr/ndr_krb5pac.h"
36 const DATA_BLOB
*data
;
40 size_t type_index
[PAC_TYPE_COUNT
];
41 struct type_data
*type_blobs
;
45 krb5_error_code
pac_blobs_from_krb5_pac(TALLOC_CTX
*mem_ctx
,
47 const krb5_const_pac pac
,
48 struct pac_blobs
**pac_blobs
);
50 #define pac_blobs_ensure_exists(pac_blobs, type) \
51 _pac_blobs_ensure_exists(pac_blobs, \
57 krb5_error_code
_pac_blobs_ensure_exists(struct pac_blobs
*pac_blobs
,
61 const char *function
);
63 #define pac_blobs_replace_existing(pac_blobs, type, blob) \
64 _pac_blobs_replace_existing(pac_blobs, \
71 krb5_error_code
_pac_blobs_replace_existing(struct pac_blobs
*pac_blobs
,
74 const DATA_BLOB
*blob
,
76 const char *function
);
78 krb5_error_code
pac_blobs_add_blob(struct pac_blobs
*pac_blobs
,
80 const DATA_BLOB
*blob
);
82 void pac_blobs_remove_blob(struct pac_blobs
*pac_blobs
,