s4:dsdb/schema: add dsdb_syntax_DATA_BLOB_validate_ldb()
[Samba/bjacke.git] / libcli / security / dom_sid.h
blobe89253554e81251faf60616cd56dea2427f3b9fd
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 #include "librpc/gen_ndr/security.h"
28 int dom_sid_compare(const struct dom_sid *sid1, const struct dom_sid *sid2);
29 bool dom_sid_equal(const struct dom_sid *sid1, const struct dom_sid *sid2);
30 bool dom_sid_parse(const char *sidstr, struct dom_sid *ret);
31 struct dom_sid *dom_sid_parse_talloc(TALLOC_CTX *mem_ctx, const char *sidstr);
32 struct dom_sid *dom_sid_parse_length(TALLOC_CTX *mem_ctx, const DATA_BLOB *sid);
33 struct dom_sid *dom_sid_dup(TALLOC_CTX *mem_ctx, const struct dom_sid *dom_sid);
34 struct dom_sid *dom_sid_add_rid(TALLOC_CTX *mem_ctx,
35 const struct dom_sid *domain_sid,
36 uint32_t rid);
37 NTSTATUS dom_sid_split_rid(TALLOC_CTX *mem_ctx, const struct dom_sid *sid,
38 struct dom_sid **domain, uint32_t *rid);
39 bool dom_sid_in_domain(const struct dom_sid *domain_sid,
40 const struct dom_sid *sid);
41 char *dom_sid_string(TALLOC_CTX *mem_ctx, const struct dom_sid *sid);
43 #endif /*_DOM_SID_H_*/