r9602: Add support for reading share_info.tdb and smb.conf.
[sfrench/samba-autobuild/.git] / source / lib / samba3 / ldb_samba3.c
1 /* 
2    ldb database library - Samba3 compatibility backend
3
4    Copyright (C) Jelmer Vernooij 2005
5
6      ** NOTE! The following LGPL license applies to the ldb
7      ** library. This does NOT imply that all of Samba is released
8      ** under the LGPL
9    
10    This library is free software; you can redistribute it and/or
11    modify it under the terms of the GNU Lesser General Public
12    License as published by the Free Software Foundation; either
13    version 2 of the License, or (at your option) any later version.
14
15    This library 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 GNU
18    Lesser General Public License for more details.
19
20    You should have received a copy of the GNU Lesser General Public
21    License along with this library; if not, write to the Free Software
22    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
23 */
24
25 #include "includes.h"
26 #include "ldb/ldb_map/ldb_map.h"
27 #include "ldb/include/ldb.h"
28 #include "ldb/include/ldb_private.h"
29
30 /* 
31  * sambaGroupMapping -> group
32  *      gidNumber -> ???
33  *      sambaSID -> member
34  *      sambaGroupType -> groupType
35  *      displayName -> name
36  *      description -> description
37  *      sambaSIDList -> member (special!)
38  */
39
40 /*
41  * sambaTrustPassword
42  */
43
44 /* sambaDomain
45  *      sambaDomainName
46  *      sambaSID
47  *      sambaNextRid 
48  *      sambaNextGroupRid 
49  *      sambaNextUserRid
50  *      sambaAlgorithmicRidBase
51  */
52
53 /* sambaUnixIdPool
54  */
55
56 /* sambaIdmapEntry */
57
58 /* sambaAccountPolicy */
59
60 /* sambaSidEntry: FIXME */
61
62 /* sambaSamAccount -> user:
63  * uid -> unixName (magic!)
64  * sambaSID -> objectSid
65  * cn -> cn
66  * sambaLMPassword -> lmPwdHash
67  * sambaNTPassword -> ntPwdHash
68  * sambaPwdLastSet -> pwdLastSet
69  * sambaLogonTime -> lastLogon
70  * sambaLogoffTime -> lastLogoff
71  * sambaKickoffTime -> ???
72  * sambaPwdCanChange  -> ???
73  * sambaPwdMustChange  -> ???
74  * sambaAcctFlags -> systemFlags ?
75  * displayName  -> name
76  * sambaHomePath  -> ???
77  * sambaHomeDrive  -> ???
78  * sambaLogonScript  -> ???
79  * sambaProfilePath  -> ???
80  * description -> description
81  * sambaUserWorkstations  -> ???
82  * sambaPrimaryGroupSID -> primaryGroupID
83  * sambaDomainName  -> ???
84  * sambaMungedDial -> ???
85  * sambaBadPasswordCount -> badPwdcount
86  * sambaBadPasswordTime -> badPasswordtime
87  * sambaPasswordHistory  -> ntPwdHistory
88  * sambaLogonHours -> ???
89  */
90
91 /* Not necessary:
92  * sambaConfig
93  * sambaShare
94  * sambaConfigOption 
95  */
96
97
98 struct ldb_map_mappings samba3_mappings;
99
100 /* the init function */
101 #ifdef HAVE_DLOPEN_DISABLED
102  struct ldb_module *init_module(struct ldb_context *ldb, const char *options[])
103 #else
104 struct ldb_module *ldb_samba3_module_init(struct ldb_context *ldb, const char *options[])
105 #endif
106 {
107         return ldb_map_init(ldb, &samba3_mappings, options);
108 }