Main Page | Class List | File List | Class Members | File Members

ldapauth_plus.h File Reference

#include "pgina_headers.h"
#include "messages_def.h"
#include <wchar.h>
#include <WCHAR.h>
#include <Winldap.h>
#include <Winreg.h>
#include <Windows.h>
#include <stdio.h>
#include <stdlib.h>
#include <Winber.h>
#include <Lm.h>

Go to the source code of this file.

Classes

class  Cldapauth_plusApp
 Cldapauth_plusApp. More...


Defines

#define LDAPREGFAIL   ((DWORD)0xC000000BL)
#define MISCONFIGURED   0
#define MULTIMAP   1
#define SEARCH   2
#define STRMAP   3
#define DOMAIN_USER_RID_ADMIN   (0x000001F4L)
#define DOMAIN_USER_RID_GUEST   (0x000001F5L)
#define DOMAIN_GROUP_RID_ADMINS   (0x00000200L)
#define DOMAIN_GROUP_RID_USERS   (0x00000201L)
#define DOMAIN_GROUP_RID_GUESTS   (0x00000202L)
#define DOMAIN_ALIAS_RID_ADMINS   (0x00000220L)
#define DOMAIN_ALIAS_RID_USERS   (0x00000221L)
#define DOMAIN_ALIAS_RID_GUESTS   (0x00000222L)
#define DOMAIN_ALIAS_RID_POWER_USERS   (0x00000223L)
#define DOMAIN_ALIAS_RID_ACCOUNT_OPS   (0x00000224L)
#define DOMAIN_ALIAS_RID_SYSTEM_OPS   (0x00000225L)
#define DOMAIN_ALIAS_RID_PRINT_OPS   (0x00000226L)
#define DOMAIN_ALIAS_RID_BACKUP_OPS   (0x00000227L)
#define DOMAIN_ALIAS_RID_REPLICATOR   (0x00000228L)
#define LDAPAUTHVERSION   TEXT("LDAPAuth Version 1.4 by Micah Cooper and Michael Morris")

Functions

long regLookup (WCHAR *, WCHAR *)
PWCHAR * ldapSearchAttr (LPTSTR, WCHAR *, LDAP *, WCHAR *, bool ldpOverride)
void plugError (LPCWSTR *, LPVOID, DWORD)
 pGina ldapAuth plugin

bool ldapDoBindTest (LPTSTR, LPTSTR, LPTSTR, LDAP *)
bool ldapTestMap (LPTSTR, LPTSTR, WCHAR *, WCHAR *, LDAP *, WCHAR *)
bool ldapMapGo (LPTSTR, LPTSTR, LPTSTR, LPTSTR, LPTSTR, LDAP *, WCHAR *)
WCHAR * getContext (WCHAR *)
bool ldapSearchForDN (LPTSTR, WCHAR *, WCHAR *, LDAP *)
bool ldapTestMultiMap (LPTSTR, LPTSTR, WCHAR *, WCHAR *, LDAP *, WCHAR *)
bool regSet (WCHAR *, WCHAR *)
bool ldapTestSearch (LPTSTR, LPTSTR, WCHAR *, LDAP *, WCHAR *)
DWORD determineLdap (void)
bool ldapGroupCheck (WCHAR *, WCHAR *, LDAP *, WCHAR *)
bool okToLogin (WCHAR *, LDAP *, WCHAR *)
bool createAsAdmin (WCHAR *, LDAP *, WCHAR *)
PWCHAR * ldapSearchAttr (LPTSTR, WCHAR *, LDAP *, WCHAR *)
void populateUserInfo (pGinaInfo *, LDAP *, WCHAR *)
void setNDSReg (WCHAR *, WCHAR *)
void confNDSClient (WCHAR *, WCHAR *, WCHAR *)
BOOL whoIsGroup (WCHAR *, DWORD)
TCHAR * regReadString (LPCTSTR location)
BOOL regWriteString (LPTSTR value, LPCTSTR location)
BOOL regWriteDword (DWORD, LPCTSTR)
DWORD regReadDword (LPCTSTR)
void regDelValue (LPCTSTR)
void doLdapSearch (WCHAR ldapFilter[256])
 doLdapSearch -- a standard search function for ldapauth


Define Documentation

#define DOMAIN_ALIAS_RID_ACCOUNT_OPS   (0x00000224L)
 

Definition at line 67 of file ldapauth_plus.h.

#define DOMAIN_ALIAS_RID_ADMINS   (0x00000220L)
 

Definition at line 63 of file ldapauth_plus.h.

Referenced by UserLogin().

#define DOMAIN_ALIAS_RID_BACKUP_OPS   (0x00000227L)
 

Definition at line 70 of file ldapauth_plus.h.

#define DOMAIN_ALIAS_RID_GUESTS   (0x00000222L)
 

Definition at line 65 of file ldapauth_plus.h.

#define DOMAIN_ALIAS_RID_POWER_USERS   (0x00000223L)
 

Definition at line 66 of file ldapauth_plus.h.

#define DOMAIN_ALIAS_RID_PRINT_OPS   (0x00000226L)
 

Definition at line 69 of file ldapauth_plus.h.

#define DOMAIN_ALIAS_RID_REPLICATOR   (0x00000228L)
 

Definition at line 71 of file ldapauth_plus.h.

#define DOMAIN_ALIAS_RID_SYSTEM_OPS   (0x00000225L)
 

Definition at line 68 of file ldapauth_plus.h.

#define DOMAIN_ALIAS_RID_USERS   (0x00000221L)
 

Definition at line 64 of file ldapauth_plus.h.

Referenced by UserLogin().

#define DOMAIN_GROUP_RID_ADMINS   (0x00000200L)
 

Definition at line 59 of file ldapauth_plus.h.

#define DOMAIN_GROUP_RID_GUESTS   (0x00000202L)
 

Definition at line 61 of file ldapauth_plus.h.

#define DOMAIN_GROUP_RID_USERS   (0x00000201L)
 

Definition at line 60 of file ldapauth_plus.h.

#define DOMAIN_USER_RID_ADMIN   (0x000001F4L)
 

Definition at line 57 of file ldapauth_plus.h.

#define DOMAIN_USER_RID_GUEST   (0x000001F5L)
 

Definition at line 58 of file ldapauth_plus.h.

#define LDAPAUTHVERSION   TEXT("LDAPAuth Version 1.4 by Micah Cooper and Michael Morris")
 

Definition at line 73 of file ldapauth_plus.h.

Referenced by AboutPlugin(), and CConfigDialog::CConfigDialog().

#define LDAPREGFAIL   ((DWORD)0xC000000BL)
 

Definition at line 157 of file messages_def.h.

Referenced by ldapTestMultiMap().

#define MISCONFIGURED   0
 

Definition at line 52 of file ldapauth_plus.h.

#define MULTIMAP   1
 

Definition at line 53 of file ldapauth_plus.h.

Referenced by AboutPlugin(), ChangeUserPassword(), and UserLogin().

#define SEARCH   2
 

Definition at line 54 of file ldapauth_plus.h.

Referenced by AboutPlugin(), ChangeUserPassword(), and UserLogin().

#define STRMAP   3
 

Definition at line 55 of file ldapauth_plus.h.

Referenced by AboutPlugin(), ChangeUserPassword(), and UserLogin().


Function Documentation

void confNDSClient WCHAR *  ,
WCHAR *  ,
WCHAR * 
 

Definition at line 978 of file ldapauth_plus.cpp.

References setNDSReg().

Referenced by UserLogin().

bool createAsAdmin WCHAR *  ,
LDAP *  ,
WCHAR * 
 

Definition at line 628 of file ldapauth_plus.cpp.

References ldapGroupCheck(), and regLookup().

Referenced by UserLogin().

DWORD determineLdap void   ) 
 

Definition at line 456 of file ldapauth_plus.cpp.

References regLookup().

Referenced by AboutPlugin(), ChangeUserPassword(), and UserLogin().

void doLdapSearch WCHAR  ldapFilter[256]  ) 
 

doLdapSearch -- a standard search function for ldapauth

doLdapSearch is an attempt to build a standard search function into ldapauth to handle assorted searching needs. It will accept what is saught.

Definition at line 469 of file ldapauth_plus.cpp.

References getContext(), and regLookup().

WCHAR* getContext WCHAR *   ) 
 

Definition at line 247 of file ldapauth_plus.cpp.

Referenced by doLdapSearch(), and ldapSearchForDN().

bool ldapDoBindTest LPTSTR  ,
LPTSTR  ,
LPTSTR  ,
LDAP * 
 

Definition at line 171 of file ldapauth_plus.cpp.

References regLookup().

Referenced by ldapMapGo(), and ldapTestMap().

bool ldapGroupCheck WCHAR *  ,
WCHAR *  ,
LDAP *  ,
WCHAR * 
 

Definition at line 544 of file ldapauth_plus.cpp.

References ldapSearchAttr(), and regLookup().

Referenced by createAsAdmin(), and okToLogin().

bool ldapMapGo LPTSTR  ,
LPTSTR  ,
LPTSTR  ,
LPTSTR  ,
LPTSTR  ,
LDAP *  ,
WCHAR * 
 

Definition at line 225 of file ldapauth_plus.cpp.

References ldapDoBindTest().

Referenced by ldapTestMultiMap().

PWCHAR* ldapSearchAttr LPTSTR  ,
WCHAR *  ,
LDAP *  ,
WCHAR * 
 

Referenced by ldapGroupCheck(), and populateUserInfo().

PWCHAR* ldapSearchAttr LPTSTR  ,
WCHAR *  ,
LDAP *  ,
WCHAR *  ,
bool  ldpOverride
 

Definition at line 675 of file ldapauth_plus.cpp.

References regLookup().

bool ldapSearchForDN LPTSTR  ,
WCHAR *  ,
WCHAR *  ,
LDAP * 
 

Definition at line 265 of file ldapauth_plus.cpp.

References getContext(), and regLookup().

Referenced by ldapTestSearch().

bool ldapTestMap LPTSTR  ,
LPTSTR  ,
WCHAR *  ,
WCHAR *  ,
LDAP *  ,
WCHAR * 
 

Definition at line 199 of file ldapauth_plus.cpp.

References ldapDoBindTest(), and regLookup().

Referenced by ChangeUserPassword(), and UserLogin().

bool ldapTestMultiMap LPTSTR  ,
LPTSTR  ,
WCHAR *  ,
WCHAR *  ,
LDAP *  ,
WCHAR * 
 

Definition at line 357 of file ldapauth_plus.cpp.

References ldapMapGo(), LDAPREGFAIL, plugError(), and regLookup().

Referenced by ChangeUserPassword(), and UserLogin().

bool ldapTestSearch LPTSTR  ,
LPTSTR  ,
WCHAR *  ,
LDAP *  ,
WCHAR * 
 

Definition at line 423 of file ldapauth_plus.cpp.

References ldapSearchForDN(), and regLookup().

Referenced by ChangeUserPassword(), and UserLogin().

bool okToLogin WCHAR *  ,
LDAP *  ,
WCHAR * 
 

Definition at line 596 of file ldapauth_plus.cpp.

References ldapGroupCheck(), and regLookup().

Referenced by UserLogin().

void plugError LPCWSTR *  errorStr,
LPVOID  rawData,
DWORD  eventID
 

pGina ldapAuth plugin

pGina ldapAuth code - based upon skeleton code for pGina plugin development Copyright (C) 2003 Micah Cooper

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, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

Email: coopermj@muohio.edu Snail Mail: Micah Cooper 212A Kreger Hall Miami University Oxford OH 45056

Definition at line 83 of file ldapauth_plus.cpp.

Referenced by ldapTestMultiMap().

void populateUserInfo pGinaInfo ,
LDAP *  ,
WCHAR * 
 

Definition at line 765 of file ldapauth_plus.cpp.

References ldapSearchAttr(), pGinaInfo::mapPaths, regLookup(), pGinaInfo::userDescription, pGinaInfo::userFullName, and pGinaInfo::Username.

Referenced by UserLogin().

void regDelValue LPCTSTR   ) 
 

Definition at line 1688 of file ldapauth_plus.cpp.

Referenced by CConfigUser::OnSave(), CConfigPwd::OnSave(), CConfigLDAP::OnSave(), CConfigHooks::OnSave(), CConfigDialog::OnSave(), CConfigUser::saveListsToReg(), CConfigLDAP::saveListsToReg(), CConfigHooks::saveListsToReg(), and CConfigDialog::saveListsToReg().

long regLookup WCHAR *  ,
WCHAR * 
 

Definition at line 110 of file ldapauth_plus.cpp.

Referenced by ChangeUserPassword(), createAsAdmin(), determineLdap(), doLdapSearch(), IsRequired(), ldapDoBindTest(), ldapGroupCheck(), ldapSearchAttr(), ldapSearchForDN(), ldapTestMap(), ldapTestMultiMap(), ldapTestSearch(), LoginHook(), LogoutHook(), okToLogin(), populateUserInfo(), and UserLogin().

DWORD regReadDword LPCTSTR   ) 
 

Definition at line 1665 of file ldapauth_plus.cpp.

Referenced by CConfigLDAP::CConfigLDAP(), ldapNegotiate(), and UserLogin().

TCHAR* regReadString LPCTSTR  location  ) 
 

Definition at line 1586 of file ldapauth_plus.cpp.

Referenced by CConfigDialog::CConfigDialog(), CConfigLDAP::CConfigLDAP(), CConfigPwd::CConfigPwd(), CConfigUser::loadListsFromReg(), CConfigLDAP::loadListsFromReg(), CConfigHooks::loadListsFromReg(), CConfigDialog::loadListsFromReg(), CConfigLDAP::OnInitDialog(), CConfigUser::OnSave(), CConfigHooks::OnSave(), CConfigUser::saveListsToReg(), CConfigLDAP::saveListsToReg(), CConfigHooks::saveListsToReg(), and CConfigDialog::saveListsToReg().

bool regSet WCHAR *  ,
WCHAR * 
 

Definition at line 142 of file ldapauth_plus.cpp.

BOOL regWriteDword DWORD  ,
LPCTSTR 
 

Definition at line 1646 of file ldapauth_plus.cpp.

Referenced by CConfigLDAP::OnSave().

BOOL regWriteString LPTSTR  value,
LPCTSTR  location
 

Definition at line 1626 of file ldapauth_plus.cpp.

Referenced by CConfigUser::OnSave(), CConfigPwd::OnSave(), CConfigLDAP::OnSave(), CConfigHooks::OnSave(), CConfigDialog::OnSave(), CConfigUser::saveListsToReg(), CConfigLDAP::saveListsToReg(), CConfigHooks::saveListsToReg(), and CConfigDialog::saveListsToReg().

void setNDSReg WCHAR *  ,
WCHAR * 
 

Definition at line 949 of file ldapauth_plus.cpp.

Referenced by confNDSClient().

BOOL whoIsGroup WCHAR *  ,
DWORD 
 

Definition at line 1008 of file ldapauth_plus.cpp.

Referenced by UserLogin().


Generated on Fri Feb 20 12:03:45 2004 for ldapauth plugin for pGina by doxygen 1.3.5