diff options
author | Sumit Bose <sbose@redhat.com> | 2010-07-14 15:08:02 +0200 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2011-02-16 11:34:31 +0100 |
commit | 4fa210d76a6fb1a9392653c8313c8ffac1f41bb7 (patch) | |
tree | 71d39c407f233975c0c5e8b43c669d19424dd80f /source3/passdb | |
parent | 1354d3dc747344390302e3fd2a202ff372985a9c (diff) | |
download | samba-4fa210d76a6fb1a9392653c8313c8ffac1f41bb7.tar.gz samba-4fa210d76a6fb1a9392653c8313c8ffac1f41bb7.tar.bz2 samba-4fa210d76a6fb1a9392653c8313c8ffac1f41bb7.zip |
s3-passdb: Add minimal stub for IPA passdb backend
Signed-off-by: Günther Deschner <gd@samba.org>
Diffstat (limited to 'source3/passdb')
-rw-r--r-- | source3/passdb/pdb_ipa.c | 47 | ||||
-rw-r--r-- | source3/passdb/pdb_ldap.c | 2 | ||||
-rw-r--r-- | source3/passdb/wscript_build | 2 |
3 files changed, 50 insertions, 1 deletions
diff --git a/source3/passdb/pdb_ipa.c b/source3/passdb/pdb_ipa.c new file mode 100644 index 0000000000..c0dbd00e0a --- /dev/null +++ b/source3/passdb/pdb_ipa.c @@ -0,0 +1,47 @@ +/* + Unix SMB/CIFS implementation. + IPA helper functions for SAMBA + Copyright (C) Sumit Bose <sbose@redhat.com> 2010 + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. + +*/ + +#include "includes.h" + +#include "smbldap.h" + +static NTSTATUS pdb_init_IPA_ldapsam(struct pdb_methods **pdb_method, const char *location) +{ + struct ldapsam_privates *ldap_state; + + NTSTATUS nt_status = pdb_init_ldapsam(pdb_method, location); + + (*pdb_method)->name = "IPA_ldapsam"; + + ldap_state = (struct ldapsam_privates *)((*pdb_method)->private_data); + ldap_state->is_ipa_ldap = true; + + return nt_status; +} + +NTSTATUS pdb_ipa_init(void) +{ + NTSTATUS nt_status; + + if (!NT_STATUS_IS_OK(nt_status = smb_register_passdb(PASSDB_INTERFACE_VERSION, "IPA_ldapsam", pdb_init_IPA_ldapsam))) + return nt_status; + + return NT_STATUS_OK; +} diff --git a/source3/passdb/pdb_ldap.c b/source3/passdb/pdb_ldap.c index 942fd7fc56..514db36eb8 100644 --- a/source3/passdb/pdb_ldap.c +++ b/source3/passdb/pdb_ldap.c @@ -6722,5 +6722,7 @@ NTSTATUS pdb_ldap_init(void) /* Let pdb_nds register backends */ pdb_nds_init(); + pdb_ipa_init(); + return NT_STATUS_OK; } diff --git a/source3/passdb/wscript_build b/source3/passdb/wscript_build index 5a0b0961e2..fc53ee5a38 100644 --- a/source3/passdb/wscript_build +++ b/source3/passdb/wscript_build @@ -1,7 +1,7 @@ #!/usr/bin/env python PDB_TDBSAM_SRC = 'pdb_tdb.c' -PDB_LDAP_SRC = 'pdb_ldap.c pdb_nds.c' +PDB_LDAP_SRC = 'pdb_ldap.c pdb_nds.c pdb_ipa.c' PDB_ADS_SRC = 'pdb_ads.c' PDB_SMBPASSWD_SRC = 'pdb_smbpasswd.c' PDB_WBC_SAM_SRC = 'pdb_wbc_sam.c' |