selftest/Samba4: split out share configurations of provision_raw*()
[Samba/gbeck.git] / libcli / security / dom_sid.h
blob9d963927773de1c2eb041dd47dc553ba26eb7145
1 /*
2 Unix SMB/CIFS implementation.
3 Samba utility functions
5 Copyright (C) Stefan (metze) Metzmacher 2002-2004
6 Copyright (C) Andrew Tridgell 1992-2004
7 Copyright (C) Jeremy Allison 1999
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 _DOM_SID_H_
24 #define _DOM_SID_H_
26 int dom_sid_compare(const struct dom_sid *sid1, const struct dom_sid *sid2);
27 bool dom_sid_equal(const struct dom_sid *sid1, const struct dom_sid *sid2);
28 bool dom_sid_parse(const char *sidstr, struct dom_sid *ret);
29 struct dom_sid *dom_sid_parse_talloc(TALLOC_CTX *mem_ctx, const char *sidstr);
30 struct dom_sid *dom_sid_parse_length(TALLOC_CTX *mem_ctx, const DATA_BLOB *sid);
31 struct dom_sid *dom_sid_dup(TALLOC_CTX *mem_ctx, const struct dom_sid *dom_sid);
32 struct dom_sid *dom_sid_add_rid(TALLOC_CTX *mem_ctx,
33 const struct dom_sid *domain_sid,
34 uint32_t rid);
35 NTSTATUS dom_sid_split_rid(TALLOC_CTX *mem_ctx, const struct dom_sid *sid,
36 struct dom_sid **domain, uint32_t *rid);
37 bool dom_sid_in_domain(const struct dom_sid *domain_sid,
38 const struct dom_sid *sid);
39 char *dom_sid_string(TALLOC_CTX *mem_ctx, const struct dom_sid *sid);
41 #endif /*_DOM_SID_H_*/