2 * Unix SMB/CIFS implementation.
3 * Group Mapping Database
5 * Copyright (C) Andrew Tridgell 1992-2006
6 * Copyright (C) Jean François Micouleau 1998-2001
7 * Copyright (C) Gerald Carter 2006
8 * Copyright (C) Volker Lendecke 2006
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 3 of the License, or
13 * (at your option) any later version.
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, see <http://www.gnu.org/licenses/>.
24 #ifndef _GROUPDB_PROTO_H_
25 #define _GROUPDB_PROTO_H_
27 /* The following definitions come from groupdb/mapping.c */
29 NTSTATUS
add_initial_entry(gid_t gid
, const char *sid
, enum lsa_SidType sid_name_use
, const char *nt_name
, const char *comment
);
30 bool get_domain_group_from_sid(struct dom_sid sid
, GROUP_MAP
*map
);
31 int smb_create_group(const char *unix_group
, gid_t
*new_gid
);
32 int smb_delete_group(const char *unix_group
);
33 int smb_set_primary_group(const char *unix_group
, const char* unix_user
);
34 int smb_add_user_group(const char *unix_group
, const char *unix_user
);
35 int smb_delete_user_group(const char *unix_group
, const char *unix_user
);
36 NTSTATUS
pdb_default_getgrsid(struct pdb_methods
*methods
, GROUP_MAP
*map
,
38 NTSTATUS
pdb_default_getgrgid(struct pdb_methods
*methods
, GROUP_MAP
*map
,
40 NTSTATUS
pdb_default_getgrnam(struct pdb_methods
*methods
, GROUP_MAP
*map
,
42 NTSTATUS
pdb_default_add_group_mapping_entry(struct pdb_methods
*methods
,
44 NTSTATUS
pdb_default_update_group_mapping_entry(struct pdb_methods
*methods
,
46 NTSTATUS
pdb_default_delete_group_mapping_entry(struct pdb_methods
*methods
,
48 NTSTATUS
pdb_default_enum_group_mapping(struct pdb_methods
*methods
,
49 const struct dom_sid
*sid
, enum lsa_SidType sid_name_use
,
50 GROUP_MAP
**pp_rmap
, size_t *p_num_entries
,
52 NTSTATUS
pdb_default_create_alias(struct pdb_methods
*methods
,
53 const char *name
, uint32
*rid
);
54 NTSTATUS
pdb_default_delete_alias(struct pdb_methods
*methods
,
55 const struct dom_sid
*sid
);
57 NTSTATUS
pdb_default_get_aliasinfo(struct pdb_methods
*methods
,
58 const struct dom_sid
*sid
,
59 struct acct_info
*info
);
60 NTSTATUS
pdb_default_set_aliasinfo(struct pdb_methods
*methods
,
61 const struct dom_sid
*sid
,
62 struct acct_info
*info
);
63 NTSTATUS
pdb_default_add_aliasmem(struct pdb_methods
*methods
,
64 const struct dom_sid
*alias
, const struct dom_sid
*member
);
65 NTSTATUS
pdb_default_del_aliasmem(struct pdb_methods
*methods
,
66 const struct dom_sid
*alias
, const struct dom_sid
*member
);
67 NTSTATUS
pdb_default_enum_aliasmem(struct pdb_methods
*methods
,
68 const struct dom_sid
*alias
, TALLOC_CTX
*mem_ctx
,
69 struct dom_sid
**pp_members
,
70 size_t *p_num_members
);
71 NTSTATUS
pdb_default_alias_memberships(struct pdb_methods
*methods
,
73 const struct dom_sid
*domain_sid
,
74 const struct dom_sid
*members
,
76 uint32
**pp_alias_rids
,
77 size_t *p_num_alias_rids
);
78 NTSTATUS
pdb_nop_getgrsid(struct pdb_methods
*methods
, GROUP_MAP
*map
,
80 NTSTATUS
pdb_nop_getgrgid(struct pdb_methods
*methods
, GROUP_MAP
*map
,
82 NTSTATUS
pdb_nop_getgrnam(struct pdb_methods
*methods
, GROUP_MAP
*map
,
84 NTSTATUS
pdb_nop_add_group_mapping_entry(struct pdb_methods
*methods
,
86 NTSTATUS
pdb_nop_update_group_mapping_entry(struct pdb_methods
*methods
,
88 NTSTATUS
pdb_nop_delete_group_mapping_entry(struct pdb_methods
*methods
,
90 NTSTATUS
pdb_nop_enum_group_mapping(struct pdb_methods
*methods
,
91 enum lsa_SidType sid_name_use
,
92 GROUP_MAP
**rmap
, size_t *num_entries
,
94 bool pdb_get_dom_grp_info(const struct dom_sid
*sid
, struct acct_info
*info
);
95 bool pdb_set_dom_grp_info(const struct dom_sid
*sid
, const struct acct_info
*info
);
96 NTSTATUS
pdb_create_builtin_alias(uint32 rid
);
98 /* The following definitions come from groupdb/mapping_tdb.c */
100 const struct mapping_backend
*groupdb_tdb_init(void);
102 #endif /* _GROUPDB_PROTO_H_ */