smbd: Remove get_Protocol()
[Samba.git] / libcli / security / claims-conversions.h
blob78d8e911bdd0cfc58e9b1f9595ad9ad164038c8b
1 /*
2 * Unix SMB implementation.
3 * Utility functions for converting between claims formats.
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 3 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, see <http://www.gnu.org/licenses/>.
19 #ifndef LIBCLI_SECURITY_CLAIMS_CONVERSIONS_H
20 #define LIBCLI_SECURITY_CLAIMS_CONVERSIONS_H
22 #include "replace.h"
23 #include <talloc.h>
24 #include "libcli/util/ntstatus.h"
26 struct CLAIMS_SET;
27 struct CLAIM_SECURITY_ATTRIBUTE_RELATIVE_V1;
28 struct ace_condition_token;
29 struct security_token;
31 bool claim_v1_to_ace_token(TALLOC_CTX *mem_ctx,
32 const struct CLAIM_SECURITY_ATTRIBUTE_RELATIVE_V1 *claim,
33 struct ace_condition_token *result);
35 bool ace_token_to_claim_v1(TALLOC_CTX *mem_ctx,
36 const char *name,
37 const struct ace_condition_token *tok,
38 struct CLAIM_SECURITY_ATTRIBUTE_RELATIVE_V1 **claim,
39 uint32_t flags);
41 bool add_claim_to_token(TALLOC_CTX *mem_ctx,
42 struct security_token *token,
43 const struct CLAIM_SECURITY_ATTRIBUTE_RELATIVE_V1 *claim,
44 const char *claim_type);
46 NTSTATUS token_claims_to_claims_v1(TALLOC_CTX *mem_ctx,
47 const struct CLAIMS_SET *claims_set,
48 struct CLAIM_SECURITY_ATTRIBUTE_RELATIVE_V1 **out_claims,
49 uint32_t *out_n_claims);
51 bool claim_v1_to_ace_composite_unchecked(TALLOC_CTX *mem_ctx,
52 const struct CLAIM_SECURITY_ATTRIBUTE_RELATIVE_V1 *claim,
53 struct ace_condition_token *result);
55 NTSTATUS claim_v1_check_and_sort(
56 TALLOC_CTX *mem_ctx,
57 struct CLAIM_SECURITY_ATTRIBUTE_RELATIVE_V1 *claim,
58 bool case_sensitive);
60 #endif /* LIBCLI_SECURITY_CLAIMS_CONVERSIONS_H */