1 | /*
|
---|
2 | Unix SMB/CIFS implementation.
|
---|
3 | Samba utility functions
|
---|
4 |
|
---|
5 | Copyright (C) Andrew Tridgell 2010
|
---|
6 | Copyright (C) Andrew Bartlett <abartlet@samba.org> 2009
|
---|
7 |
|
---|
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.
|
---|
12 |
|
---|
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.
|
---|
17 |
|
---|
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/>.
|
---|
20 | */
|
---|
21 |
|
---|
22 | #ifndef __DSDB_COMMON_UTIL_H__
|
---|
23 | #define __DSDB_COMMON_UTIL_H__
|
---|
24 |
|
---|
25 | /*
|
---|
26 | flags for dsdb_request_add_controls(). For the module functions,
|
---|
27 | the upper 16 bits are in dsdb/samdb/ldb_modules/util.h
|
---|
28 | */
|
---|
29 | #define DSDB_SEARCH_SEARCH_ALL_PARTITIONS 0x0001
|
---|
30 | #define DSDB_SEARCH_SHOW_DELETED 0x0002
|
---|
31 | #define DSDB_SEARCH_SHOW_DN_IN_STORAGE_FORMAT 0x0004
|
---|
32 | #define DSDB_SEARCH_REVEAL_INTERNALS 0x0008
|
---|
33 | #define DSDB_SEARCH_SHOW_EXTENDED_DN 0x0010
|
---|
34 | #define DSDB_MODIFY_RELAX 0x0020
|
---|
35 | #define DSDB_MODIFY_PERMISSIVE 0x0040
|
---|
36 | #define DSDB_FLAG_AS_SYSTEM 0x0080
|
---|
37 | #define DSDB_TREE_DELETE 0x0100
|
---|
38 | #define DSDB_SEARCH_ONE_ONLY 0x0200 /* give an error unless 1 record */
|
---|
39 | #define DSDB_SEARCH_SHOW_RECYCLED 0x0400
|
---|
40 | #define DSDB_PROVISION 0x0800
|
---|
41 | #define DSDB_BYPASS_PASSWORD_HASH 0x1000
|
---|
42 | #define DSDB_SEARCH_NO_GLOBAL_CATALOG 0x2000
|
---|
43 | #define DSDB_MODIFY_PARTIAL_REPLICA 0x4000
|
---|
44 | #define DSDB_PASSWORD_BYPASS_LAST_SET 0x8000
|
---|
45 |
|
---|
46 | bool is_attr_in_list(const char * const * attrs, const char *attr);
|
---|
47 |
|
---|
48 | #define DSDB_SECRET_ATTRIBUTES_EX(sep) \
|
---|
49 | "pekList" sep \
|
---|
50 | "msDS-ExecuteScriptPassword" sep \
|
---|
51 | "currentValue" sep \
|
---|
52 | "dBCSPwd" sep \
|
---|
53 | "initialAuthIncoming" sep \
|
---|
54 | "initialAuthOutgoing" sep \
|
---|
55 | "lmPwdHistory" sep \
|
---|
56 | "ntPwdHistory" sep \
|
---|
57 | "priorValue" sep \
|
---|
58 | "supplementalCredentials" sep \
|
---|
59 | "trustAuthIncoming" sep \
|
---|
60 | "trustAuthOutgoing" sep \
|
---|
61 | "unicodePwd" sep \
|
---|
62 | "clearTextPassword"
|
---|
63 |
|
---|
64 | #define DSDB_SECRET_ATTRIBUTES_COMMA ,
|
---|
65 | #define DSDB_SECRET_ATTRIBUTES DSDB_SECRET_ATTRIBUTES_EX(DSDB_SECRET_ATTRIBUTES_COMMA)
|
---|
66 |
|
---|
67 | struct GUID;
|
---|
68 |
|
---|
69 | char *NS_GUID_string(TALLOC_CTX *mem_ctx, const struct GUID *guid);
|
---|
70 | NTSTATUS NS_GUID_from_string(const char *s, struct GUID *guid);
|
---|
71 |
|
---|
72 | #endif /* __DSDB_COMMON_UTIL_H__ */
|
---|