2 Unix SMB/CIFS implementation.
3 Infrastructure for async ldap client requests
4 Copyright (C) Volker Lendecke 2009
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 3 of the License, or
9 (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program. If not, see <http://www.gnu.org/licenses/>.
20 #ifndef __TLDAP_UTIL_H__
21 #define __TLDAP_UTIL_H__
25 bool tldap_entry_values(struct tldap_message
*msg
, const char *attribute
,
26 int *num_values
, DATA_BLOB
**values
);
27 bool tldap_get_single_valueblob(struct tldap_message
*msg
,
28 const char *attribute
, DATA_BLOB
*blob
);
29 char *tldap_talloc_single_attribute(struct tldap_message
*msg
,
30 const char *attribute
,
32 bool tldap_pull_binsid(struct tldap_message
*msg
, const char *attribute
,
34 bool tldap_add_mod_blobs(TALLOC_CTX
*mem_ctx
, struct tldap_mod
**pmods
,
35 int mod_op
, const char *attrib
,
36 int num_values
, DATA_BLOB
*values
);
37 bool tldap_make_mod_blob(struct tldap_message
*existing
, TALLOC_CTX
*mem_ctx
,
38 int *pnum_mods
, struct tldap_mod
**pmods
,
39 const char *attrib
, DATA_BLOB newval
);
40 bool tldap_make_mod_fmt(struct tldap_message
*existing
, TALLOC_CTX
*mem_ctx
,
41 int *pnum_mods
, struct tldap_mod
**pmods
,
42 const char *attrib
, const char *fmt
, ...);
44 const char *tldap_errstr(TALLOC_CTX
*mem_ctx
, struct tldap_context
*ld
,
46 int tldap_search_fmt(struct tldap_context
*ld
, const char *base
, int scope
,
47 const char *attrs
[], int num_attrs
, int attrsonly
,
48 TALLOC_CTX
*mem_ctx
, struct tldap_message
***res
,
49 const char *fmt
, ...);
50 bool tldap_pull_uint64(struct tldap_message
*msg
, const char *attr
,