2 * Unix SMB/CIFS implementation.
3 * RPC Pipe client / server routines
4 * Copyright (C) Andrew Tridgell 1992-2006,
5 * Copyright (C) Jean François Micouleau 1998-2001.
6 * Copyright (C) Volker Lendecke 2006.
7 * Copyright (C) Gerald Carter 2006.
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 3 of the License, or
12 * (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, see <http://www.gnu.org/licenses/>.
24 #include "system/filesys.h"
26 #include "groupdb/mapping.h"
27 #include "dbwrap/dbwrap.h"
28 #include "dbwrap/dbwrap_open.h"
30 #include "../libcli/security/security.h"
31 #include "groupdb/mapping_tdb.h"
33 static struct db_context
*db
; /* used for driver files */
35 static bool enum_group_mapping(const struct dom_sid
*domsid
,
36 enum lsa_SidType sid_name_use
,
38 size_t *p_num_entries
,
40 static bool group_map_remove(const struct dom_sid
*sid
);
42 static bool mapping_switch(const char *ldb_path
);
44 /****************************************************************************
45 Open the group mapping tdb.
46 ****************************************************************************/
47 static bool init_group_mapping(void)
55 db
= db_open(NULL
, state_path("group_mapping.tdb"), 0,
56 TDB_DEFAULT
, O_RDWR
|O_CREAT
, 0600,
57 DBWRAP_LOCK_ORDER_1
, DBWRAP_FLAG_NONE
);
59 DEBUG(0, ("Failed to open group mapping database: %s\n",
64 ldb_path
= state_path("group_mapping.ldb");
65 if (file_exist(ldb_path
) && !mapping_switch(ldb_path
)) {
66 unlink(state_path("group_mapping.tdb"));
70 /* handle upgrade from old versions of the database */
71 #if 0 /* -- Needs conversion to dbwrap -- */
72 const char *vstring
= "INFO/version";
74 GROUP_MAP
*map_table
= NULL
;
75 size_t num_entries
= 0;
77 /* handle a Samba upgrade */
78 tdb_lock_bystring(tdb
, vstring
);
80 /* Cope with byte-reversed older versions of the db. */
81 vers_id
= tdb_fetch_int32(tdb
, vstring
);
82 if ((vers_id
== DATABASE_VERSION_V1
)
83 || (IREV(vers_id
) == DATABASE_VERSION_V1
)) {
85 * Written on a bigendian machine with old fetch_int
88 tdb_store_int32(tdb
, vstring
, DATABASE_VERSION_V2
);
89 vers_id
= DATABASE_VERSION_V2
;
92 /* if its an unknown version we remove everthing in the db */
94 if (vers_id
!= DATABASE_VERSION_V2
) {
96 tdb_store_int32(tdb
, vstring
, DATABASE_VERSION_V2
);
99 tdb_unlock_bystring(tdb
, vstring
);
101 /* cleanup any map entries with a gid == -1 */
103 if ( enum_group_mapping( NULL
, SID_NAME_UNKNOWN
, &map_table
,
104 &num_entries
, False
) ) {
107 for ( i
=0; i
<num_entries
; i
++ ) {
108 if ( map_table
[i
].gid
== -1 ) {
109 group_map_remove( &map_table
[i
].sid
);
113 SAFE_FREE( map_table
);
120 static char *group_mapping_key(TALLOC_CTX
*mem_ctx
, const struct dom_sid
*sid
)
122 char sidstr
[DOM_SID_STR_BUFLEN
];
125 len
= dom_sid_string_buf(sid
, sidstr
, sizeof(sidstr
));
126 if (len
>= sizeof(sidstr
)) {
130 return talloc_asprintf(mem_ctx
, "%s%s", GROUP_PREFIX
, sidstr
);
133 /****************************************************************************
134 ****************************************************************************/
135 static bool add_mapping_entry(GROUP_MAP
*map
, int flag
)
141 key
= group_mapping_key(talloc_tos(), &map
->sid
);
146 len
= tdb_pack(NULL
, 0, "ddff",
147 map
->gid
, map
->sid_name_use
, map
->nt_name
, map
->comment
);
149 buf
= talloc_array(key
, char, len
);
154 len
= tdb_pack((uint8
*)buf
, len
, "ddff", map
->gid
,
155 map
->sid_name_use
, map
->nt_name
, map
->comment
);
157 status
= dbwrap_trans_store(
158 db
, string_term_tdb_data(key
),
159 make_tdb_data((uint8_t *)buf
, len
), TDB_REPLACE
);
163 return NT_STATUS_IS_OK(status
);
167 /****************************************************************************
168 Return the sid and the type of the unix group.
169 ****************************************************************************/
171 static bool get_group_map_from_sid(struct dom_sid sid
, GROUP_MAP
*map
)
180 /* the key is the SID, retrieving is direct */
182 key
= group_mapping_key(talloc_tos(), &sid
);
187 status
= dbwrap_fetch_bystring(db
, key
, key
, &dbuf
);
188 if (!NT_STATUS_IS_OK(status
)) {
193 ret
= tdb_unpack(dbuf
.dptr
, dbuf
.dsize
, "ddff",
194 &map
->gid
, &map
->sid_name_use
,
200 DEBUG(3,("get_group_map_from_sid: tdb_unpack failure\n"));
204 sid_copy(&map
->sid
, &sid
);
206 map
->nt_name
= talloc_strdup(map
, nt_name
);
210 map
->comment
= talloc_strdup(map
, comment
);
218 static bool dbrec2map(const struct db_record
*rec
, GROUP_MAP
*map
)
220 TDB_DATA key
= dbwrap_record_get_key(rec
);
221 TDB_DATA value
= dbwrap_record_get_value(rec
);
226 if ((key
.dsize
< strlen(GROUP_PREFIX
))
227 || (strncmp((char *)key
.dptr
, GROUP_PREFIX
,
228 GROUP_PREFIX_LEN
) != 0)) {
232 if (!string_to_sid(&map
->sid
, (const char *)key
.dptr
233 + GROUP_PREFIX_LEN
)) {
237 ret
= tdb_unpack(value
.dptr
, value
.dsize
, "ddff",
238 &map
->gid
, &map
->sid_name_use
,
242 DEBUG(3, ("dbrec2map: tdb_unpack failure\n"));
246 map
->nt_name
= talloc_strdup(map
, nt_name
);
250 map
->comment
= talloc_strdup(map
, comment
);
258 struct find_map_state
{
260 const char *name
; /* If != NULL, look for name */
261 gid_t gid
; /* valid iff name == NULL */
265 static int find_map(struct db_record
*rec
, void *private_data
)
267 struct find_map_state
*state
= (struct find_map_state
*)private_data
;
269 if (!dbrec2map(rec
, state
->map
)) {
270 DEBUG(10, ("failed to unpack map\n"));
274 if (state
->name
!= NULL
) {
275 if (strequal(state
->name
, state
->map
->nt_name
)) {
281 if (state
->map
->gid
== state
->gid
) {
290 /****************************************************************************
291 Return the sid and the type of the unix group.
292 ****************************************************************************/
294 static bool get_group_map_from_gid(gid_t gid
, GROUP_MAP
*map
)
296 struct find_map_state state
;
299 state
.name
= NULL
; /* Indicate we're looking for gid */
303 dbwrap_traverse_read(db
, find_map
, (void *)&state
, NULL
);
308 /****************************************************************************
309 Return the sid and the type of the unix group.
310 ****************************************************************************/
312 static bool get_group_map_from_ntname(const char *name
, GROUP_MAP
*map
)
314 struct find_map_state state
;
320 dbwrap_traverse_read(db
, find_map
, (void *)&state
, NULL
);
325 /****************************************************************************
326 Remove a group mapping entry.
327 ****************************************************************************/
329 static bool group_map_remove(const struct dom_sid
*sid
)
334 key
= group_mapping_key(talloc_tos(), sid
);
339 status
= dbwrap_trans_delete(db
, string_term_tdb_data(key
));
342 return NT_STATUS_IS_OK(status
);
345 /****************************************************************************
346 Enumerate the group mapping.
347 ****************************************************************************/
349 struct enum_map_state
{
350 const struct dom_sid
*domsid
;
351 enum lsa_SidType sid_name_use
;
358 static int collect_map(struct db_record
*rec
, void *private_data
)
360 struct enum_map_state
*state
= (struct enum_map_state
*)private_data
;
364 map
= talloc_zero(NULL
, GROUP_MAP
);
366 DEBUG(0, ("Unable to allocate group map!\n"));
370 if (!dbrec2map(rec
, map
)) {
374 /* list only the type or everything if UNKNOWN */
375 if (state
->sid_name_use
!= SID_NAME_UNKNOWN
376 && state
->sid_name_use
!= map
->sid_name_use
) {
377 DEBUG(11,("enum_group_mapping: group %s is not of the "
378 "requested type\n", map
->nt_name
));
383 if ((state
->unix_only
== ENUM_ONLY_MAPPED
) && (map
->gid
== -1)) {
384 DEBUG(11,("enum_group_mapping: group %s is non mapped\n",
390 if ((state
->domsid
!= NULL
) &&
391 (dom_sid_compare_domain(state
->domsid
, &map
->sid
) != 0)) {
392 DEBUG(11,("enum_group_mapping: group %s is not in domain\n",
393 sid_string_dbg(&map
->sid
)));
398 tmp
= talloc_realloc(NULL
, state
->maps
, GROUP_MAP
*,
399 state
->num_maps
+ 1);
401 DEBUG(0,("enum_group_mapping: Unable to enlarge group "
408 state
->maps
[state
->num_maps
] = talloc_move(state
->maps
, &map
);
413 static bool enum_group_mapping(const struct dom_sid
*domsid
,
414 enum lsa_SidType sid_name_use
,
415 GROUP_MAP
***pp_rmap
,
416 size_t *p_num_entries
, bool unix_only
)
418 struct enum_map_state state
;
421 state
.domsid
= domsid
;
422 state
.sid_name_use
= sid_name_use
;
423 state
.unix_only
= unix_only
;
427 status
= dbwrap_traverse_read(db
, collect_map
, (void *)&state
, NULL
);
428 if (!NT_STATUS_IS_OK(status
)) {
429 TALLOC_FREE(state
.maps
);
433 *pp_rmap
= state
.maps
;
434 *p_num_entries
= state
.num_maps
;
439 /* This operation happens on session setup, so it should better be fast. We
440 * store a list of aliases a SID is member of hanging off MEMBEROF/SID. */
442 static NTSTATUS
one_alias_membership(const struct dom_sid
*member
,
443 struct dom_sid
**sids
, size_t *num
)
450 NTSTATUS status
= NT_STATUS_OK
;
451 TALLOC_CTX
*frame
= talloc_stackframe();
453 slprintf(key
, sizeof(key
), "%s%s", MEMBEROF_PREFIX
,
454 sid_to_fstring(tmp
, member
));
456 status
= dbwrap_fetch_bystring(db
, frame
, key
, &dbuf
);
457 if (!NT_STATUS_IS_OK(status
)) {
462 p
= (const char *)dbuf
.dptr
;
464 while (next_token_talloc(frame
, &p
, &string_sid
, " ")) {
465 struct dom_sid alias
;
468 if (!string_to_sid(&alias
, string_sid
))
472 status
= add_sid_to_array_unique(NULL
, &alias
, sids
, &num_sids
);
473 if (!NT_STATUS_IS_OK(status
)) {
484 static NTSTATUS
alias_memberships(const struct dom_sid
*members
, size_t num_members
,
485 struct dom_sid
**sids
, size_t *num
)
492 for (i
=0; i
<num_members
; i
++) {
493 NTSTATUS status
= one_alias_membership(&members
[i
], sids
, num
);
494 if (!NT_STATUS_IS_OK(status
))
500 static bool is_aliasmem(const struct dom_sid
*alias
, const struct dom_sid
*member
)
502 struct dom_sid
*sids
;
506 /* This feels the wrong way round, but the on-disk data structure
507 * dictates it this way. */
508 if (!NT_STATUS_IS_OK(alias_memberships(member
, 1, &sids
, &num
)))
511 for (i
=0; i
<num
; i
++) {
512 if (dom_sid_compare(alias
, &sids
[i
]) == 0) {
522 static NTSTATUS
add_aliasmem(const struct dom_sid
*alias
, const struct dom_sid
*member
)
527 char *new_memberstring
;
528 struct db_record
*rec
;
532 map
= talloc_zero(talloc_tos(), GROUP_MAP
);
534 return NT_STATUS_NO_MEMORY
;
537 if (!get_group_map_from_sid(*alias
, map
)) {
539 return NT_STATUS_NO_SUCH_ALIAS
;
542 if ((map
->sid_name_use
!= SID_NAME_ALIAS
) &&
543 (map
->sid_name_use
!= SID_NAME_WKN_GRP
)) {
545 return NT_STATUS_NO_SUCH_ALIAS
;
550 if (is_aliasmem(alias
, member
))
551 return NT_STATUS_MEMBER_IN_ALIAS
;
553 sid_to_fstring(string_sid
, member
);
555 key
= talloc_asprintf(talloc_tos(), "%s%s", MEMBEROF_PREFIX
,
558 return NT_STATUS_NO_MEMORY
;
561 if (dbwrap_transaction_start(db
) != 0) {
562 DEBUG(0, ("transaction_start failed\n"));
563 return NT_STATUS_INTERNAL_DB_CORRUPTION
;
566 rec
= dbwrap_fetch_locked(db
, key
, string_term_tdb_data(key
));
569 DEBUG(10, ("fetch_lock failed\n"));
571 status
= NT_STATUS_INTERNAL_DB_CORRUPTION
;
575 value
= dbwrap_record_get_value(rec
);
577 sid_to_fstring(string_sid
, alias
);
579 if (value
.dptr
!= NULL
) {
580 new_memberstring
= talloc_asprintf(
581 key
, "%s %s", (char *)(value
.dptr
), string_sid
);
583 new_memberstring
= talloc_strdup(key
, string_sid
);
586 if (new_memberstring
== NULL
) {
588 status
= NT_STATUS_NO_MEMORY
;
592 status
= dbwrap_record_store(rec
, string_term_tdb_data(new_memberstring
), 0);
596 if (!NT_STATUS_IS_OK(status
)) {
597 DEBUG(10, ("Could not store record: %s\n", nt_errstr(status
)));
601 if (dbwrap_transaction_commit(db
) != 0) {
602 DEBUG(0, ("transaction_commit failed\n"));
603 status
= NT_STATUS_INTERNAL_DB_CORRUPTION
;
610 if (dbwrap_transaction_cancel(db
) != 0) {
611 smb_panic("transaction_cancel failed");
617 struct aliasmem_state
{
619 const struct dom_sid
*alias
;
620 struct dom_sid
**sids
;
624 static int collect_aliasmem(struct db_record
*rec
, void *priv
)
626 struct aliasmem_state
*state
= (struct aliasmem_state
*)priv
;
630 TDB_DATA key
= dbwrap_record_get_key(rec
);
631 TDB_DATA value
= dbwrap_record_get_value(rec
);
633 if (strncmp((const char *)key
.dptr
, MEMBEROF_PREFIX
,
634 MEMBEROF_PREFIX_LEN
) != 0)
637 p
= (const char *)value
.dptr
;
639 frame
= talloc_stackframe();
641 while (next_token_talloc(frame
, &p
, &alias_string
, " ")) {
642 struct dom_sid alias
, member
;
643 const char *member_string
;
646 if (!string_to_sid(&alias
, alias_string
))
649 if (dom_sid_compare(state
->alias
, &alias
) != 0)
652 /* Ok, we found the alias we're looking for in the membership
653 * list currently scanned. The key represents the alias
654 * member. Add that. */
656 member_string
= strchr((const char *)key
.dptr
, '/');
658 /* Above we tested for MEMBEROF_PREFIX which includes the
661 SMB_ASSERT(member_string
!= NULL
);
664 if (!string_to_sid(&member
, member_string
))
667 num_sids
= *state
->num
;
668 if (!NT_STATUS_IS_OK(add_sid_to_array(state
->mem_ctx
, &member
,
675 *state
->num
= num_sids
;
682 static NTSTATUS
enum_aliasmem(const struct dom_sid
*alias
, TALLOC_CTX
*mem_ctx
,
683 struct dom_sid
**sids
, size_t *num
)
686 struct aliasmem_state state
;
688 map
= talloc_zero(talloc_tos(), GROUP_MAP
);
690 return NT_STATUS_NO_MEMORY
;
693 if (!get_group_map_from_sid(*alias
, map
)) {
695 return NT_STATUS_NO_SUCH_ALIAS
;
698 if ((map
->sid_name_use
!= SID_NAME_ALIAS
) &&
699 (map
->sid_name_use
!= SID_NAME_WKN_GRP
)) {
701 return NT_STATUS_NO_SUCH_ALIAS
;
712 state
.mem_ctx
= mem_ctx
;
714 dbwrap_traverse_read(db
, collect_aliasmem
, &state
, NULL
);
718 static NTSTATUS
del_aliasmem(const struct dom_sid
*alias
, const struct dom_sid
*member
)
721 struct dom_sid
*sids
;
728 if (dbwrap_transaction_start(db
) != 0) {
729 DEBUG(0, ("transaction_start failed\n"));
730 return NT_STATUS_INTERNAL_DB_CORRUPTION
;
733 status
= alias_memberships(member
, 1, &sids
, &num
);
735 if (!NT_STATUS_IS_OK(status
)) {
739 for (i
=0; i
<num
; i
++) {
740 if (dom_sid_compare(&sids
[i
], alias
) == 0) {
748 status
= NT_STATUS_MEMBER_NOT_IN_ALIAS
;
753 sids
[i
] = sids
[num
-1];
757 sid_to_fstring(sid_string
, member
);
759 key
= talloc_asprintf(sids
, "%s%s", MEMBEROF_PREFIX
, sid_string
);
762 status
= NT_STATUS_NO_MEMORY
;
767 status
= dbwrap_delete_bystring(db
, key
);
771 member_string
= talloc_strdup(sids
, "");
772 if (member_string
== NULL
) {
774 status
= NT_STATUS_NO_MEMORY
;
778 for (i
=0; i
<num
; i
++) {
780 sid_to_fstring(sid_string
, &sids
[i
]);
782 member_string
= talloc_asprintf_append_buffer(
783 member_string
, " %s", sid_string
);
785 if (member_string
== NULL
) {
787 status
= NT_STATUS_NO_MEMORY
;
792 status
= dbwrap_store_bystring(
793 db
, key
, string_term_tdb_data(member_string
), 0);
797 if (!NT_STATUS_IS_OK(status
)) {
798 DEBUG(10, ("dbwrap_store_bystring failed: %s\n",
803 if (dbwrap_transaction_commit(db
) != 0) {
804 DEBUG(0, ("transaction_commit failed\n"));
805 status
= NT_STATUS_INTERNAL_DB_CORRUPTION
;
812 if (dbwrap_transaction_cancel(db
) != 0) {
813 smb_panic("transaction_cancel failed");
819 /* -- ldb->tdb switching code -------------------------------------------- */
821 /* change this if the data format ever changes */
822 #define LTDB_PACKING_FORMAT 0x26011967
824 /* old packing formats (not supported for now,
825 * it was never used for group mapping AFAIK) */
826 #define LTDB_PACKING_FORMAT_NODN 0x26011966
828 static unsigned int pull_uint32(uint8_t *p
, int ofs
)
831 return p
[0] | (p
[1]<<8) | (p
[2]<<16) | (p
[3]<<24);
835 unpack a ldb message from a linear buffer in TDB_DATA
837 static int convert_ldb_record(TDB_CONTEXT
*ltdb
, TDB_DATA key
,
838 TDB_DATA data
, void *ptr
)
840 TALLOC_CTX
*tmp_ctx
= talloc_tos();
841 GROUP_MAP
*map
= NULL
;
845 unsigned int remaining
;
851 uint32_t num_mem
= 0;
852 struct dom_sid
*members
= NULL
;
854 p
= (uint8_t *)data
.dptr
;
855 if (data
.dsize
< 8) {
860 format
= pull_uint32(p
, 0);
861 num_el
= pull_uint32(p
, 4);
864 remaining
= data
.dsize
- 8;
867 case LTDB_PACKING_FORMAT
:
868 len
= strnlen((char *)p
, remaining
);
869 if (len
== remaining
) {
875 /* ignore special LDB attributes */
879 if (strncmp((char *)p
, "rid=", 4)) {
880 /* unknown entry, ignore */
881 DEBUG(3, ("Found unknown entry in group mapping "
882 "database named [%s]\n", (char *)p
));
886 remaining
-= len
+ 1;
890 case LTDB_PACKING_FORMAT_NODN
:
897 /* bad entry, ignore */
901 if (num_el
> remaining
/ 6) {
906 map
= talloc_zero(NULL
, GROUP_MAP
);
912 for (i
= 0; i
< num_el
; i
++) {
915 if (remaining
< 10) {
919 len
= strnlen((char *)p
, remaining
- 6);
920 if (len
== remaining
- 6) {
924 name
= talloc_strndup(tmp_ctx
, (char *)p
, len
);
929 remaining
-= len
+ 1;
932 num_vals
= pull_uint32(p
, 0);
933 if (strcasecmp_m(name
, "member") == 0) {
935 members
= talloc_array(tmp_ctx
, struct dom_sid
, num_mem
);
936 if (members
== NULL
) {
940 } else if (num_vals
!= 1) {
948 for (j
= 0; j
< num_vals
; j
++) {
949 len
= pull_uint32(p
, 0);
950 if (len
> remaining
-5) {
955 val
= talloc_strndup(tmp_ctx
, (char *)(p
+ 4), len
);
961 remaining
-= len
+4+1;
964 /* we ignore unknown or uninteresting attributes
965 * (objectclass, etc.) */
966 if (strcasecmp_m(name
, "gidNumber") == 0) {
967 map
->gid
= strtoul(val
, &q
, 10);
972 } else if (strcasecmp_m(name
, "sid") == 0) {
973 if (!string_to_sid(&map
->sid
, val
)) {
977 } else if (strcasecmp_m(name
, "sidNameUse") == 0) {
978 map
->sid_name_use
= strtoul(val
, &q
, 10);
983 } else if (strcasecmp_m(name
, "ntname") == 0) {
984 map
->nt_name
= talloc_strdup(map
, val
);
989 } else if (strcasecmp_m(name
, "comment") == 0) {
990 map
->comment
= talloc_strdup(map
, val
);
995 } else if (strcasecmp_m(name
, "member") == 0) {
996 if (!string_to_sid(&members
[j
], val
)) {
1008 if (map
->nt_name
== NULL
) {
1013 if (map
->comment
== NULL
) {
1014 map
->comment
= talloc_strdup(map
, "");
1016 if (map
->comment
== NULL
) {
1021 if (!add_mapping_entry(map
, 0)) {
1027 for (j
= 0; j
< num_mem
; j
++) {
1029 status
= add_aliasmem(&map
->sid
, &members
[j
]);
1030 if (!NT_STATUS_IS_OK(status
)) {
1037 if (remaining
!= 0) {
1038 DEBUG(0, ("Errror: %d bytes unread in ltdb_unpack_data\n",
1050 static bool mapping_switch(const char *ldb_path
)
1057 frame
= talloc_stackframe();
1059 ltdb
= tdb_open_log(ldb_path
, 0, TDB_DEFAULT
, O_RDONLY
, 0600);
1060 if (ltdb
== NULL
) goto failed
;
1062 /* ldb is just a very fancy tdb, read out raw data and perform
1064 ret
= tdb_traverse(ltdb
, convert_ldb_record
, NULL
);
1065 if (ret
< 0) goto failed
;
1072 /* now rename the old db out of the way */
1073 new_path
= state_path("group_mapping.ldb.replaced");
1077 if (rename(ldb_path
, new_path
) != 0) {
1078 DEBUG(0,("Failed to rename old group mapping database\n"));
1085 DEBUG(0, ("Failed to switch to tdb group mapping database\n"));
1086 if (ltdb
) tdb_close(ltdb
);
1091 static const struct mapping_backend tdb_backend
= {
1092 .add_mapping_entry
= add_mapping_entry
,
1093 .get_group_map_from_sid
= get_group_map_from_sid
,
1094 .get_group_map_from_gid
= get_group_map_from_gid
,
1095 .get_group_map_from_ntname
= get_group_map_from_ntname
,
1096 .group_map_remove
= group_map_remove
,
1097 .enum_group_mapping
= enum_group_mapping
,
1098 .one_alias_membership
= one_alias_membership
,
1099 .add_aliasmem
= add_aliasmem
,
1100 .del_aliasmem
= del_aliasmem
,
1101 .enum_aliasmem
= enum_aliasmem
1105 initialise the tdb mapping backend
1107 const struct mapping_backend
*groupdb_tdb_init(void)
1109 if (!init_group_mapping()) {
1110 DEBUG(0,("Failed to initialise tdb mapping backend\n"));
1114 return &tdb_backend
;