2 * Unix SMB/CIFS implementation.
5 * Copyright (C) Tim Potter 2000
6 * Copyright (C) Jim McDonough <jmcd@us.ibm.com> 2003
7 * Copyright (C) Simo Sorce 2003-2007
8 * Copyright (C) Jeremy Allison 2006
9 * Copyright (C) Michael Adam 2009-2010
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 3 of the License, or
14 * (at your option) any later version.
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
21 * You should have received a copy of the GNU General Public License
22 * along with this program. If not, see <http://www.gnu.org/licenses/>.
25 #ifndef _WINBINDD_IDMAP_PROTO_H_
26 #define _WINBINDD_IDMAP_PROTO_H_
28 /* The following definitions come from winbindd/idmap.c */
30 bool idmap_is_offline(void);
31 NTSTATUS
smb_register_idmap(int version
, const char *name
,
32 const struct idmap_methods
*methods
);
33 void idmap_close(void);
34 NTSTATUS
idmap_allocate_uid(struct unixid
*id
);
35 NTSTATUS
idmap_allocate_gid(struct unixid
*id
);
36 NTSTATUS
idmap_backend_unixids_to_sids(struct id_map
**maps
,
37 const char *domain_name
,
38 struct dom_sid domain_sid
);
39 struct idmap_domain
*idmap_find_domain(const char *domname
);
41 /* The following definitions come from winbindd/idmap_nss.c */
43 NTSTATUS
idmap_nss_init(TALLOC_CTX
*mem_ctx
);
45 /* The following definitions come from winbindd/idmap_passdb.c */
47 NTSTATUS
idmap_passdb_init(TALLOC_CTX
*mem_ctx
);
49 /* The following definitions come from winbindd/idmap_tdb.c */
51 NTSTATUS
idmap_tdb_init(TALLOC_CTX
*mem_ctx
);
53 /* The following definitions come from winbindd/idmap_util.c */
55 bool idmap_unix_id_is_in_range(uint32_t id
, struct idmap_domain
*dom
);
56 struct id_map
*idmap_find_map_by_id(struct id_map
**maps
, enum id_type type
,
58 struct id_map
*idmap_find_map_by_sid(struct id_map
**maps
, struct dom_sid
*sid
);
59 char *idmap_fetch_secret(const char *backend
, const char *domain
,
60 const char *identity
);
62 struct id_map
**id_map_ptrs_init(TALLOC_CTX
*mem_ctx
, size_t num_ids
);
64 /* max number of ids requested per LDAP batch query */
65 #define IDMAP_LDAP_MAX_IDS 30
67 NTSTATUS
idmap_ad_nss_init(TALLOC_CTX
*mem_ctx
);
69 #endif /* _WINBINDD_IDMAP_PROTO_H_ */