/* Editor Settings: expandtabs and use 4 spaces for indentation * ex: set softtabstop=4 tabstop=8 expandtab shiftwidth=4: * */ /* * Copyright Likewise Software * All rights reserved. * * 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 2 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 * . * * LIKEWISE SOFTWARE MAKES THIS SOFTWARE AVAILABLE UNDER OTHER LICENSING * TERMS AS WELL. IF YOU HAVE ENTERED INTO A SEPARATE LICENSE AGREEMENT * WITH LIKEWISE SOFTWARE, THEN YOU MAY ELECT TO USE THE SOFTWARE UNDER THE * TERMS OF THAT SOFTWARE LICENSE AGREEMENT INSTEAD OF THE TERMS OF THE GNU * GENERAL PUBLIC LICENSE, NOTWITHSTANDING THE ABOVE NOTICE. IF YOU * HAVE QUESTIONS, OR WISH TO REQUEST A COPY OF THE ALTERNATE LICENSING * TERMS OFFERED BY LIKEWISE SOFTWARE, PLEASE CONTACT LIKEWISE SOFTWARE AT * license@likewisesoftware.com */ /* * Copyright (C) Likewise Software. All rights reserved. * * Module Name: * * samdb.h * * Abstract: * * * Likewise SAM Database Provider * * SAM Provider API * * Authors: Krishna Ganugapati (krishnag@likewise.com) * Sriram Nambakam (snambakam@likewise.com) * Rafal Szczesniak (rafal@likewise.com) * */ #ifndef __SAMDB_H__ #define __SAMDB_H__ DWORD SamDbInit( VOID ); DWORD SamDbOpen( PHANDLE phDirectory ); DWORD SamDbBind( HANDLE hDirectory, PWSTR pwszDistinguishedName, PWSTR pwszCredential, ULONG ulMethod ); DWORD SamDbAddObject( HANDLE hDirectory, PWSTR pwszObjectDN, DIRECTORY_MOD modifications[] ); DWORD SamDbModifyObject( HANDLE hBindHandle, PWSTR pwszObjectDN, DIRECTORY_MOD Modifications[] ); DWORD SamDbSearchObject( HANDLE hDirectory, PWSTR pwszBaseDN, ULONG ulScope, PWSTR pwszFilter, PWSTR pwszAttributes[], ULONG ulAttributesOnly, PDIRECTORY_ENTRY* ppDirectoryEntries, PDWORD pdwNumEntries ); DWORD SamDbSearchObject_inlock( HANDLE hDirectory, PWSTR pwszBase, ULONG ulScope, PWSTR pwszFilter, PWSTR wszAttributes[], ULONG ulAttributesOnly, PDIRECTORY_ENTRY* ppDirectoryEntries, PDWORD pdwNumEntries ); DWORD SamDbDeleteObject( HANDLE hBindHandle, PWSTR pwszObjectDN ); DWORD SamDbAddUser( HANDLE hDirectory, PWSTR pwszUserDN, DIRECTORY_MOD modifications[] ); DWORD SamDbModifyUser( HANDLE hDirectory, PWSTR pwszObjectDN, DIRECTORY_MOD modifications[] ); DWORD SamDbSearchUsers( HANDLE hDirectory, PWSTR pwszBaseDN, ULONG ulScope, PWSTR pwszAttributes[], ULONG ulAttributesOnly, PDIRECTORY_ENTRY* ppDirectoryEntries, PDWORD pdwNumEntries ); DWORD SamDbDeleteUser( HANDLE hDirectory, PWSTR pwszUserDN ); DWORD SamDbAddGroup( HANDLE hDirectory, PWSTR pwszObjectDN, DIRECTORY_MOD modifications[] ); DWORD SamDbNumMembersInGroup_inlock( HANDLE hDirectory, PCSTR pszGroupName, PCSTR pszDomain, PDWORD pdwNumGroupMembers ); DWORD SamDbModifyGroup( HANDLE hDirectory, PWSTR pwszObjectDN, DIRECTORY_MOD modifications[] ); DWORD SamDbSearchGroups( HANDLE hDirectory, PWSTR pwszBaseDN, ULONG ulScope, PWSTR pwszAttributes[], ULONG ulAttributesOnly, PDIRECTORY_ENTRY* ppDirectoryEntries, PDWORD pdwNumEntries ); DWORD SamDbFindGID_inlock( HANDLE hDirectory, PWSTR pwszGroupDN, PDWORD pdwGID ); DWORD SamDbDeleteGroup( HANDLE hDirectory, PWSTR pwszGroupDN ); DWORD SamDbAddDomain( HANDLE hDirectory, PWSTR pwszObjectDN, DIRECTORY_MOD modifications[] ); DWORD SamDbFindDomains( HANDLE hDirectory, PWSTR pwszDomainName, PSAM_DB_DOMAIN_INFO** pppDomainInfoList, PDWORD pdwNumDomains ); DWORD SamDbBuildDomainInfo( PSTR* ppszResult, int nRows, int nCols, int nHeaderColsToSkip, PSAM_DB_DOMAIN_INFO** pppDomainInfo, PDWORD pdwNumDomainsFound ); DWORD SamDbModifyDomain( HANDLE hDirectory, PWSTR pwszObjectDN, DIRECTORY_MOD modifications[] ); DWORD SamDbSearchDomains( HANDLE hDirectory, PWSTR pwszBaseDN, ULONG ulScope, PWSTR pwszAttributes[], ULONG ulAttributesOnly, PDIRECTORY_ENTRY* ppDirectoryEntries, PDWORD pdwNumEntries ); DWORD SamDbDeleteDomain( HANDLE hDirectory, PWSTR pswzObjectDN ); DWORD SamDbNumObjectsInDomain_inlock( HANDLE hDirectory, PSTR pszDomainName, PDWORD pdwNumObjects ); VOID SamDbFreeDomainInfoList( PSAM_DB_DOMAIN_INFO* ppDomainInfoList, DWORD dwNumDomains ); VOID SamDbFreeDomainInfo( PSAM_DB_DOMAIN_INFO pDomainInfo ); DWORD SamDbBuildDomainDirectoryEntries( PSAM_DIRECTORY_CONTEXT pDirContext, PWSTR pwszAttributes[], ULONG ulAttributesOnly, PSAM_DB_DOMAIN_INFO* ppDomainInfoList, DWORD dwNumDomains, PDIRECTORY_ENTRY* ppDirectoryEntries ); DWORD SamDbConvertFiltertoTable( PWSTR pwszFilter, SAMDB_ENTRY_TYPE* pdwTable ); VOID SamDbClose( HANDLE hDirectory ); #endif /* __SAMDB_H__ */ /* local variables: mode: c c-basic-offset: 4 indent-tabs-mode: nil tab-width: 4 end: */