s3-passdb: Add minimal stub for IPA passdb backend
[samba.git] / source3 / passdb / pdb_ipa.c
1 /*
2    Unix SMB/CIFS implementation.
3    IPA helper functions for SAMBA
4    Copyright (C) Sumit Bose <sbose@redhat.com> 2010
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
21 #include "includes.h"
22
23 #include "smbldap.h"
24
25 static NTSTATUS pdb_init_IPA_ldapsam(struct pdb_methods **pdb_method, const char *location)
26 {
27         struct ldapsam_privates *ldap_state;
28
29         NTSTATUS nt_status = pdb_init_ldapsam(pdb_method, location);
30
31         (*pdb_method)->name = "IPA_ldapsam";
32
33         ldap_state = (struct ldapsam_privates *)((*pdb_method)->private_data);
34         ldap_state->is_ipa_ldap = true;
35
36         return nt_status;
37 }
38
39 NTSTATUS pdb_ipa_init(void)
40 {
41         NTSTATUS nt_status;
42
43         if (!NT_STATUS_IS_OK(nt_status = smb_register_passdb(PASSDB_INTERFACE_VERSION, "IPA_ldapsam", pdb_init_IPA_ldapsam)))
44                 return nt_status;
45
46         return NT_STATUS_OK;
47 }