source: vendor/3.5.0/source3/include/tldap_util.h

Last change on this file was 414, checked in by Herwig Bauernfeind, 15 years ago

Samba 3.5.0: Initial import

File size: 4.0 KB
Line 
1/*
2 Unix SMB/CIFS implementation.
3 Infrastructure for async ldap client requests
4 Copyright (C) Volker Lendecke 2009
5
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.
10
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.
15
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/>.
18*/
19
20#ifndef __TLDAP_UTIL_H__
21#define __TLDAP_UTIL_H__
22
23#include "includes.h"
24
25bool tldap_entry_values(struct tldap_message *msg, const char *attribute,
26 int *num_values, DATA_BLOB **values);
27bool tldap_get_single_valueblob(struct tldap_message *msg,
28 const char *attribute, DATA_BLOB *blob);
29char *tldap_talloc_single_attribute(struct tldap_message *msg,
30 const char *attribute,
31 TALLOC_CTX *mem_ctx);
32bool tldap_pull_binsid(struct tldap_message *msg, const char *attribute,
33 struct dom_sid *sid);
34bool tldap_pull_guid(struct tldap_message *msg, const char *attribute,
35 struct GUID *guid);
36bool tldap_add_mod_blobs(TALLOC_CTX *mem_ctx, struct tldap_mod **pmods,
37 int mod_op, const char *attrib,
38 int num_values, DATA_BLOB *values);
39bool tldap_add_mod_str(TALLOC_CTX *mem_ctx, struct tldap_mod **pmods,
40 int mod_op, const char *attrib, const char *str);
41bool tldap_make_mod_blob(struct tldap_message *existing, TALLOC_CTX *mem_ctx,
42 int *pnum_mods, struct tldap_mod **pmods,
43 const char *attrib, DATA_BLOB newval);
44bool tldap_make_mod_fmt(struct tldap_message *existing, TALLOC_CTX *mem_ctx,
45 int *pnum_mods, struct tldap_mod **pmods,
46 const char *attrib, const char *fmt, ...);
47
48const char *tldap_errstr(TALLOC_CTX *mem_ctx, struct tldap_context *ld,
49 int rc);
50int tldap_search_va(struct tldap_context *ld, const char *base, int scope,
51 const char *attrs[], int num_attrs, int attrsonly,
52 TALLOC_CTX *mem_ctx, struct tldap_message ***res,
53 const char *fmt, va_list ap);
54int tldap_search_fmt(struct tldap_context *ld, const char *base, int scope,
55 const char *attrs[], int num_attrs, int attrsonly,
56 TALLOC_CTX *mem_ctx, struct tldap_message ***res,
57 const char *fmt, ...);
58bool tldap_pull_uint64(struct tldap_message *msg, const char *attr,
59 uint64_t *presult);
60bool tldap_pull_uint32(struct tldap_message *msg, const char *attr,
61 uint32_t *presult);
62
63struct tevent_req *tldap_fetch_rootdse_send(TALLOC_CTX *mem_ctx,
64 struct tevent_context *ev,
65 struct tldap_context *ld);
66int tldap_fetch_rootdse_recv(struct tevent_req *req);
67int tldap_fetch_rootdse(struct tldap_context *ld);
68struct tldap_message *tldap_rootdse(struct tldap_context *ld);
69
70bool tldap_entry_has_attrvalue(struct tldap_message *msg,
71 const char *attribute,
72 const DATA_BLOB blob);
73bool tldap_supports_control(struct tldap_context *ld, const char *oid);
74
75struct tldap_control *tldap_add_control(TALLOC_CTX *mem_ctx,
76 struct tldap_control *ctrls,
77 int num_ctrls,
78 struct tldap_control *ctrl);
79struct tldap_control *tldap_msg_findcontrol(struct tldap_message *msg,
80 const char *oid);
81
82struct tevent_req *tldap_search_paged_send(TALLOC_CTX *mem_ctx,
83 struct tevent_context *ev,
84 struct tldap_context *ld,
85 const char *base, int scope,
86 const char *filter,
87 const char **attrs,
88 int num_attrs,
89 int attrsonly,
90 struct tldap_control *sctrls,
91 int num_sctrls,
92 struct tldap_control *cctrls,
93 int num_cctrls,
94 int timelimit,
95 int sizelimit,
96 int deref,
97 int page_size);
98int tldap_search_paged_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
99 struct tldap_message **pmsg);
100
101
102#endif
Note: See TracBrowser for help on using the repository browser.