New indexer/filter codes (test suite works) with cheats

Updated NT Project files (with Cyrus SASL library depend)
This commit is contained in:
Kurt Zeilenga 2000-06-04 22:59:38 +00:00
parent f8c1bc5ccb
commit ea069cb7c2
54 changed files with 1677 additions and 593 deletions

View file

@ -3,7 +3,7 @@ Microsoft Developer Studio Workspace File, Format Version 5.00
############################################################################### ###############################################################################
Project: "apitest"="..\libraries\libldap\apitest.dsp" - Package Owner=<4> Project: "apitest"=..\libraries\libldap\apitest.dsp - Package Owner=<4>
Package=<5> Package=<5>
{{{ {{{
@ -21,7 +21,7 @@ Package=<4>
############################################################################### ###############################################################################
Project: "apitest_r"="..\libraries\libldap_r\apitest_r.dsp" - Package Owner=<4> Project: "apitest_r"=..\libraries\libldap_r\apitest_r.dsp - Package Owner=<4>
Package=<5> Package=<5>
{{{ {{{
@ -51,19 +51,7 @@ Package=<4>
############################################################################### ###############################################################################
Project: "backsql"="..\servers\slapd\back-sql\backsql.dsp" - Package Owner=<4> Project: "build"=.\build.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
}}}
###############################################################################
Project: "build"=".\build.dsp" - Package Owner=<4>
Package=<5> Package=<5>
{{{ {{{
@ -147,7 +135,7 @@ Package=<4>
############################################################################### ###############################################################################
Project: "dtest"="..\libraries\liblber\dtest.dsp" - Package Owner=<4> Project: "dtest"=..\libraries\liblber\dtest.dsp - Package Owner=<4>
Package=<5> Package=<5>
{{{ {{{
@ -162,7 +150,7 @@ Package=<4>
############################################################################### ###############################################################################
Project: "etest"="..\libraries\liblber\etest.dsp" - Package Owner=<4> Project: "etest"=..\libraries\liblber\etest.dsp - Package Owner=<4>
Package=<5> Package=<5>
{{{ {{{
@ -177,7 +165,7 @@ Package=<4>
############################################################################### ###############################################################################
Project: "ldapdelete"="..\clients\tools\ldapdelete.dsp" - Package Owner=<4> Project: "ldapdelete"=..\clients\tools\ldapdelete.dsp - Package Owner=<4>
Package=<5> Package=<5>
{{{ {{{
@ -198,7 +186,7 @@ Package=<4>
############################################################################### ###############################################################################
Project: "ldapmodify"="..\clients\tools\ldapmodify.dsp" - Package Owner=<4> Project: "ldapmodify"=..\clients\tools\ldapmodify.dsp - Package Owner=<4>
Package=<5> Package=<5>
{{{ {{{
@ -222,7 +210,7 @@ Package=<4>
############################################################################### ###############################################################################
Project: "ldapmodrdn"="..\clients\tools\ldapmodrdn.dsp" - Package Owner=<4> Project: "ldapmodrdn"=..\clients\tools\ldapmodrdn.dsp - Package Owner=<4>
Package=<5> Package=<5>
{{{ {{{
@ -243,7 +231,7 @@ Package=<4>
############################################################################### ###############################################################################
Project: "ldappasswd"="..\clients\tools\ldappasswd.dsp" - Package Owner=<4> Project: "ldappasswd"=..\clients\tools\ldappasswd.dsp - Package Owner=<4>
Package=<5> Package=<5>
{{{ {{{
@ -264,7 +252,7 @@ Package=<4>
############################################################################### ###############################################################################
Project: "ldapsearch"="..\clients\tools\ldapsearch.dsp" - Package Owner=<4> Project: "ldapsearch"=..\clients\tools\ldapsearch.dsp - Package Owner=<4>
Package=<5> Package=<5>
{{{ {{{
@ -288,7 +276,7 @@ Package=<4>
############################################################################### ###############################################################################
Project: "ldbmtest"="..\servers\slapd\tools\ldbmtest.dsp" - Package Owner=<4> Project: "ldbmtest"=..\servers\slapd\tools\ldbmtest.dsp - Package Owner=<4>
Package=<5> Package=<5>
{{{ {{{
@ -320,14 +308,11 @@ Package=<4>
Begin Project Dependency Begin Project Dependency
Project_Dep_Name libldif Project_Dep_Name libldif
End Project Dependency End Project Dependency
Begin Project Dependency
Project_Dep_Name backsql
End Project Dependency
}}} }}}
############################################################################### ###############################################################################
Project: "ldif"="..\servers\slapd\tools\ldif.dsp" - Package Owner=<4> Project: "ldif"=..\servers\slapd\tools\ldif.dsp - Package Owner=<4>
Package=<5> Package=<5>
{{{ {{{
@ -351,7 +336,7 @@ Package=<4>
############################################################################### ###############################################################################
Project: "libavl"="..\libraries\libavl\libavl.dsp" - Package Owner=<4> Project: "libavl"=..\libraries\libavl\libavl.dsp - Package Owner=<4>
Package=<5> Package=<5>
{{{ {{{
@ -366,7 +351,7 @@ Package=<4>
############################################################################### ###############################################################################
Project: "liblber"="..\libraries\liblber\liblber.dsp" - Package Owner=<4> Project: "liblber"=..\libraries\liblber\liblber.dsp - Package Owner=<4>
Package=<5> Package=<5>
{{{ {{{
@ -381,7 +366,7 @@ Package=<4>
############################################################################### ###############################################################################
Project: "libldap"="..\libraries\libldap\libldap.dsp" - Package Owner=<4> Project: "libldap"=..\libraries\libldap\libldap.dsp - Package Owner=<4>
Package=<5> Package=<5>
{{{ {{{
@ -396,7 +381,7 @@ Package=<4>
############################################################################### ###############################################################################
Project: "libldap_r"="..\libraries\libldap_r\libldap_r.dsp" - Package Owner=<4> Project: "libldap_r"=..\libraries\libldap_r\libldap_r.dsp - Package Owner=<4>
Package=<5> Package=<5>
{{{ {{{
@ -411,7 +396,7 @@ Package=<4>
############################################################################### ###############################################################################
Project: "libldbm"="..\libraries\libldbm\libldbm.dsp" - Package Owner=<4> Project: "libldbm"=..\libraries\libldbm\libldbm.dsp - Package Owner=<4>
Package=<5> Package=<5>
{{{ {{{
@ -426,7 +411,7 @@ Package=<4>
############################################################################### ###############################################################################
Project: "libldif"="..\libraries\libldif\libldif.dsp" - Package Owner=<4> Project: "libldif"=..\libraries\libldif\libldif.dsp - Package Owner=<4>
Package=<5> Package=<5>
{{{ {{{
@ -471,7 +456,7 @@ Package=<4>
############################################################################### ###############################################################################
Project: "libslapd"="..\servers\slapd\libslapd.dsp" - Package Owner=<4> Project: "libslapd"=..\servers\slapd\libslapd.dsp - Package Owner=<4>
Package=<5> Package=<5>
{{{ {{{
@ -486,7 +471,7 @@ Package=<4>
############################################################################### ###############################################################################
Project: "ltest"="..\libraries\libldap\ltest.dsp" - Package Owner=<4> Project: "ltest"=..\libraries\libldap\ltest.dsp - Package Owner=<4>
Package=<5> Package=<5>
{{{ {{{
@ -507,7 +492,7 @@ Package=<4>
############################################################################### ###############################################################################
Project: "ltest_r"="..\libraries\libldap_r\ltest_r.dsp" - Package Owner=<4> Project: "ltest_r"=..\libraries\libldap_r\ltest_r.dsp - Package Owner=<4>
Package=<5> Package=<5>
{{{ {{{
@ -558,7 +543,7 @@ Package=<4>
############################################################################### ###############################################################################
Project: "slapadd"="..\servers\slapd\tools\slapadd.dsp" - Package Owner=<4> Project: "slapadd"=..\servers\slapd\tools\slapadd.dsp - Package Owner=<4>
Package=<5> Package=<5>
{{{ {{{
@ -590,14 +575,11 @@ Package=<4>
Begin Project Dependency Begin Project Dependency
Project_Dep_Name libslapd Project_Dep_Name libslapd
End Project Dependency End Project Dependency
Begin Project Dependency
Project_Dep_Name backsql
End Project Dependency
}}} }}}
############################################################################### ###############################################################################
Project: "slapcat"="..\servers\slapd\tools\slapcat.dsp" - Package Owner=<4> Project: "slapcat"=..\servers\slapd\tools\slapcat.dsp - Package Owner=<4>
Package=<5> Package=<5>
{{{ {{{
@ -629,14 +611,11 @@ Package=<4>
Begin Project Dependency Begin Project Dependency
Project_Dep_Name backldbm Project_Dep_Name backldbm
End Project Dependency End Project Dependency
Begin Project Dependency
Project_Dep_Name backsql
End Project Dependency
}}} }}}
############################################################################### ###############################################################################
Project: "slapd"="..\servers\slapd\slapd.dsp" - Package Owner=<4> Project: "slapd"=..\servers\slapd\slapd.dsp - Package Owner=<4>
Package=<5> Package=<5>
{{{ {{{
@ -671,14 +650,11 @@ Package=<4>
Begin Project Dependency Begin Project Dependency
Project_Dep_Name libslapd Project_Dep_Name libslapd
End Project Dependency End Project Dependency
Begin Project Dependency
Project_Dep_Name backsql
End Project Dependency
}}} }}}
############################################################################### ###############################################################################
Project: "slapindex"="..\servers\slapd\tools\slapindex.dsp" - Package Owner=<4> Project: "slapindex"=..\servers\slapd\tools\slapindex.dsp - Package Owner=<4>
Package=<5> Package=<5>
{{{ {{{
@ -710,14 +686,11 @@ Package=<4>
Begin Project Dependency Begin Project Dependency
Project_Dep_Name libslapd Project_Dep_Name libslapd
End Project Dependency End Project Dependency
Begin Project Dependency
Project_Dep_Name backsql
End Project Dependency
}}} }}}
############################################################################### ###############################################################################
Project: "testavl"="..\libraries\libavl\testavl.dsp" - Package Owner=<4> Project: "testavl"=..\libraries\libavl\testavl.dsp - Package Owner=<4>
Package=<5> Package=<5>
{{{ {{{
@ -732,7 +705,7 @@ Package=<4>
############################################################################### ###############################################################################
Project: "ud"="..\clients\ud\ud.dsp" - Package Owner=<4> Project: "ud"=..\clients\ud\ud.dsp - Package Owner=<4>
Package=<5> Package=<5>
{{{ {{{

View file

@ -56,7 +56,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo # ADD BSC32 /nologo
LINK32=link.exe LINK32=link.exe
# ADD BASE LINK32 oldap32.lib olber32.lib olutil32.lib ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\libraries\Debug" # ADD BASE LINK32 oldap32.lib olber32.lib olutil32.lib ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\libraries\Debug"
# ADD LINK32 ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\SDebug" # ADD LINK32 libsasl.lib ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\SDebug"
!ELSEIF "$(CFG)" == "ldapdelete - Win32 Single Release" !ELSEIF "$(CFG)" == "ldapdelete - Win32 Single Release"
@ -81,7 +81,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo # ADD BSC32 /nologo
LINK32=link.exe LINK32=link.exe
# ADD BASE LINK32 oldap32.lib olber32.lib olutil32.lib ws2_32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\libraries\Release" # ADD BASE LINK32 oldap32.lib olber32.lib olutil32.lib ws2_32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\libraries\Release"
# ADD LINK32 ws2_32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:console /machine:I386 /out:"SRelease/ldapdelete.exe" /libpath:"..\..\SRelease" # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib sasl.lib libsasl.lib ws2_32.lib /nologo /subsystem:console /machine:I386 /out:"SRelease/ldapdelete.exe" /libpath:"..\..\SRelease"
!ELSEIF "$(CFG)" == "ldapdelete - Win32 Debug" !ELSEIF "$(CFG)" == "ldapdelete - Win32 Debug"
@ -106,7 +106,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo # ADD BSC32 /nologo
LINK32=link.exe LINK32=link.exe
# ADD BASE LINK32 ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\libraries\Debug" # ADD BASE LINK32 ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\libraries\Debug"
# ADD LINK32 ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\Debug" # ADD LINK32 libsasl.lib ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\Debug"
!ELSEIF "$(CFG)" == "ldapdelete - Win32 Release" !ELSEIF "$(CFG)" == "ldapdelete - Win32 Release"
@ -131,7 +131,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo # ADD BSC32 /nologo
LINK32=link.exe LINK32=link.exe
# ADD BASE LINK32 ws2_32.lib /nologo /subsystem:console /machine:I386 /out:"Release/ldapdelete.exe" /libpath:"..\..\libraries\Release" # ADD BASE LINK32 ws2_32.lib /nologo /subsystem:console /machine:I386 /out:"Release/ldapdelete.exe" /libpath:"..\..\libraries\Release"
# ADD LINK32 ws2_32.lib /nologo /subsystem:console /machine:I386 /out:"Release/ldapdelete.exe" /libpath:"..\..\Release" # ADD LINK32 sasl.lib libsasl.lib ws2_32.lib /nologo /subsystem:console /machine:I386 /out:"Release/ldapdelete.exe" /libpath:"..\..\Release"
!ENDIF !ENDIF

View file

@ -56,7 +56,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo # ADD BSC32 /nologo
LINK32=link.exe LINK32=link.exe
# ADD BASE LINK32 oldap32.lib olber32.lib oldif32.lib olutil32.lib ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\libraries\Debug" # ADD BASE LINK32 oldap32.lib olber32.lib oldif32.lib olutil32.lib ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\libraries\Debug"
# ADD LINK32 ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /out:"SDebug/ldapmodify.exe" /pdbtype:sept /libpath:"..\..\SDebug" # ADD LINK32 libsasl.lib ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /out:"SDebug/ldapmodify.exe" /pdbtype:sept /libpath:"..\..\SDebug"
!ELSEIF "$(CFG)" == "ldapmodify - Win32 Single Release" !ELSEIF "$(CFG)" == "ldapmodify - Win32 Single Release"
@ -81,7 +81,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo # ADD BSC32 /nologo
LINK32=link.exe LINK32=link.exe
# ADD BASE LINK32 oldap32.lib olber32.lib oldif32.lib olutil32.lib ws2_32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\libraries\Release" # ADD BASE LINK32 oldap32.lib olber32.lib oldif32.lib olutil32.lib ws2_32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\libraries\Release"
# ADD LINK32 ws2_32.lib /nologo /subsystem:console /machine:I386 /out:"SRelease/ldapmodify.exe" /libpath:"..\..\SRelease" # ADD LINK32 sasl.lib libsasl.lib ws2_32.lib /nologo /subsystem:console /machine:I386 /out:"SRelease/ldapmodify.exe" /libpath:"..\..\SRelease"
!ELSEIF "$(CFG)" == "ldapmodify - Win32 Debug" !ELSEIF "$(CFG)" == "ldapmodify - Win32 Debug"
@ -106,7 +106,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo # ADD BSC32 /nologo
LINK32=link.exe LINK32=link.exe
# ADD BASE LINK32 ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /out:"Release/ldapmodify.exe" /pdbtype:sept /libpath:"..\..\libraries\Debug" # ADD BASE LINK32 ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /out:"Release/ldapmodify.exe" /pdbtype:sept /libpath:"..\..\libraries\Debug"
# ADD LINK32 ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /out:"Debug/ldapmodify.exe" /pdbtype:sept /libpath:"..\..\Debug" # ADD LINK32 libsasl.lib ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /out:"Debug/ldapmodify.exe" /pdbtype:sept /libpath:"..\..\Debug"
!ELSEIF "$(CFG)" == "ldapmodify - Win32 Release" !ELSEIF "$(CFG)" == "ldapmodify - Win32 Release"
@ -131,7 +131,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo # ADD BSC32 /nologo
LINK32=link.exe LINK32=link.exe
# ADD BASE LINK32 ws2_32.lib /nologo /subsystem:console /machine:I386 /out:"Release/ldapmodify.exe" /libpath:"..\..\libraries\Release" # ADD BASE LINK32 ws2_32.lib /nologo /subsystem:console /machine:I386 /out:"Release/ldapmodify.exe" /libpath:"..\..\libraries\Release"
# ADD LINK32 ws2_32.lib /nologo /subsystem:console /machine:I386 /out:"Release/ldapmodify.exe" /libpath:"..\..\Release" # ADD LINK32 sasl.lib libsasl.lib ws2_32.lib /nologo /subsystem:console /machine:I386 /out:"Release/ldapmodify.exe" /libpath:"..\..\Release"
!ENDIF !ENDIF

View file

@ -56,7 +56,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo # ADD BSC32 /nologo
LINK32=link.exe LINK32=link.exe
# ADD BASE LINK32 oldap32.lib olber32.lib olutil32.lib ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\libraries\Debug" # ADD BASE LINK32 oldap32.lib olber32.lib olutil32.lib ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\libraries\Debug"
# ADD LINK32 ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\SDebug" # ADD LINK32 libsasl.lib ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\SDebug"
!ELSEIF "$(CFG)" == "ldapmodrdn - Win32 Single Release" !ELSEIF "$(CFG)" == "ldapmodrdn - Win32 Single Release"
@ -81,7 +81,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo # ADD BSC32 /nologo
LINK32=link.exe LINK32=link.exe
# ADD BASE LINK32 oldap32.lib olber32.lib olutil32.lib ws2_32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\libraries\Release" # ADD BASE LINK32 oldap32.lib olber32.lib olutil32.lib ws2_32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\libraries\Release"
# ADD LINK32 ws2_32.lib /nologo /subsystem:console /machine:I386 /out:"Release/ldapmodrdn.exe" /libpath:"..\..\SRelease" # ADD LINK32 sasl.lib libsasl.lib ws2_32.lib /nologo /subsystem:console /machine:I386 /out:"Release/ldapmodrdn.exe" /libpath:"..\..\SRelease"
!ELSEIF "$(CFG)" == "ldapmodrdn - Win32 Debug" !ELSEIF "$(CFG)" == "ldapmodrdn - Win32 Debug"
@ -106,7 +106,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo # ADD BSC32 /nologo
LINK32=link.exe LINK32=link.exe
# ADD BASE LINK32 ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\libraries\Debug" # ADD BASE LINK32 ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\libraries\Debug"
# ADD LINK32 ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\Debug" # ADD LINK32 libsasl.lib ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\Debug"
!ELSEIF "$(CFG)" == "ldapmodrdn - Win32 Release" !ELSEIF "$(CFG)" == "ldapmodrdn - Win32 Release"
@ -131,7 +131,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo # ADD BSC32 /nologo
LINK32=link.exe LINK32=link.exe
# ADD BASE LINK32 ws2_32.lib /nologo /subsystem:console /machine:I386 /out:"Release/ldapmodrdn.exe" /libpath:"..\..\libraries\Release" # ADD BASE LINK32 ws2_32.lib /nologo /subsystem:console /machine:I386 /out:"Release/ldapmodrdn.exe" /libpath:"..\..\libraries\Release"
# ADD LINK32 ws2_32.lib /nologo /subsystem:console /machine:I386 /out:"Release/ldapmodrdn.exe" /libpath:"..\..\Release" # ADD LINK32 sasl.lib libsasl.lib ws2_32.lib /nologo /subsystem:console /machine:I386 /out:"Release/ldapmodrdn.exe" /libpath:"..\..\Release"
!ENDIF !ENDIF

View file

@ -55,7 +55,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo # ADD BSC32 /nologo
LINK32=link.exe LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:console /machine:I386 # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:console /machine:I386
# ADD LINK32 ws2_32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\Release" # ADD LINK32 sasl.lib libsasl.lib ws2_32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\Release"
!ELSEIF "$(CFG)" == "ldappasswd - Win32 Debug" !ELSEIF "$(CFG)" == "ldappasswd - Win32 Debug"
@ -79,7 +79,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo # ADD BSC32 /nologo
LINK32=link.exe LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
# ADD LINK32 ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\Debug" # ADD LINK32 libsasl.lib ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\Debug"
!ELSEIF "$(CFG)" == "ldappasswd - Win32 Single Debug" !ELSEIF "$(CFG)" == "ldappasswd - Win32 Single Debug"
@ -103,7 +103,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo # ADD BSC32 /nologo
LINK32=link.exe LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
# ADD LINK32 ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\SDebug" # ADD LINK32 libsasl.lib ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\SDebug"
!ELSEIF "$(CFG)" == "ldappasswd - Win32 Single Release" !ELSEIF "$(CFG)" == "ldappasswd - Win32 Single Release"
@ -127,7 +127,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo # ADD BSC32 /nologo
LINK32=link.exe LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:console /machine:I386 # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:console /machine:I386
# ADD LINK32 ws2_32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\SRelease" # ADD LINK32 sasl.lib libsasl.lib ws2_32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\SRelease"
!ENDIF !ENDIF

View file

@ -56,7 +56,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo # ADD BSC32 /nologo
LINK32=link.exe LINK32=link.exe
# ADD BASE LINK32 oldap32.lib olber32.lib oldif32.lib olutil32.lib ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\libraries\Debug" # ADD BASE LINK32 oldap32.lib olber32.lib oldif32.lib olutil32.lib ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\libraries\Debug"
# ADD LINK32 ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\SDebug" # ADD LINK32 libsasl.lib ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\SDebug"
!ELSEIF "$(CFG)" == "ldapsearch - Win32 Single Release" !ELSEIF "$(CFG)" == "ldapsearch - Win32 Single Release"
@ -81,7 +81,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo # ADD BSC32 /nologo
LINK32=link.exe LINK32=link.exe
# ADD BASE LINK32 oldap32.lib olber32.lib oldif32.lib olutil32.lib ws2_32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\libraries\Release" # ADD BASE LINK32 oldap32.lib olber32.lib oldif32.lib olutil32.lib ws2_32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\libraries\Release"
# ADD LINK32 ws2_32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\SRelease" # ADD LINK32 sasl.lib libsasl.lib ws2_32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\SRelease"
!ELSEIF "$(CFG)" == "ldapsearch - Win32 Release" !ELSEIF "$(CFG)" == "ldapsearch - Win32 Release"
@ -106,7 +106,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo # ADD BSC32 /nologo
LINK32=link.exe LINK32=link.exe
# ADD BASE LINK32 ws2_32.lib /nologo /subsystem:console /machine:I386 /out:"Release/ldapsearch.exe" /libpath:"..\..\libraries\SRelease" # ADD BASE LINK32 ws2_32.lib /nologo /subsystem:console /machine:I386 /out:"Release/ldapsearch.exe" /libpath:"..\..\libraries\SRelease"
# ADD LINK32 ws2_32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\Release" # ADD LINK32 sasl.lib libsasl.lib ws2_32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\Release"
!ELSEIF "$(CFG)" == "ldapsearch - Win32 Debug" !ELSEIF "$(CFG)" == "ldapsearch - Win32 Debug"
@ -131,7 +131,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo # ADD BSC32 /nologo
LINK32=link.exe LINK32=link.exe
# ADD BASE LINK32 ws2_32.lib /nologo /subsystem:console /machine:I386 /out:"Release/ldapsearch.exe" /libpath:"..\..\libraries\SRelease" # ADD BASE LINK32 ws2_32.lib /nologo /subsystem:console /machine:I386 /out:"Release/ldapsearch.exe" /libpath:"..\..\libraries\SRelease"
# ADD LINK32 ws2_32.lib /nologo /subsystem:console /incremental:yes /debug /machine:I386 /libpath:"..\..\Debug" # ADD LINK32 libsasl.lib ws2_32.lib /nologo /subsystem:console /incremental:yes /debug /machine:I386 /libpath:"..\..\Debug"
!ENDIF !ENDIF

View file

@ -52,7 +52,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo # ADD BSC32 /nologo
LINK32=link.exe LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:console /machine:I386 # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:console /machine:I386
# ADD LINK32 oldap32.lib olber32.lib oldif32.lib olutil32.lib ws2_32.lib hs_regex.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\Release" # ADD LINK32 oldap32.lib olber32.lib oldif32.lib olutil32.lib hs_regex.lib sasl.lib libsasl.lib ws2_32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\Release"
!ELSEIF "$(CFG)" == "ud - Win32 Debug" !ELSEIF "$(CFG)" == "ud - Win32 Debug"
@ -76,7 +76,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo # ADD BSC32 /nologo
LINK32=link.exe LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
# ADD LINK32 oldap32.lib olber32.lib oldif32.lib olutil32.lib ws2_32.lib hs_regex.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\Debug" # ADD LINK32 oldap32.lib olber32.lib oldif32.lib olutil32.lib hs_regex.lib libsasl.lib ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\Debug"
!ELSEIF "$(CFG)" == "ud - Win32 Single Release" !ELSEIF "$(CFG)" == "ud - Win32 Single Release"
@ -101,7 +101,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo # ADD BSC32 /nologo
LINK32=link.exe LINK32=link.exe
# ADD BASE LINK32 oldap32.lib olber32.lib oldif32.lib olutil32.lib ws2_32.lib hs_regex.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\libraries\Release" # ADD BASE LINK32 oldap32.lib olber32.lib oldif32.lib olutil32.lib ws2_32.lib hs_regex.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\libraries\Release"
# ADD LINK32 oldap32.lib olber32.lib oldif32.lib olutil32.lib ws2_32.lib hs_regex.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\SRelease" # ADD LINK32 oldap32.lib olber32.lib oldif32.lib olutil32.lib hs_regex.lib sasl.lib libsasl.lib ws2_32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\SRelease"
!ELSEIF "$(CFG)" == "ud - Win32 Single Debug" !ELSEIF "$(CFG)" == "ud - Win32 Single Debug"
@ -126,7 +126,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo # ADD BSC32 /nologo
LINK32=link.exe LINK32=link.exe
# ADD BASE LINK32 oldap32.lib olber32.lib oldif32.lib olutil32.lib ws2_32.lib hs_regex.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\libraries\Debug" # ADD BASE LINK32 oldap32.lib olber32.lib oldif32.lib olutil32.lib ws2_32.lib hs_regex.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\libraries\Debug"
# ADD LINK32 oldap32.lib olber32.lib oldif32.lib olutil32.lib ws2_32.lib hs_regex.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\SDebug" # ADD LINK32 oldap32.lib olber32.lib oldif32.lib olutil32.lib hs_regex.lib libsasl.lib ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\SDebug"
!ENDIF !ENDIF

View file

@ -9,7 +9,8 @@ or to cite them other than as "work in progress."
OpenLDAP maintains copies of drafts for which we have and/or OpenLDAP maintains copies of drafts for which we have and/or
are planning "experimental" implementations of. The I-D are planning "experimental" implementations of. The I-D
found in this directory may be stale. found in this directory may be stale, expired, or otherwise
out of date.
Please refer to http://www.ietf.org/ for latest revisions (and Please refer to http://www.ietf.org/ for latest revisions (and
status). status).

View file

@ -202,7 +202,7 @@ Please try again later.\r\n"
/* default timelimit to spend on a search */ /* default timelimit to spend on a search */
#define SLAPD_DEFAULT_TIMELIMIT 3600 #define SLAPD_DEFAULT_TIMELIMIT 3600
/* minimum max ids that a single index entry can map to in ldbm */ /* minimum max ids that a single index entry can map to in ldbm */
#define SLAPD_LDBM_MIN_MAXIDS 4000 #define SLAPD_LDBM_MIN_MAXIDS (8192-4)
/* the following DNs must be normalized! */ /* the following DNs must be normalized! */
/* dn of the special "schema" entry */ /* dn of the special "schema" entry */

View file

@ -21,6 +21,9 @@
#define SLAPD_SCHEMA_NOT_COMPAT 1 #define SLAPD_SCHEMA_NOT_COMPAT 1
#endif #endif
/* comment this out if you don't have Cyrus SASL */
#define HAVE_CYRUS_SASL 1
/* --------------------------------------------------- */ /* --------------------------------------------------- */
/* begin of MSVC5 specific entries */ /* begin of MSVC5 specific entries */
@ -277,7 +280,7 @@ typedef signed int ssize_t;
#define SLAPD_LDBM 1 #define SLAPD_LDBM 1
/* define this to use SLAPD SQL backend */ /* define this to use SLAPD SQL backend */
#define SLAPD_SQL 1 /* #undef SLAPD_SQL */
/* define this to use SLAPD passwd backend */ /* define this to use SLAPD passwd backend */
/* #undef SLAPD_PASSWD */ /* #undef SLAPD_PASSWD */

View file

@ -53,7 +53,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo # ADD BSC32 /nologo
LINK32=link.exe LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
# ADD LINK32 oldap32.lib olber32.lib ws2_32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\Release" # ADD LINK32 oldap32.lib olber32.lib sasl.lib libsasl.lib ws2_32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\Release"
!ELSEIF "$(CFG)" == "apitest - Win32 Debug" !ELSEIF "$(CFG)" == "apitest - Win32 Debug"
@ -77,7 +77,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo # ADD BSC32 /nologo
LINK32=link.exe LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
# ADD LINK32 oldap32.lib olber32.lib ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\Debug" # ADD LINK32 oldap32.lib olber32.lib libsasl.lib ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\Debug"
!ELSEIF "$(CFG)" == "apitest - Win32 Single Debug" !ELSEIF "$(CFG)" == "apitest - Win32 Single Debug"
@ -102,7 +102,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo # ADD BSC32 /nologo
LINK32=link.exe LINK32=link.exe
# ADD BASE LINK32 oldap32.lib olber32.lib ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\Debug" # ADD BASE LINK32 oldap32.lib olber32.lib ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\Debug"
# ADD LINK32 oldap32.lib olber32.lib ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\SDebug" # ADD LINK32 oldap32.lib olber32.lib libsasl.lib ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\SDebug"
!ELSEIF "$(CFG)" == "apitest - Win32 Single Release" !ELSEIF "$(CFG)" == "apitest - Win32 Single Release"
@ -127,7 +127,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo # ADD BSC32 /nologo
LINK32=link.exe LINK32=link.exe
# ADD BASE LINK32 oldap32.lib olber32.lib ws2_32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\Release" # ADD BASE LINK32 oldap32.lib olber32.lib ws2_32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\Release"
# ADD LINK32 oldap32.lib olber32.lib ws2_32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\SRelease" # ADD LINK32 oldap32.lib olber32.lib sasl.lib libsasl.lib ws2_32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\SRelease"
!ENDIF !ENDIF

View file

@ -53,7 +53,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo # ADD BSC32 /nologo
LINK32=link.exe LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
# ADD LINK32 hs_regex.lib ws2_32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\Release" # ADD LINK32 libsasl.lib hs_regex.lib ws2_32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\Release"
!ELSEIF "$(CFG)" == "ltest - Win32 Debug" !ELSEIF "$(CFG)" == "ltest - Win32 Debug"
@ -77,7 +77,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo # ADD BSC32 /nologo
LINK32=link.exe LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
# ADD LINK32 hs_regex.lib ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\Debug" # ADD LINK32 libsasl.lib hs_regex.lib ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\Debug"
!ELSEIF "$(CFG)" == "ltest - Win32 Single Release" !ELSEIF "$(CFG)" == "ltest - Win32 Single Release"
@ -101,7 +101,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo # ADD BSC32 /nologo
LINK32=link.exe LINK32=link.exe
# ADD BASE LINK32 oldap32.lib olber32.lib olutil32.lib hs_regex.lib ws2_32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\Release" # ADD BASE LINK32 oldap32.lib olber32.lib olutil32.lib hs_regex.lib ws2_32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\Release"
# ADD LINK32 hs_regex.lib ws2_32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\SRelease" # ADD LINK32 libsasl.lib hs_regex.lib ws2_32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\SRelease"
!ELSEIF "$(CFG)" == "ltest - Win32 Single Debug" !ELSEIF "$(CFG)" == "ltest - Win32 Single Debug"
@ -125,7 +125,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo # ADD BSC32 /nologo
LINK32=link.exe LINK32=link.exe
# ADD BASE LINK32 oldap32.lib olber32.lib olutil32.lib hs_regex.lib ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\Debug" # ADD BASE LINK32 oldap32.lib olber32.lib olutil32.lib hs_regex.lib ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\Debug"
# ADD LINK32 hs_regex.lib ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\SDebug" # ADD LINK32 libsasl.lib hs_regex.lib ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\SDebug"
!ENDIF !ENDIF

View file

@ -232,7 +232,6 @@ static int
bind_prompt( LDAP *ld, LDAP_CONST char *url, int request, ber_int_t msgid) bind_prompt( LDAP *ld, LDAP_CONST char *url, int request, ber_int_t msgid)
{ {
static char dn[256], passwd[256]; static char dn[256], passwd[256];
char *dnp;
int authmethod; int authmethod;
printf("rebind for request=%d msgid=%ld url=%s\n", printf("rebind for request=%d msgid=%ld url=%s\n",

View file

@ -54,7 +54,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo # ADD BSC32 /nologo
LINK32=link.exe LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
# ADD LINK32 ws2_32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\Release" # ADD LINK32 sasl.lib libsasl.lib ws2_32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\Release"
!ELSEIF "$(CFG)" == "apitest_r - Win32 Debug" !ELSEIF "$(CFG)" == "apitest_r - Win32 Debug"
@ -78,7 +78,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo # ADD BSC32 /nologo
LINK32=link.exe LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
# ADD LINK32 ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\Debug" # ADD LINK32 libsasl.lib ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\Debug"
!ELSEIF "$(CFG)" == "apitest_r - Win32 Single Debug" !ELSEIF "$(CFG)" == "apitest_r - Win32 Single Debug"
@ -103,7 +103,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo # ADD BSC32 /nologo
LINK32=link.exe LINK32=link.exe
# ADD BASE LINK32 oldap_r.lib olber32.lib ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\Debug" # ADD BASE LINK32 oldap_r.lib olber32.lib ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\Debug"
# ADD LINK32 ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\SDebug" # ADD LINK32 libsasl.lib ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\SDebug"
!ELSEIF "$(CFG)" == "apitest_r - Win32 Single Release" !ELSEIF "$(CFG)" == "apitest_r - Win32 Single Release"
@ -128,7 +128,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo # ADD BSC32 /nologo
LINK32=link.exe LINK32=link.exe
# ADD BASE LINK32 oldap_r.lib olber32.lib ws2_32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\Release" # ADD BASE LINK32 oldap_r.lib olber32.lib ws2_32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\Release"
# ADD LINK32 ws2_32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\SRelease" # ADD LINK32 sasl.lib libsasl.lib ws2_32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\SRelease"
!ENDIF !ENDIF

View file

@ -42,6 +42,7 @@ RSC=rc.exe
# PROP Use_Debug_Libraries 0 # PROP Use_Debug_Libraries 0
# PROP Output_Dir "..\..\Release" # PROP Output_Dir "..\..\Release"
# PROP Intermediate_Dir "..\..\Release\ltest_r" # PROP Intermediate_Dir "..\..\Release\ltest_r"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir "" # PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c # ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
@ -52,7 +53,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo # ADD BSC32 /nologo
LINK32=link.exe LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
# ADD LINK32 oldap32.lib olber32.lib olutil32.lib hs_regex.lib ws2_32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\Release" # ADD LINK32 oldap32.lib olber32.lib olutil32.lib libsasl.lib hs_regex.lib ws2_32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\Release"
!ELSEIF "$(CFG)" == "ltest_r - Win32 Debug" !ELSEIF "$(CFG)" == "ltest_r - Win32 Debug"
@ -65,6 +66,7 @@ LINK32=link.exe
# PROP Use_Debug_Libraries 1 # PROP Use_Debug_Libraries 1
# PROP Output_Dir "..\..\Debug" # PROP Output_Dir "..\..\Debug"
# PROP Intermediate_Dir "..\..\Debug\ltest_r" # PROP Intermediate_Dir "..\..\Debug\ltest_r"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir "" # PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c # ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
# ADD CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /I "..\..\include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /c # ADD CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /I "..\..\include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /c
@ -75,7 +77,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo # ADD BSC32 /nologo
LINK32=link.exe LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
# ADD LINK32 oldap32.lib olber32.lib olutil32.lib hs_regex.lib ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\Debug" # ADD LINK32 oldap32.lib olber32.lib olutil32.lib libsasl.lib hs_regex.lib ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\Debug"
!ELSEIF "$(CFG)" == "ltest_r - Win32 Single Debug" !ELSEIF "$(CFG)" == "ltest_r - Win32 Single Debug"
@ -88,6 +90,7 @@ LINK32=link.exe
# PROP Use_Debug_Libraries 1 # PROP Use_Debug_Libraries 1
# PROP Output_Dir "..\..\SDebug" # PROP Output_Dir "..\..\SDebug"
# PROP Intermediate_Dir "..\..\SDebug\ltest_r" # PROP Intermediate_Dir "..\..\SDebug\ltest_r"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir "" # PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /I "..\..\include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c # ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /I "..\..\include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
# ADD CPP /nologo /W3 /Gm /GX /Zi /Od /I "..\..\include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /c # ADD CPP /nologo /W3 /Gm /GX /Zi /Od /I "..\..\include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /c
@ -98,7 +101,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo # ADD BSC32 /nologo
LINK32=link.exe LINK32=link.exe
# ADD BASE LINK32 oldap32.lib olber32.lib olutil32.lib hs_regex.lib ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\Debug" # ADD BASE LINK32 oldap32.lib olber32.lib olutil32.lib hs_regex.lib ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\Debug"
# ADD LINK32 oldap32.lib olber32.lib olutil32.lib hs_regex.lib ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\SDebug" # ADD LINK32 oldap32.lib olber32.lib olutil32.lib libsasl.lib hs_regex.lib ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\SDebug"
!ELSEIF "$(CFG)" == "ltest_r - Win32 Single Release" !ELSEIF "$(CFG)" == "ltest_r - Win32 Single Release"
@ -111,6 +114,7 @@ LINK32=link.exe
# PROP Use_Debug_Libraries 0 # PROP Use_Debug_Libraries 0
# PROP Output_Dir "..\..\SRelease" # PROP Output_Dir "..\..\SRelease"
# PROP Intermediate_Dir "..\..\SRelease\ltest_r" # PROP Intermediate_Dir "..\..\SRelease\ltest_r"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir "" # PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /I "..\..\include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c # ADD BASE CPP /nologo /W3 /GX /O2 /I "..\..\include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
# ADD CPP /nologo /W3 /GX /O2 /I "..\..\include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c # ADD CPP /nologo /W3 /GX /O2 /I "..\..\include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
@ -121,7 +125,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo # ADD BSC32 /nologo
LINK32=link.exe LINK32=link.exe
# ADD BASE LINK32 oldap32.lib olber32.lib olutil32.lib hs_regex.lib ws2_32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\Release" # ADD BASE LINK32 oldap32.lib olber32.lib olutil32.lib hs_regex.lib ws2_32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\Release"
# ADD LINK32 oldap32.lib olber32.lib olutil32.lib hs_regex.lib ws2_32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\SRelease" # ADD LINK32 oldap32.lib olber32.lib olutil32.lib libsasl.lib hs_regex.lib ws2_32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\SRelease"
!ENDIF !ENDIF

View file

@ -31,9 +31,6 @@ ucgendat: $(LIBRARY) ucgendat.o
$(XXSRCS) : .links $(XXSRCS) : .links
clean-local: FORCE clean-local: FORCE
@for i in $(XXSRCS) $(XXHEADERS); do \
$(RM) $$i ; \
done
@$(RM) .links @$(RM) .links
depend-common: .links depend-common: .links

View file

@ -17,7 +17,7 @@ SRCS = main.c daemon.c connection.c search.c filter.c add.c charray.c \
repl.c lock.c controls.c extended.c kerberos.c passwd.c \ repl.c lock.c controls.c extended.c kerberos.c passwd.c \
schema.c schema_check.c schema_init.c schema_prep.c \ schema.c schema_check.c schema_init.c schema_prep.c \
schemaparse.c ad.c at.c mr.c syntax.c oc.c \ schemaparse.c ad.c at.c mr.c syntax.c oc.c \
monitor.c configinfo.c starttls.c \ monitor.c configinfo.c starttls.c index.c \
root_dse.c sasl.c module.c suffixalias.c $(@PLAT@_SRCS) root_dse.c sasl.c module.c suffixalias.c $(@PLAT@_SRCS)
OBJS = main.o daemon.o connection.o search.o filter.o add.o charray.o \ OBJS = main.o daemon.o connection.o search.o filter.o add.o charray.o \
@ -28,7 +28,7 @@ OBJS = main.o daemon.o connection.o search.o filter.o add.o charray.o \
repl.o lock.o controls.o extended.o kerberos.o passwd.o \ repl.o lock.o controls.o extended.o kerberos.o passwd.o \
schema.o schema_check.o schema_init.o schema_prep.o \ schema.o schema_check.o schema_init.o schema_prep.o \
schemaparse.o ad.o at.o mr.o syntax.o oc.o \ schemaparse.o ad.o at.o mr.o syntax.o oc.o \
monitor.o configinfo.o starttls.o \ monitor.o configinfo.o starttls.o index.o \
root_dse.o sasl.o module.o suffixalias.o $(@PLAT@_OBJS) root_dse.o sasl.o module.o suffixalias.o $(@PLAT@_OBJS)
LDAP_INCDIR= ../../include LDAP_INCDIR= ../../include

View file

@ -149,6 +149,7 @@ int slap_bv2ad(
*text = "multiple language tag options specified"; *text = "multiple language tag options specified";
goto done; goto done;
} }
desc.ad_lang = tokens[i]; desc.ad_lang = tokens[i];
/* normalize to all lower case, it's easy */ /* normalize to all lower case, it's easy */

View file

@ -3,12 +3,12 @@
SRCS = idl.c add.c search.c cache.c dbcache.c dn2id.c entry.c id2entry.c \ SRCS = idl.c add.c search.c cache.c dbcache.c dn2id.c entry.c id2entry.c \
index.c id2children.c nextid.c abandon.c compare.c group.c \ index.c id2children.c nextid.c abandon.c compare.c group.c \
modify.c modrdn.c delete.c init.c config.c bind.c attr.c \ modify.c modrdn.c delete.c init.c config.c bind.c attr.c \
filterindex.c unbind.c close.c alias.c tools.c \ filterindex.c unbind.c close.c alias.c tools.c key.c \
extended.c passwd.c sasl.c extended.c passwd.c sasl.c
OBJS = idl.lo add.lo search.lo cache.lo dbcache.lo dn2id.lo entry.lo id2entry.lo \ OBJS = idl.lo add.lo search.lo cache.lo dbcache.lo dn2id.lo entry.lo id2entry.lo \
index.lo id2children.lo nextid.lo abandon.lo compare.lo group.lo \ index.lo id2children.lo nextid.lo abandon.lo compare.lo group.lo \
modify.lo modrdn.lo delete.lo init.lo config.lo bind.lo attr.lo \ modify.lo modrdn.lo delete.lo init.lo config.lo bind.lo attr.lo \
filterindex.lo unbind.lo close.lo alias.lo tools.lo \ filterindex.lo unbind.lo close.lo alias.lo tools.lo key.lo \
extended.lo passwd.lo sasl.lo extended.lo passwd.lo sasl.lo
LDAP_INCDIR= ../../../include LDAP_INCDIR= ../../../include

View file

@ -223,14 +223,9 @@ ldbm_back_add(
rc = -1; rc = -1;
/*
* Add the entry to the attribute indexes, then add it to
* the id2children index, dn2id index, and the id2entry index.
*/
/* attribute indexes */ /* attribute indexes */
if ( index_add_entry( be, e ) != 0 ) { if ( index_entry_add( be, e, e->e_attrs ) != LDAP_SUCCESS ) {
Debug( LDAP_DEBUG_TRACE, "index_add_entry failed\n", 0, Debug( LDAP_DEBUG_TRACE, "index_entry_add failed\n", 0,
0, 0 ); 0, 0 );
send_ldap_result( conn, op, LDAP_OTHER, send_ldap_result( conn, op, LDAP_OTHER,
NULL, "index generation failed", NULL, NULL ); NULL, "index generation failed", NULL, NULL );

View file

@ -15,19 +15,32 @@
#include "slap.h" #include "slap.h"
#include "back-ldbm.h" #include "back-ldbm.h"
/* for the cache of attribute information (which are indexed, etc.) */ /* for the cache of attribute information (which are indexed, etc.) */
typedef struct ldbm_attrinfo { typedef struct ldbm_attrinfo {
char *ai_type; /* type name (cn, sn, ...) */ #ifdef SLAPD_USE_AD
int ai_indexmask; /* how the attr is indexed */ AttributeDescription *ai_desc; /* attribute description cn;lang-en */
#else
char *ai_desc;
#endif
slap_index ai_indexmask; /* how the attr is indexed */
} AttrInfo; } AttrInfo;
static int static int
ainfo_type_cmp( ainfo_type_cmp(
char *type, #ifdef SLAPD_USE_AD
AttributeDescription *desc,
#else
char *desc,
#endif
AttrInfo *a AttrInfo *a
) )
{ {
return( strcasecmp( type, a->ai_type ) ); #ifdef SLAPD_USE_AD
return ad_cmp( desc, a->ai_desc );
#else
return( strcasecmp( desc, a->ai_desc ) );
#endif
} }
static int static int
@ -36,150 +49,193 @@ ainfo_cmp(
AttrInfo *b AttrInfo *b
) )
{ {
return( strcasecmp( a->ai_type, b->ai_type ) ); #ifdef SLAPD_USE_AD
} return ad_cmp( a->ai_desc, b->ai_desc );
#else
/* return( strcasecmp( a->ai_desc, b->ai_desc ) );
* Called when a duplicate "index" line is encountered. #endif
*
* returns 1 => original from init code, indexmask updated
* 2 => original not from init code, warn the user
*/
static int
ainfo_dup(
AttrInfo *a,
AttrInfo *b
)
{
/*
* if the duplicate definition is because we initialized the attr,
* just add what came from the config file. otherwise, complain.
*/
if ( a->ai_indexmask & SLAP_INDEX_FROMINIT ) {
a->ai_indexmask |= b->ai_indexmask;
return( 1 );
}
return( 2 );
} }
void void
attr_mask( attr_mask(
struct ldbminfo *li, struct ldbminfo *li,
const char *type, #ifdef SLAPD_USE_AD
int *indexmask ) AttributeDescription *desc,
#else
const char *desc,
#endif
slap_index *indexmask )
{ {
AttrInfo *a; AttrInfo *a;
*indexmask = 0; a = (AttrInfo *) avl_find( li->li_attrs, desc,
if ( (a = (AttrInfo *) avl_find( li->li_attrs, type, (AVL_CMP) ainfo_type_cmp );
(AVL_CMP) ainfo_type_cmp )) == NULL ) {
if ( (a = (AttrInfo *) avl_find( li->li_attrs, "default", *indexmask = a != NULL ? a->ai_indexmask : 0;
(AVL_CMP) ainfo_type_cmp )) == NULL ) {
return;
}
}
*indexmask = a->ai_indexmask;
} }
void int
attr_index_config( attr_index_config(
struct ldbminfo *li, struct ldbminfo *li,
const char *fname, const char *fname,
int lineno, int lineno,
int argc, int argc,
char **argv, char **argv,
int init int init )
)
{ {
int i, j; int rc;
char **attrs, **indexes; int i;
AttrInfo *a; slap_index mask;
char **attrs;
char **indexes = NULL;
attrs = str2charray( argv[0], "," ); attrs = str2charray( argv[0], "," );
if( attrs == NULL ) {
fprintf( stderr, "%s: line %d: "
"no attributes specified: %s\n",
fname, lineno, argv[0] );
return LDAP_PARAM_ERROR;
}
if ( argc > 1 ) { if ( argc > 1 ) {
indexes = str2charray( argv[1], "," ); indexes = str2charray( argv[1], "," );
if( indexes == NULL ) {
fprintf( stderr, "%s: line %d: "
"no indexes specified: %s\n",
fname, lineno, argv[1] );
return LDAP_PARAM_ERROR;
}
} }
for ( i = 0; attrs[i] != NULL; i++ ) {
a = (AttrInfo *) ch_malloc( sizeof(AttrInfo) );
a->ai_type = ch_strdup( attrs[i] );
if ( argc == 1 ) { if( indexes == NULL ) {
a->ai_indexmask = ( mask = li->li_defaultmask;
SLAP_INDEX_PRESENCE | SLAP_INDEX_EQUALITY |
SLAP_INDEX_APPROX | SLAP_INDEX_SUBSTR);
} else {
a->ai_indexmask = 0;
for ( j = 0; indexes[j] != NULL; j++ ) {
if ( strncasecmp( indexes[j],
"pres", sizeof("pres")-1 ) == 0 )
{
a->ai_indexmask |= SLAP_INDEX_PRESENCE;
} else if ( strncasecmp( indexes[j], } else {
"eq", sizeof("eq")-1 ) == 0 ) mask = 0;
{
a->ai_indexmask |= SLAP_INDEX_EQUALITY;
} else if ( strncasecmp( indexes[j], for ( i = 0; indexes[i] != NULL; i++ ) {
"approx", sizeof("approx")-1 ) == 0 ) slap_index index;
{ rc = slap_str2index( indexes[i], &index );
a->ai_indexmask |= SLAP_INDEX_APPROX;
} else if ( strncasecmp( indexes[j], if( rc != LDAP_SUCCESS ) {
"sub", sizeof("sub")-1 ) == 0 ) fprintf( stderr, "%s: line %d: "
{ "index type \"%s\" undefined\n",
a->ai_indexmask |= SLAP_INDEX_SUBSTR; fname, lineno, indexes[i] );
return LDAP_PARAM_ERROR;
} else if ( strncasecmp( indexes[j],
"none", sizeof("none")-1 ) == 0 )
{
if ( a->ai_indexmask != 0 ) {
fprintf( stderr, "%s: line %d: "
"index type \"none\" cannot be combined with other types\n",
fname, lineno );
}
a->ai_indexmask = 0;
} else {
fprintf( stderr, "%s: line %d: "
"unknown index type \"%s\" (ignored)\n",
fname, lineno, indexes[j] );
fprintf( stderr, "\tvalid index types are "
"\"pres\", \"eq\", \"approx\", or \"sub\"\n" );
}
} }
}
if ( init ) { mask |= index;
a->ai_indexmask |= SLAP_INDEX_FROMINIT;
}
switch (avl_insert( &li->li_attrs, (caddr_t) a,
(AVL_CMP) ainfo_cmp, (AVL_DUP) ainfo_dup ))
{
case 1: /* duplicate - updating init version */
free( a->ai_type );
free( (char *) a );
break;
case 2: /* user duplicate - ignore and warn */
fprintf( stderr,
"%s: line %d: duplicate index definition for attr \"%s\" (ignored)\n",
fname, lineno, a->ai_type );
free( a->ai_type );
free( (char *) a );
break;
default:; /* inserted ok */
/* FALL */
} }
} }
if( !mask ) {
fprintf( stderr, "%s: line %d: "
"no indexes selected\n",
fname, lineno );
return LDAP_PARAM_ERROR;
}
for ( i = 0; attrs[i] != NULL; i++ ) {
AttrInfo *a;
#ifdef SLAPD_SCHEMA_NOT_COMPAT
AttributeDescription *ad;
const char *text;
#endif
if( strcasecmp( attrs[i], "default" ) == 0 ) {
li->li_defaultmask = mask;
continue;
}
a = (AttrInfo *) ch_malloc( sizeof(AttrInfo) );
#ifdef SLAPD_SCHEMA_NOT_COMPAT
ad = NULL;
rc = slap_str2ad( attrs[i], &ad, &text );
if( rc != LDAP_SUCCESS ) {
fprintf( stderr, "%s: line %d: "
"index attribute \"%s\" undefined\n",
fname, lineno, attrs[i] );
return rc;
}
if( slap_ad_is_binary( ad ) ) {
fprintf( stderr, "%s: line %d: "
"index of attribute \"%s\" disallowed\n",
fname, lineno, attrs[i] );
return LDAP_UNWILLING_TO_PERFORM;
}
if( IS_SLAP_INDEX( mask, SLAP_INDEX_APPROX ) && !(
( ad->ad_type->sat_approx
&& ad->ad_type->sat_approx->smr_indexer
&& ad->ad_type->sat_approx->smr_filter )
&& ( ad->ad_type->sat_equality
&& ad->ad_type->sat_equality->smr_indexer
&& ad->ad_type->sat_equality->smr_filter ) ) )
{
fprintf( stderr, "%s: line %d: "
"approx index of attribute \"%s\" disallowed\n",
fname, lineno, attrs[i] );
return LDAP_INAPPROPRIATE_MATCHING;
}
if( IS_SLAP_INDEX( mask, SLAP_INDEX_EQUALITY ) && !(
ad->ad_type->sat_equality
&& ad->ad_type->sat_equality->smr_indexer
&& ad->ad_type->sat_equality->smr_filter ) )
{
fprintf( stderr, "%s: line %d: "
"equality index of attribute \"%s\" disallowed\n",
fname, lineno, attrs[i] );
return LDAP_INAPPROPRIATE_MATCHING;
}
if( IS_SLAP_INDEX( mask, SLAP_INDEX_SUBSTR ) && !(
ad->ad_type->sat_substr
&& ad->ad_type->sat_substr->smr_indexer
&& ad->ad_type->sat_substr->smr_filter ) )
{
fprintf( stderr, "%s: line %d: "
"substr index of attribute \"%s\" disallowed\n",
fname, lineno, attrs[i] );
return LDAP_INAPPROPRIATE_MATCHING;
}
Debug( LDAP_DEBUG_CONFIG, "index %s 0x%04x\n",
ad->ad_cname->bv_val, mask, 0 );
#ifdef SLAPD_USE_AD
a->ai_desc = ad;
#else
a->ai_desc = ch_strdup( ad->ad_cname->bv_val );
ad_free( ad, 1 );
#endif
#else
a->ai_desc = ch_strdup( attrs[i] );
#endif
a->ai_indexmask = mask;
rc = avl_insert( &li->li_attrs, (caddr_t) a,
(AVL_CMP) ainfo_cmp, (AVL_DUP) avl_dup_error );
if( rc && !init ) {
fprintf( stderr, "%s: line %d: duplicate index definition "
"for attr \"%s\" (ignored)\n",
fname, lineno, attrs[i] );
return LDAP_PARAM_ERROR;
}
}
charray_free( attrs ); charray_free( attrs );
if ( argc > 1 ) if ( indexes != NULL ) charray_free( indexes );
charray_free( indexes );
return LDAP_SUCCESS;
} }
@ -187,7 +243,11 @@ static void
ainfo_free( void *attr ) ainfo_free( void *attr )
{ {
AttrInfo *ai = attr; AttrInfo *ai = attr;
free( ai->ai_type ); #ifdef SLAPD_USE_AD
ad_free( ai->ai_desc, 1 );
#else
free( ai->ai_desc );
#endif
free( ai ); free( ai );
} }

View file

@ -25,23 +25,17 @@ LDAP_BEGIN_DECL
#define SUBLEN 3 #define SUBLEN 3
#define DN_BASE_PREFIX '=' #define DN_BASE_PREFIX SLAP_INDEX_EQUALITY_PREFIX
#define DN_ONE_PREFIX '@' #define DN_ONE_PREFIX '%'
#define DN_SUBTREE_PREFIX '?' #define DN_SUBTREE_PREFIX '@'
/* /*
* there is a single index for each attribute. these prefixes ensure * there is a single index for each attribute. these prefixes ensure
* that there is no collision among keys. * that there is no collision among keys.
*/ */
#define EQ_PREFIX '=' /* prefix for equality keys */
#define APPROX_PREFIX '~' /* prefix for approx keys */
#define SUB_PREFIX '*' /* prefix for substring keys */
#define CONT_PREFIX '\\' /* prefix for continuation keys */
/* allow 3 characters per byte + PREFIX + EOS */ /* allow PREFIX + byte for continuate number */
#define CONT_SIZE ( sizeof(long)*3 + 1 + 1 ) #define SLAP_INDEX_CONT_SIZE ( sizeof(SLAP_INDEX_CONT_PREFIX) + sizeof(unsigned char) )
#define UNKNOWN_PREFIX '?' /* prefix for unknown keys */
#define DEFAULT_BLOCKSIZE 8192 #define DEFAULT_BLOCKSIZE 8192
@ -113,6 +107,7 @@ struct ldbminfo {
ldap_pvt_thread_mutex_t li_root_mutex; ldap_pvt_thread_mutex_t li_root_mutex;
ldap_pvt_thread_mutex_t li_add_mutex; ldap_pvt_thread_mutex_t li_add_mutex;
int li_mode; int li_mode;
slap_index li_defaultmask;
char *li_directory; char *li_directory;
Cache li_cache; Cache li_cache;
Avlnode *li_attrs; Avlnode *li_attrs;
@ -122,11 +117,6 @@ struct ldbminfo {
DBCache li_dbcache[MAXDBCACHE]; DBCache li_dbcache[MAXDBCACHE];
ldap_pvt_thread_mutex_t li_dbcache_mutex; ldap_pvt_thread_mutex_t li_dbcache_mutex;
ldap_pvt_thread_cond_t li_dbcache_cv; ldap_pvt_thread_cond_t li_dbcache_cv;
#if 0
#if defined(HAVE_BERKELEY_DB) && DB_VERSION_MAJOR >= 2
DB_ENV *li_db_env;
#endif
#endif
}; };
LDAP_END_DECL LDAP_END_DECL

View file

@ -220,6 +220,10 @@ SOURCE=.\init.c
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=.\key.c
# End Source File
# Begin Source File
SOURCE=.\modify.c SOURCE=.\modify.c
# End Source File # End Source File
# Begin Source File # Begin Source File
@ -244,10 +248,6 @@ SOURCE=.\search.c
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=.\startup.c
# End Source File
# Begin Source File
SOURCE=.\tools.c SOURCE=.\tools.c
# End Source File # End Source File
# Begin Source File # Begin Source File

View file

@ -25,6 +25,7 @@ ldbm_back_db_config(
char **argv char **argv
) )
{ {
int rc;
struct ldbminfo *li = (struct ldbminfo *) be->be_private; struct ldbminfo *li = (struct ldbminfo *) be->be_private;
if ( li == NULL ) { if ( li == NULL ) {
@ -67,7 +68,9 @@ ldbm_back_db_config(
"%s: line %d: extra junk after \"index <attr> [pres,eq,approx,sub]\" line (ignored)\n", "%s: line %d: extra junk after \"index <attr> [pres,eq,approx,sub]\" line (ignored)\n",
fname, lineno ); fname, lineno );
} }
attr_index_config( li, fname, lineno, argc - 1, &argv[1], 0 ); rc = attr_index_config( li, fname, lineno, argc - 1, &argv[1], 0 );
if( rc != LDAP_SUCCESS ) return 1;
/* size of the cache in entries */ /* size of the cache in entries */
} else if ( strcasecmp( argv[0], "cachesize" ) == 0 ) { } else if ( strcasecmp( argv[0], "cachesize" ) == 0 ) {

View file

@ -125,8 +125,10 @@ ldbm_cache_open(
} }
li->li_dbcache[i].dbc_maxids = (li->li_dbcache[i].dbc_blksize / li->li_dbcache[i].dbc_maxids = (li->li_dbcache[i].dbc_blksize /
sizeof(ID)) - ID_BLOCK_IDS_OFFSET; sizeof(ID)) - ID_BLOCK_IDS_OFFSET;
li->li_dbcache[i].dbc_maxindirect = (SLAPD_LDBM_MIN_MAXIDS / li->li_dbcache[i].dbc_maxindirect = ( SLAPD_LDBM_MIN_MAXIDS /
li->li_dbcache[i].dbc_maxids) + 1; li->li_dbcache[i].dbc_maxids ) + 1;
assert( li->li_dbcache[i].dbc_maxindirect < 256 );
Debug( LDAP_DEBUG_ARGS, Debug( LDAP_DEBUG_ARGS,
"ldbm_cache_open (blksize %ld) (maxids %d) (maxindirect %d)\n", "ldbm_cache_open (blksize %ld) (maxids %d) (maxindirect %d)\n",

View file

@ -16,23 +16,29 @@
#include "back-ldbm.h" #include "back-ldbm.h"
#ifdef SLAPD_SCHEMA_NOT_COMPAT #ifdef SLAPD_SCHEMA_NOT_COMPAT
ID_BLOCK * static ID_BLOCK *presence_candidates(
filter_candidates( Backend *be,
Backend *be, AttributeDescription *desc );
Filter *f ) static ID_BLOCK *equality_candidates(
{ Backend *be, AttributeAssertion *ava );
return idl_allids( be ); static ID_BLOCK *approx_candidates(
} Backend *be, AttributeAssertion *ava );
static ID_BLOCK *substring_candidates(
Backend *be,
Filter *f );
static ID_BLOCK *list_candidates(
Backend *be,
Filter *flist,
int ftype );
#else #else
static ID_BLOCK *ava_candidates( Backend *be, Ava *ava, int type );
static ID_BLOCK *presence_candidates( Backend *be, char *type ); static ID_BLOCK *presence_candidates( Backend *be, char *type );
static ID_BLOCK *equality_candidates( Backend *be, Ava *ava );
static ID_BLOCK *approx_candidates( Backend *be, Ava *ava ); static ID_BLOCK *approx_candidates( Backend *be, Ava *ava );
static ID_BLOCK *list_candidates( Backend *be, Filter *flist, int ftype ); static ID_BLOCK *list_candidates( Backend *be, Filter *flist, int ftype );
static ID_BLOCK *substring_candidates( Backend *be, Filter *f ); static ID_BLOCK *substring_candidates( Backend *be, Filter *f );
static ID_BLOCK *substring_comp_candidates( Backend *be, char *type, static ID_BLOCK *substring_comp_candidates( Backend *be, char *type,
struct berval *val, int prepost ); struct berval *val, int prepost );
#endif
ID_BLOCK * ID_BLOCK *
filter_candidates( filter_candidates(
@ -56,9 +62,27 @@ filter_candidates(
result = dn2idl( be, f->f_dn, DN_SUBTREE_PREFIX ); result = dn2idl( be, f->f_dn, DN_SUBTREE_PREFIX );
break; break;
case LDAP_FILTER_PRESENT:
Debug( LDAP_DEBUG_FILTER, "\tPRESENT\n", 0, 0, 0 );
result = presence_candidates( be, f->f_desc );
break;
case LDAP_FILTER_EQUALITY: case LDAP_FILTER_EQUALITY:
Debug( LDAP_DEBUG_FILTER, "\tEQUALITY\n", 0, 0, 0 ); Debug( LDAP_DEBUG_FILTER, "\tEQUALITY\n", 0, 0, 0 );
result = ava_candidates( be, &f->f_ava, LDAP_FILTER_EQUALITY ); #ifdef SLAPD_SCHEMA_NOT_COMPAT
result = equality_candidates( be, f->f_ava );
#else
result = equality_candidates( be, &f->f_ava );
#endif
break;
case LDAP_FILTER_APPROX:
Debug( LDAP_DEBUG_FILTER, "\tAPPROX\n", 0, 0, 0 );
#ifdef SLAPD_SCHEMA_NOT_COMPAT
result = approx_candidates( be, f->f_ava );
#else
result = approx_candidates( be, &f->f_ava );
#endif
break; break;
case LDAP_FILTER_SUBSTRINGS: case LDAP_FILTER_SUBSTRINGS:
@ -68,22 +92,12 @@ filter_candidates(
case LDAP_FILTER_GE: case LDAP_FILTER_GE:
Debug( LDAP_DEBUG_FILTER, "\tGE\n", 0, 0, 0 ); Debug( LDAP_DEBUG_FILTER, "\tGE\n", 0, 0, 0 );
result = ava_candidates( be, &f->f_ava, LDAP_FILTER_GE ); result = idl_allids( be );
break; break;
case LDAP_FILTER_LE: case LDAP_FILTER_LE:
Debug( LDAP_DEBUG_FILTER, "\tLE\n", 0, 0, 0 ); Debug( LDAP_DEBUG_FILTER, "\tLE\n", 0, 0, 0 );
result = ava_candidates( be, &f->f_ava, LDAP_FILTER_LE ); result = idl_allids( be );
break;
case LDAP_FILTER_PRESENT:
Debug( LDAP_DEBUG_FILTER, "\tPRESENT\n", 0, 0, 0 );
result = presence_candidates( be, f->f_type );
break;
case LDAP_FILTER_APPROX:
Debug( LDAP_DEBUG_FILTER, "\tAPPROX\n", 0, 0, 0 );
result = approx_candidates( be, &f->f_ava );
break; break;
case LDAP_FILTER_AND: case LDAP_FILTER_AND:
@ -111,48 +125,25 @@ filter_candidates(
return( result ); return( result );
} }
static ID_BLOCK *
ava_candidates(
Backend *be,
Ava *ava,
int type
)
{
ID_BLOCK *idl;
Debug( LDAP_DEBUG_TRACE, "=> ava_candidates 0x%x\n", type, 0, 0 );
switch ( type ) {
case LDAP_FILTER_EQUALITY:
idl = index_read( be, ava->ava_type, SLAP_INDEX_EQUALITY,
ava->ava_value.bv_val );
break;
case LDAP_FILTER_GE:
idl = idl_allids( be );
break;
case LDAP_FILTER_LE:
idl = idl_allids( be );
break;
}
Debug( LDAP_DEBUG_TRACE, "<= ava_candidates %ld\n",
idl ? ID_BLOCK_NIDS(idl) : 0, 0, 0 );
return( idl );
}
static ID_BLOCK * static ID_BLOCK *
presence_candidates( presence_candidates(
Backend *be, Backend *be,
char *type #ifdef SLAPD_SCHEMA_NOT_COMPAT
AttributeDescription *desc
#else
char *desc
#endif
) )
{ {
ID_BLOCK *idl; ID_BLOCK *idl;
Debug( LDAP_DEBUG_TRACE, "=> presence_candidates\n", 0, 0, 0 ); Debug( LDAP_DEBUG_TRACE, "=> presence_candidates\n", 0, 0, 0 );
idl = index_read( be, type, SLAP_INDEX_PRESENCE, "*" ); #ifdef SLAPD_SCHEMA_NOT_COMPAT
idl = idl_allids( be );
#else
idl = index_read( be, desc, SLAP_INDEX_PRESENT, NULL );
#endif
Debug( LDAP_DEBUG_TRACE, "<= presence_candidates %ld\n", Debug( LDAP_DEBUG_TRACE, "<= presence_candidates %ld\n",
idl ? ID_BLOCK_NIDS(idl) : 0, 0, 0 ); idl ? ID_BLOCK_NIDS(idl) : 0, 0, 0 );
@ -160,19 +151,247 @@ presence_candidates(
} }
static ID_BLOCK * static ID_BLOCK *
approx_candidates( equality_candidates(
Backend *be, Backend *be,
#ifdef SLAPD_SCHEMA_NOT_COMPAT
AttributeAssertion *ava
#else
Ava *ava Ava *ava
#endif
) )
{ {
char *w, *c; ID_BLOCK *idl;
ID_BLOCK *idl, *tmp; #ifdef SLAPD_SCHEMA_NOT_COMPAT
DBCache *db;
int i;
int rc;
char *dbname;
slap_index mask;
struct berval *prefix;
struct berval **keys = NULL;
MatchingRule *mr;
#endif
Debug( LDAP_DEBUG_TRACE, "=> equality_candidates\n", 0, 0, 0 );
#ifdef SLAPD_SCHEMA_NOT_COMPAT
idl = idl_allids( be );
rc = index_param( be, ava->aa_desc, LDAP_FILTER_EQUALITY,
&dbname, &mask, &prefix );
if( rc != LDAP_SUCCESS ) {
return idl;
}
if( dbname == NULL ) {
/* not indexed */
return idl;
}
mr = ava->aa_desc->ad_type->sat_equality;
if( !mr ) {
/* return LDAP_INAPPROPRIATE_MATCHING; */
return idl;
}
if( !mr->smr_filter ) {
return idl;
}
rc = (mr->smr_filter)(
LDAP_FILTER_EQUALITY,
ava->aa_desc->ad_type->sat_syntax,
mr,
prefix,
ava->aa_value,
&keys );
if( rc != LDAP_SUCCESS ) {
return idl;
}
db = ldbm_cache_open( be, dbname, LDBM_SUFFIX, LDBM_READER );
if ( db == NULL ) {
Debug( LDAP_DEBUG_ANY,
"<= equality_candidates db open failed (%s%s)\n",
dbname, LDBM_SUFFIX, 0 );
return idl;
}
if( rc != LDAP_SUCCESS ) {
Debug( LDAP_DEBUG_TRACE, "<= equality_candidates open failed (%d)\n",
rc, 0, 0 );
return idl;
}
for ( i= 0; keys[i] != NULL; i++ ) {
ID_BLOCK *save;
ID_BLOCK *tmp;
rc = key_read( be, db, keys[i], &tmp );
if( rc != LDAP_SUCCESS ) {
idl_free( idl );
idl = NULL;
Debug( LDAP_DEBUG_TRACE, "<= equality_candidates key read failed (%d)\n",
rc, 0, 0 );
break;
}
if( tmp == NULL ) {
idl_free( idl );
idl = NULL;
Debug( LDAP_DEBUG_TRACE, "<= equality_candidates NULL\n",
0, 0, 0 );
break;
}
save = idl;
idl = idl_intersection( be, idl, tmp );
idl_free( save );
if( idl == NULL ) break;
}
ber_bvecfree( keys );
ldbm_cache_close( be, db );
#else
idl = index_read( be, ava->ava_type, SLAP_INDEX_EQUALITY,
ava->ava_value.bv_val );
#endif
Debug( LDAP_DEBUG_TRACE, "<= equality_candidates %ld\n",
idl ? ID_BLOCK_NIDS(idl) : 0, 0, 0 );
return( idl );
}
static ID_BLOCK *
approx_candidates(
Backend *be,
#ifdef SLAPD_SCHEMA_NOT_COMPAT
AttributeAssertion *ava
#else
Ava *ava
#endif
)
{
ID_BLOCK *idl;
#ifdef SLAPD_SCHEMA_NOT_COMPAT
DBCache *db;
int i;
int rc;
char *dbname;
slap_index mask;
struct berval *prefix;
struct berval **keys = NULL;
MatchingRule *mr;
#else
char *w, *c;
ID_BLOCK *tmp;
#endif
Debug( LDAP_DEBUG_TRACE, "=> approx_candidates\n", 0, 0, 0 ); Debug( LDAP_DEBUG_TRACE, "=> approx_candidates\n", 0, 0, 0 );
#ifdef SLAPD_SCHEMA_NOT_COMPAT
idl = idl_allids( be );
rc = index_param( be, ava->aa_desc, LDAP_FILTER_EQUALITY,
&dbname, &mask, &prefix );
if( rc != LDAP_SUCCESS ) {
return idl;
}
if( dbname == NULL ) {
/* not indexed */
return idl;
}
mr = ava->aa_desc->ad_type->sat_approx;
if( mr == NULL ) {
/* no approx matching rule, try equality matching rule */
mr = ava->aa_desc->ad_type->sat_equality;
}
if( !mr ) {
/* return LDAP_INAPPROPRIATE_MATCHING; */
return idl;
}
if( !mr->smr_filter ) {
return idl;
}
rc = (mr->smr_filter)(
LDAP_FILTER_EQUALITY,
ava->aa_desc->ad_type->sat_syntax,
mr,
prefix,
ava->aa_value,
&keys );
if( rc != LDAP_SUCCESS ) {
return idl;
}
db = ldbm_cache_open( be, dbname, LDBM_SUFFIX, LDBM_READER );
if ( db == NULL ) {
Debug( LDAP_DEBUG_ANY,
"<= approx_candidates db open failed (%s%s)\n",
dbname, LDBM_SUFFIX, 0 );
return idl;
}
if( rc != LDAP_SUCCESS ) {
Debug( LDAP_DEBUG_TRACE, "<= approx_candidates open failed (%d)\n",
rc, 0, 0 );
return idl;
}
for ( i= 0; keys[i] != NULL; i++ ) {
ID_BLOCK *save;
ID_BLOCK *tmp;
rc = key_read( be, db, keys[i], &tmp );
if( rc != LDAP_SUCCESS ) {
idl_free( idl );
idl = NULL;
Debug( LDAP_DEBUG_TRACE, "<= approx_candidates key read failed (%d)\n",
rc, 0, 0 );
break;
}
if( tmp == NULL ) {
idl_free( idl );
idl = NULL;
Debug( LDAP_DEBUG_TRACE, "<= approx_candidates NULL\n",
0, 0, 0 );
break;
}
save = idl;
idl = idl_intersection( be, idl, tmp );
idl_free( save );
if( idl == NULL ) break;
}
ber_bvecfree( keys );
ldbm_cache_close( be, db );
#else
idl = NULL; idl = NULL;
for ( w = first_word( ava->ava_value.bv_val ); w != NULL; for ( w = first_word( ava->ava_value.bv_val );
w = next_word( w ) ) { w != NULL;
w = next_word( w ) )
{
c = phonetic( w ); c = phonetic( w );
if ( (tmp = index_read( be, ava->ava_type, SLAP_INDEX_APPROX, c )) if ( (tmp = index_read( be, ava->ava_type, SLAP_INDEX_APPROX, c ))
== NULL ) { == NULL ) {
@ -191,6 +410,7 @@ approx_candidates(
} }
} }
#endif
Debug( LDAP_DEBUG_TRACE, "<= approx_candidates %ld\n", Debug( LDAP_DEBUG_TRACE, "<= approx_candidates %ld\n",
idl ? ID_BLOCK_NIDS(idl) : 0, 0, 0 ); idl ? ID_BLOCK_NIDS(idl) : 0, 0, 0 );
return( idl ); return( idl );
@ -243,11 +463,17 @@ substring_candidates(
Filter *f Filter *f
) )
{ {
ID_BLOCK *idl;
#ifndef SLAPD_SCHEMA_NOT_COMPAT
int i; int i;
ID_BLOCK *idl, *tmp, *tmp2; ID_BLOCK *tmp, *tmp2;
#endif
Debug( LDAP_DEBUG_TRACE, "=> substring_candidates\n", 0, 0, 0 ); Debug( LDAP_DEBUG_TRACE, "=> substring_candidates\n", 0, 0, 0 );
#ifdef SLAPD_SCHEMA_NOT_COMPAT
idl = idl_allids( be );
#else
idl = NULL; idl = NULL;
/* initial */ /* initial */
@ -300,12 +526,13 @@ substring_candidates(
} }
} }
} }
#endif
Debug( LDAP_DEBUG_TRACE, "<= substring_candidates %ld\n", Debug( LDAP_DEBUG_TRACE, "<= substring_candidates %ld\n",
idl ? ID_BLOCK_NIDS(idl) : 0, 0, 0 ); idl ? ID_BLOCK_NIDS(idl) : 0, 0, 0 );
return( idl ); return( idl );
} }
#ifndef SLAPD_SCHEMA_NOT_COMPAT
static ID_BLOCK * static ID_BLOCK *
substring_comp_candidates( substring_comp_candidates(
Backend *be, Backend *be,

View file

@ -17,6 +17,34 @@
static ID_BLOCK* idl_dup( ID_BLOCK *idl ); static ID_BLOCK* idl_dup( ID_BLOCK *idl );
#ifdef SLAPD_SCHEMA_NOT_COMPAT
static void cont_alloc( Datum cont, Datum key )
{
ldbm_datum_init( cont );
cont.dsize = 1 + sizeof(ID) + key.dsize;
cont.dptr = ch_malloc( cont.dsize );
memcpy( &((unsigned char *)cont.dptr)[1 + sizeof(ID)],
key.dptr, key.dsize );
}
static void cont_id( Datum cont, ID id )
{
int i;
for( i=1; i <= sizeof(id); i++) {
((unsigned char *)cont.dptr)[i] = (unsigned char)(id & 0xFF);
id >>= 8;
}
}
static void cont_free( Datum cont )
{
ch_free( cont.dptr );
}
#endif
/* Allocate an ID_BLOCK with room for nids ids */ /* Allocate an ID_BLOCK with room for nids ids */
ID_BLOCK * ID_BLOCK *
idl_alloc( unsigned int nids ) idl_alloc( unsigned int nids )
@ -106,7 +134,6 @@ idl_fetch(
Datum data; Datum data;
ID_BLOCK *idl; ID_BLOCK *idl;
ID_BLOCK **tmp; ID_BLOCK **tmp;
char *kstr;
int i, nids; int i, nids;
idl = idl_fetch_one( be, db, key ); idl = idl_fetch_one( be, db, key );
@ -141,16 +168,22 @@ idl_fetch(
tmp = (ID_BLOCK **) ch_malloc( (i + 1) * sizeof(ID_BLOCK *) ); tmp = (ID_BLOCK **) ch_malloc( (i + 1) * sizeof(ID_BLOCK *) );
/* read in all the blocks */ /* read in all the blocks */
kstr = (char *) ch_malloc( key.dsize + CONT_SIZE ); #ifdef SLAPD_SCHEMA_NOT_COMPAT
cont_alloc( data, key );
#else
kstr = (char *) ch_malloc( key.dsize + SLAP_INDEX_CONT_SIZE );
#endif
nids = 0; nids = 0;
for ( i = 0; !ID_BLOCK_NOID(idl, i); i++ ) { for ( i = 0; !ID_BLOCK_NOID(idl, i); i++ ) {
ldbm_datum_init( data ); #ifdef SLAPD_SCHEMA_NOT_COMPAT
cont_id( data, ID_BLOCK_ID(idl, i) );
sprintf( kstr, "%c%ld%s", CONT_PREFIX, #else
sprintf( kstr, "%c%ld%s", SLAP_INDEX_CONT_PREFIX,
ID_BLOCK_ID(idl, i), key.dptr ); ID_BLOCK_ID(idl, i), key.dptr );
data.dptr = kstr; data.dptr = kstr;
data.dsize = strlen( kstr ) + 1; data.dsize = strlen( kstr ) + 1;
#endif
if ( (tmp[i] = idl_fetch_one( be, db, data )) == NULL ) { if ( (tmp[i] = idl_fetch_one( be, db, data )) == NULL ) {
Debug( LDAP_DEBUG_ANY, Debug( LDAP_DEBUG_ANY,
@ -161,7 +194,11 @@ idl_fetch(
nids += ID_BLOCK_NIDS(tmp[i]); nids += ID_BLOCK_NIDS(tmp[i]);
} }
tmp[i] = NULL; tmp[i] = NULL;
#ifdef SLAPD_SCHEMA_NOT_COMPAT
cont_free( data );
#else
free( kstr ); free( kstr );
#endif
idl_free( idl ); idl_free( idl );
/* allocate space for the big block */ /* allocate space for the big block */
@ -300,10 +337,14 @@ idl_change_first(
} }
/* write block with new key */ /* write block with new key */
sprintf( bkey.dptr, "%c%ld%s", CONT_PREFIX, #ifdef SLAPD_SCHEMA_NOT_COMPAT
cont_id( bkey, ID_BLOCK_ID(b, 0) );
#else
sprintf( bkey.dptr, "%c%ld%s", SLAP_INDEX_CONT_PREFIX,
ID_BLOCK_ID(b, 0), hkey.dptr ); ID_BLOCK_ID(b, 0), hkey.dptr );
bkey.dsize = strlen( bkey.dptr ) + 1; bkey.dsize = strlen( bkey.dptr ) + 1;
#endif
if ( (rc = idl_store( be, db, bkey, b )) != 0 ) { if ( (rc = idl_store( be, db, bkey, b )) != 0 ) {
Debug( LDAP_DEBUG_ANY, Debug( LDAP_DEBUG_ANY,
"idl_store of (%s) returns %d\n", bkey.dptr, rc, 0 ); "idl_store of (%s) returns %d\n", bkey.dptr, rc, 0 );
@ -332,10 +373,12 @@ idl_insert_key(
{ {
int i, j, first, rc; int i, j, first, rc;
ID_BLOCK *idl, *tmp, *tmp2, *tmp3; ID_BLOCK *idl, *tmp, *tmp2, *tmp3;
char *kstr;
Datum k2; Datum k2;
#ifndef SLAPD_SCHEMA_NOT_COMPAT
char *kstr;
ldbm_datum_init( k2 ); ldbm_datum_init( k2 );
#endif
if ( (idl = idl_fetch_one( be, db, key )) == NULL ) { if ( (idl = idl_fetch_one( be, db, key )) == NULL ) {
#ifdef LDBM_DEBUG #ifdef LDBM_DEBUG
@ -392,23 +435,38 @@ idl_insert_key(
/* store it */ /* store it */
rc = idl_store( be, db, key, idl ); rc = idl_store( be, db, key, idl );
#ifdef SLAPD_SCHEMA_NOT_COMPAT
cont_alloc( k2, key );
cont_id( k2, ID_BLOCK_ID(tmp, 0) );
#else
/* store the first id block */ /* store the first id block */
kstr = (char *) ch_malloc( key.dsize + CONT_SIZE ); kstr = (char *) ch_malloc( key.dsize + SLAP_INDEX_CONT_SIZE );
sprintf( kstr, "%c%ld%s", CONT_PREFIX, sprintf( kstr, "%c%ld%s", SLAP_INDEX_CONT_PREFIX,
ID_BLOCK_ID(tmp, 0), key.dptr ); ID_BLOCK_ID(tmp, 0), key.dptr );
k2.dptr = kstr; k2.dptr = kstr;
k2.dsize = strlen( kstr ) + 1; k2.dsize = strlen( kstr ) + 1;
#endif
rc = idl_store( be, db, k2, tmp ); rc = idl_store( be, db, k2, tmp );
#ifdef SLAPD_SCHEMA_NOT_COMPAT
cont_id( k2, ID_BLOCK_ID(tmp2, 0) );
#else
/* store the second id block */ /* store the second id block */
sprintf( kstr, "%c%ld%s", CONT_PREFIX, sprintf( kstr, "%c%ld%s", SLAP_INDEX_CONT_PREFIX,
ID_BLOCK_ID(tmp2, 0), key.dptr ); ID_BLOCK_ID(tmp2, 0), key.dptr );
k2.dptr = kstr; k2.dptr = kstr;
k2.dsize = strlen( kstr ) + 1; k2.dsize = strlen( kstr ) + 1;
#endif
rc = idl_store( be, db, k2, tmp2 ); rc = idl_store( be, db, k2, tmp2 );
#ifdef SLAPD_SCHEMA_NOT_COMPAT
cont_free( k2 );
#else
free( kstr ); free( kstr );
#endif
idl_free( tmp ); idl_free( tmp );
idl_free( tmp2 ); idl_free( tmp2 );
break; break;
@ -429,6 +487,7 @@ idl_insert_key(
/* select the block to try inserting into *//* XXX linear search XXX */ /* select the block to try inserting into *//* XXX linear search XXX */
for ( i = 0; !ID_BLOCK_NOID(idl, i) && id > ID_BLOCK_ID(idl, i); i++ ) for ( i = 0; !ID_BLOCK_NOID(idl, i) && id > ID_BLOCK_ID(idl, i); i++ )
; /* NULL */ ; /* NULL */
if ( i != 0 ) { if ( i != 0 ) {
i--; i--;
first = 0; first = 0;
@ -437,15 +496,25 @@ idl_insert_key(
} }
/* get the block */ /* get the block */
kstr = (char *) ch_malloc( key.dsize + CONT_SIZE ); #ifdef SLAPD_SCHEMA_NOT_COMPAT
sprintf( kstr, "%c%ld%s", CONT_PREFIX, cont_alloc( k2, key );
cont_id( k2, ID_BLOCK_ID(idl, i) );
#else
kstr = (char *) ch_malloc( key.dsize + SLAP_INDEX_CONT_SIZE );
sprintf( kstr, "%c%ld%s", SLAP_INDEX_CONT_PREFIX,
ID_BLOCK_ID(idl, i), key.dptr ); ID_BLOCK_ID(idl, i), key.dptr );
k2.dptr = kstr; k2.dptr = kstr;
k2.dsize = strlen( kstr ) + 1; k2.dsize = strlen( kstr ) + 1;
#endif
if ( (tmp = idl_fetch_one( be, db, k2 )) == NULL ) { if ( (tmp = idl_fetch_one( be, db, k2 )) == NULL ) {
Debug( LDAP_DEBUG_ANY, "nonexistent continuation block (%s)\n", Debug( LDAP_DEBUG_ANY, "nonexistent continuation block (%s)\n",
k2.dptr, 0, 0 ); k2.dptr, 0, 0 );
#ifdef SLAPD_SCHEMA_NOT_COMPAT
cont_free( k2 );
#else
free( kstr ); free( kstr );
#endif
idl_free( idl ); idl_free( idl );
return( -1 ); return( -1 );
} }
@ -484,16 +553,25 @@ idl_insert_key(
/* is there a next block? */ /* is there a next block? */
if ( !first && !ID_BLOCK_NOID(idl, i + 1) ) { if ( !first && !ID_BLOCK_NOID(idl, i + 1) ) {
/* read it in */ /* read it in */
k2.dptr = (char *) ch_malloc( key.dsize + CONT_SIZE ); #ifdef SLAPD_SCHEMA_NOT_COMPAT
sprintf( k2.dptr, "%c%ld%s", CONT_PREFIX, cont_alloc( k2, key );
cont_id( k2, ID_BLOCK_ID(idl, i) );
#else
k2.dptr = (char *) ch_malloc( key.dsize + SLAP_INDEX_CONT_SIZE );
sprintf( k2.dptr, "%c%ld%s", SLAP_INDEX_CONT_PREFIX,
ID_BLOCK_ID(idl, i + 1), key.dptr ); ID_BLOCK_ID(idl, i + 1), key.dptr );
k2.dsize = strlen( k2.dptr ) + 1; k2.dsize = strlen( k2.dptr ) + 1;
#endif
if ( (tmp2 = idl_fetch_one( be, db, k2 )) == NULL ) { if ( (tmp2 = idl_fetch_one( be, db, k2 )) == NULL ) {
Debug( LDAP_DEBUG_ANY, Debug( LDAP_DEBUG_ANY,
"idl_fetch_one (%s) returns NULL\n", "idl_fetch_one (%s) returns NULL\n",
k2.dptr, 0, 0 ); k2.dptr, 0, 0 );
/* split the original block */ /* split the original block */
#ifdef SLAPD_SCHEMA_NOT_COMPAT
cont_free( k2 );
#else
free( k2.dptr ); free( k2.dptr );
#endif
goto split; goto split;
} }
@ -514,14 +592,26 @@ idl_insert_key(
*/ */
rc = idl_insert( &tmp, id, db->dbc_maxids ); rc = idl_insert( &tmp, id, db->dbc_maxids );
assert( rc == 0 ); assert( rc == 0 );
k3.dptr = kstr;
#ifdef SLAPD_SCHEMA_NOT_COMPAT
k3.dptr = ch_malloc(k2.dsize);
k3.dsize = k2.dsize;
memcpy(k3.dptr, k2.dptr, k3.dsize);
#else
k3.dptr = strdup( kstr );
k3.dsize = strlen( kstr ) + 1; k3.dsize = strlen( kstr ) + 1;
#endif
if ( (rc = idl_store( be, db, k3, tmp )) != 0 ) { if ( (rc = idl_store( be, db, k3, tmp )) != 0 ) {
Debug( LDAP_DEBUG_ANY, Debug( LDAP_DEBUG_ANY,
"idl_store of (%s) returns %d\n", k3.dptr, rc, 0 ); "idl_store of (%s) returns %d\n", k3.dptr, rc, 0 );
} }
#ifdef SLAPD_SCHEMA_NOT_COMPAT
free( k3.dptr );
#else
free( kstr ); free( kstr );
kstr = k2.dptr; kstr = k2.dptr;
#endif
id = id2; id = id2;
/* This new id will necessarily be inserted /* This new id will necessarily be inserted
@ -548,7 +638,12 @@ idl_insert_key(
"id %ld already in next block\n", "id %ld already in next block\n",
id, 0, 0 ); id, 0, 0 );
} }
#ifdef SLAPD_SCHEMA_NOT_COMPAT
assert( 0 ); /* not yet implemented */
#else
free( kstr ); free( kstr );
#endif
idl_free( tmp ); idl_free( tmp );
idl_free( tmp2 ); idl_free( tmp2 );
idl_free( idl ); idl_free( idl );
@ -586,10 +681,14 @@ split:
/* delete all indirect blocks */ /* delete all indirect blocks */
for ( j = 0; !ID_BLOCK_NOID(idl, j); j++ ) { for ( j = 0; !ID_BLOCK_NOID(idl, j); j++ ) {
sprintf( kstr, "%c%ld%s", CONT_PREFIX, #ifdef SLAPD_SCHEMA_NOT_COMPAT
cont_id( k2, ID_BLOCK_ID(idl, j) );
#else
sprintf( kstr, "%c%ld%s", SLAP_INDEX_CONT_PREFIX,
ID_BLOCK_ID(idl, j), key.dptr ); ID_BLOCK_ID(idl, j), key.dptr );
k2.dptr = kstr; k2.dptr = kstr;
k2.dsize = strlen( kstr ) + 1; k2.dsize = strlen( kstr ) + 1;
#endif
rc = ldbm_cache_delete( db, k2 ); rc = ldbm_cache_delete( db, k2 );
} }
@ -599,7 +698,11 @@ split:
idl = idl_allids( be ); idl = idl_allids( be );
rc = idl_store( be, db, key, idl ); rc = idl_store( be, db, key, idl );
#ifdef SLAPD_SCHEMA_NOT_COMPAT
cont_free( k2 );
#else
free( kstr ); free( kstr );
#endif
idl_free( idl ); idl_free( idl );
idl_free( tmp ); idl_free( tmp );
return( rc ); return( rc );
@ -629,17 +732,25 @@ split:
rc = idl_store( be, db, key, tmp ); rc = idl_store( be, db, key, tmp );
/* store the first id block */ /* store the first id block */
sprintf( kstr, "%c%ld%s", CONT_PREFIX, #ifdef SLAPD_SCHEMA_NOT_COMPAT
cont_id( k2, ID_BLOCK_ID(tmp2, 0) );
#else
sprintf( kstr, "%c%ld%s", SLAP_INDEX_CONT_PREFIX,
ID_BLOCK_ID(tmp2, 0), key.dptr ); ID_BLOCK_ID(tmp2, 0), key.dptr );
k2.dptr = kstr; k2.dptr = kstr;
k2.dsize = strlen( kstr ) + 1; k2.dsize = strlen( kstr ) + 1;
#endif
rc = idl_store( be, db, k2, tmp2 ); rc = idl_store( be, db, k2, tmp2 );
/* store the second id block */ /* store the second id block */
sprintf( kstr, "%c%ld%s", CONT_PREFIX, #ifdef SLAPD_SCHEMA_NOT_COMPAT
cont_id( k2, ID_BLOCK_ID(tmp3, 0) );
#else
sprintf( kstr, "%c%ld%s", SLAP_INDEX_CONT_PREFIX,
ID_BLOCK_ID(tmp3, 0), key.dptr ); ID_BLOCK_ID(tmp3, 0), key.dptr );
k2.dptr = kstr; k2.dptr = kstr;
k2.dsize = strlen( kstr ) + 1; k2.dsize = strlen( kstr ) + 1;
#endif
rc = idl_store( be, db, k2, tmp3 ); rc = idl_store( be, db, k2, tmp3 );
idl_free( tmp2 ); idl_free( tmp2 );
@ -647,7 +758,11 @@ split:
break; break;
} }
#ifdef SLAPD_SCHEMA_NOT_COMPAT
cont_free( k2 );
#else
free( kstr ); free( kstr );
#endif
idl_free( tmp ); idl_free( tmp );
idl_free( idl ); idl_free( idl );
return( rc ); return( rc );
@ -722,7 +837,9 @@ idl_delete_key (
ID_BLOCK *idl; ID_BLOCK *idl;
unsigned i; unsigned i;
int j, nids; int j, nids;
#ifndef SLAPD_SCHEMA_NOT_COMPAT
char *kstr; char *kstr;
#endif
if ( (idl = idl_fetch_one( be, db, key ) ) == NULL ) if ( (idl = idl_fetch_one( be, db, key ) ) == NULL )
{ {
@ -766,16 +883,25 @@ idl_delete_key (
*/ */
for ( nids = 0; !ID_BLOCK_NOID(idl, nids); nids++ ) for ( nids = 0; !ID_BLOCK_NOID(idl, nids); nids++ )
; /* NULL */ ; /* NULL */
kstr = (char *) ch_malloc( key.dsize + CONT_SIZE );
#ifdef SLAPD_SCHEMA_NOT_COMPAT
cont_alloc( data, key );
#else
kstr = (char *) ch_malloc( key.dsize + SLAP_INDEX_CONT_SIZE );
#endif
for ( j = 0; !ID_BLOCK_NOID(idl, j); j++ ) for ( j = 0; !ID_BLOCK_NOID(idl, j); j++ )
{ {
ID_BLOCK *tmp; ID_BLOCK *tmp;
#ifdef SLAPD_SCHEMA_NOT_COMPAT
cont_id( data, ID_BLOCK_ID(idl, j) );
#else
ldbm_datum_init( data ); ldbm_datum_init( data );
sprintf( kstr, "%c%ld%s", CONT_PREFIX, sprintf( kstr, "%c%ld%s", SLAP_INDEX_CONT_PREFIX,
ID_BLOCK_ID(idl, j), key.dptr ); ID_BLOCK_ID(idl, j), key.dptr );
data.dptr = kstr; data.dptr = kstr;
data.dsize = strlen( kstr ) + 1; data.dsize = strlen( kstr ) + 1;
#endif
if ( (tmp = idl_fetch_one( be, db, data )) == NULL ) { if ( (tmp = idl_fetch_one( be, db, data )) == NULL ) {
Debug( LDAP_DEBUG_ANY, Debug( LDAP_DEBUG_ANY,
@ -813,14 +939,23 @@ idl_delete_key (
idl_store( be, db, key, idl ); idl_store( be, db, key, idl );
} }
idl_free( tmp ); idl_free( tmp );
#ifdef SLAPD_SCHEMA_NOT_COMPAT
cont_free( data );
#else
free( kstr ); free( kstr );
#endif
idl_free( idl ); idl_free( idl );
return 0; return 0;
} }
} }
idl_free( tmp ); idl_free( tmp );
} }
#ifdef SLAPD_SCHEMA_NOT_COMPAT
cont_free( data );
#else
free( kstr ); free( kstr );
#endif
idl_free( idl ); idl_free( idl );
return -1; return -1;
} }

View file

@ -15,33 +15,338 @@
#include "slap.h" #include "slap.h"
#include "back-ldbm.h" #include "back-ldbm.h"
#ifndef SLAPD_SCHEMA_NOT_COMPAT #ifdef SLAPD_SCHEMA_NOT_COMPAT
static index_mask(
Backend *be,
AttributeDescription *desc,
char **dbname,
char **atname )
{
AttributeType *at;
slap_index mask = 0;
/* we do support indexing of binary attributes */
if( slap_ad_is_binary( desc ) ) return 0;
attr_mask( be->be_private, desc->ad_cname->bv_val, &mask );
if( mask ) {
*atname = desc->ad_cname->bv_val;
*dbname = desc->ad_cname->bv_val;
return mask;
}
if( slap_ad_is_lang( desc ) ) {
/* has language tag */
attr_mask( be->be_private, desc->ad_type->sat_cname, &mask );
if( mask & SLAP_INDEX_AUTO_LANG ) {
*atname = desc->ad_cname->bv_val;
*dbname = desc->ad_type->sat_cname;
return mask;
}
if( mask & SLAP_INDEX_LANG ) {
*atname = desc->ad_type->sat_cname;
*dbname = desc->ad_type->sat_cname;
return mask;
}
}
/* see if supertype defined mask for its subtypes */
for( at = desc->ad_type; at != NULL ; at = at->sat_sup ) {
attr_mask( be->be_private, at->sat_cname, &mask );
if( mask & SLAP_INDEX_AUTO_SUBTYPES ) {
*atname = desc->ad_type->sat_cname;
*dbname = at->sat_cname;
return mask;
}
if( mask & SLAP_INDEX_SUBTYPES ) {
*atname = at->sat_cname;
*dbname = at->sat_cname;
return mask;
}
if( mask ) break;
}
return 0;
}
int index_param(
Backend *be,
AttributeDescription *desc,
int ftype,
char **dbnamep,
slap_index *maskp,
struct berval **prefixp )
{
slap_index mask;
char *dbname;
char *atname;
mask = index_mask( be, desc, &dbname, &atname );
if( mask == 0 ) {
return LDAP_INAPPROPRIATE_MATCHING;
}
switch(ftype) {
case LDAP_FILTER_PRESENT:
if( IS_SLAP_INDEX( mask, SLAP_INDEX_PRESENT ) ) {
goto done;
}
break;
case LDAP_FILTER_APPROX:
if( IS_SLAP_INDEX( mask, SLAP_INDEX_APPROX ) ) {
goto done;
}
/* fall thru */
case LDAP_FILTER_EQUALITY:
if( IS_SLAP_INDEX( mask, SLAP_INDEX_EQUALITY ) ) {
goto done;
}
break;
case LDAP_FILTER_SUBSTRINGS:
if( IS_SLAP_INDEX( mask, SLAP_INDEX_SUBSTR ) ) {
goto done;
}
break;
default:
return LDAP_OTHER;
}
return LDAP_INAPPROPRIATE_MATCHING;
done:
*dbnamep = dbname;
*prefixp = ber_bvstrdup( atname );
*maskp = mask;
return LDAP_SUCCESS;
}
static int indexer(
Backend *be,
char *dbname,
char *atname,
struct berval **vals,
ID id,
int op,
slap_index mask )
{
int rc, i;
const char *text;
DBCache *db;
AttributeDescription *ad = NULL;
struct berval **keys;
struct berval prefix;
assert( mask );
rc = slap_str2ad( atname, &ad, &text );
if( rc != LDAP_SUCCESS ) return rc;
prefix.bv_val = atname;
prefix.bv_len = strlen( atname );
db = ldbm_cache_open( be, dbname, LDBM_SUFFIX, LDBM_WRCREAT );
if ( db == NULL ) {
Debug( LDAP_DEBUG_ANY,
"<= index_read NULL (could not open %s%s)\n",
dbname, LDBM_SUFFIX, 0 );
ad_free( ad, 1 );
return LDAP_OTHER;
}
if( IS_SLAP_INDEX( mask, SLAP_INDEX_PRESENT ) ) {
key_change( be, db, &prefix, id, op );
}
if( IS_SLAP_INDEX( mask, SLAP_INDEX_EQUALITY ) ) {
rc = ad->ad_type->sat_equality->smr_indexer(
mask,
ad->ad_type->sat_syntax,
ad->ad_type->sat_equality,
&prefix, vals, &keys );
if( rc == LDAP_SUCCESS ) {
for( i= 0; keys[i] != NULL; i++ ) {
key_change( be, db, keys[i], id, op );
}
}
}
if( IS_SLAP_INDEX( mask, SLAP_INDEX_APPROX ) ) {
rc = ad->ad_type->sat_approx->smr_indexer(
mask,
ad->ad_type->sat_syntax,
ad->ad_type->sat_approx,
&prefix, vals, &keys );
if( rc == LDAP_SUCCESS ) {
for( i= 0; keys[i] != NULL; i++ ) {
key_change( be, db, keys[i], id, op );
}
}
}
if( IS_SLAP_INDEX( mask, SLAP_INDEX_SUBSTR ) ) {
rc = ad->ad_type->sat_substr->smr_indexer(
mask,
ad->ad_type->sat_syntax,
ad->ad_type->sat_substr,
&prefix, vals, &keys );
if( rc == LDAP_SUCCESS ) {
for( i= 0; keys[i] != NULL; i++ ) {
key_change( be, db, keys[i], id, op );
}
}
}
ldbm_cache_close( be, db );
ad_free( ad, 1 );
return LDAP_SUCCESS;
}
static int index_at_values(
Backend *be,
AttributeType *type,
const char *lang,
struct berval **vals,
ID id,
int op,
char ** dbnamep,
slap_index *maskp )
{
slap_index mask;
slap_index tmpmask = 0;
int lindex = 0;
if( type->sat_sup ) {
/* recurse */
(void) index_at_values( be,
type->sat_sup, lang,
vals, id, op,
dbnamep, &tmpmask );
}
attr_mask( be->be_private, type->sat_cname, &mask );
if( mask ) {
*dbnamep = type->sat_cname;
} else if ( tmpmask & SLAP_INDEX_AUTO_SUBTYPES ) {
mask = tmpmask;
}
if( mask ) {
indexer( be, *dbnamep,
type->sat_cname,
vals, id, op,
mask );
}
if( lang ) {
char *dbname = NULL;
size_t tlen = strlen( type->sat_cname );
size_t llen = strlen( lang );
char *lname = ch_malloc( tlen + llen + sizeof(";") );
sprintf( lname, "%s;%s", type->sat_cname, lang );
attr_mask( be->be_private, lname, &tmpmask );
if( tmpmask ) {
dbname = lname;
} else if ( mask & SLAP_INDEX_AUTO_LANG ) {
dbname = *dbnamep;
tmpmask = mask;
}
if( dbname != NULL ) {
indexer( be, dbname, lname,
vals, id, op,
tmpmask );
}
ch_free( lname );
}
return LDAP_SUCCESS;
}
int index_values(
Backend *be,
AttributeDescription *desc,
struct berval **vals,
ID id,
int op )
{
char *dbname = NULL;
slap_index mask;
if( slap_ad_is_binary( desc ) ) {
/* binary attributes have no index capabilities */
return LDAP_SUCCESS;
}
(void) index_at_values( be,
desc->ad_type, desc->ad_lang,
vals, id, op,
&dbname, &mask );
return LDAP_SUCCESS;
}
#else
int index_change_values(
Backend *be,
#ifdef SLAPD_SCHEMA_NOT_COMPAT
AttributeDescription *desc,
#else
char *desc,
#endif
struct berval **vals,
ID id,
unsigned int op
);
#ifndef SLAPD_SCHEMA_NOT_COMPAT
static int change_value(Backend *be, static int change_value(Backend *be,
DBCache *db, DBCache *db,
char *type, char *type,
int indextype, int indextype,
char *val, char *val,
ID id, ID id,
int int
(*idl_func)(Backend *, DBCache *, Datum, ID)); (*idl_func)(Backend *, DBCache *, Datum, ID));
static int index2prefix(int indextype); #endif
#endif #endif
int int
index_add_entry( index_entry(
Backend *be, Backend *be,
Entry *e int op,
Entry *e,
Attribute *ap
) )
{ {
#ifndef SLAPD_SCHEMA_NOT_COMPAT #ifndef SLAPD_SCHEMA_NOT_COMPAT
Attribute *ap;
struct berval bv; struct berval bv;
struct berval *bvals[2]; struct berval *bvals[2];
#endif
Debug( LDAP_DEBUG_TRACE, "=> index_add( %ld, \"%s\" )\n", e->e_id, Debug( LDAP_DEBUG_TRACE, "=> index_entry_%s( %ld, \"%s\" )\n",
e->e_dn, 0 ); op == SLAP_INDEX_ADD_OP ? "add" : "del",
e->e_id, e->e_dn );
#ifndef SLAPD_SCHEMA_NOT_COMPAT
/* /*
* dn index entry - make it look like an attribute so it works * dn index entry - make it look like an attribute so it works
* with index_change_values() call * with index_change_values() call
@ -55,39 +360,37 @@ index_add_entry(
/* add the dn to the indexes */ /* add the dn to the indexes */
{ {
char *dn = ch_strdup("dn"); char *dn = ch_strdup("dn");
#ifdef SLAPD_SCHEMA_NOT_COMPAT index_change_values( be, dn, bvals, e->e_id, op );
/* not yet implemented */
#else
index_change_values( be, dn, bvals, e->e_id, SLAP_INDEX_ADD_OP );
#endif
free( dn ); free( dn );
} }
free( bv.bv_val ); free( bv.bv_val );
#endif
/* add each attribute to the indexes */ /* add each attribute to the indexes */
for ( ap = e->e_attrs; ap != NULL; ap = ap->a_next ) { for ( ap; ap != NULL; ap = ap->a_next ) {
#ifdef SLAPD_SCHEMA_NOT_COMPAT #ifdef SLAPD_SCHEMA_NOT_COMPAT
/* index_change_values( be, SLAP_INDEX_ADD_OP, e->e_id, ap ); */ index_values( be, ap->a_desc, ap->a_vals, e->e_id, op );
#else #else
index_change_values( be, ap->a_type, ap->a_vals, e->e_id, index_change_values( be, ap->a_type, ap->a_vals, e->e_id, op );
SLAP_INDEX_ADD_OP );
#endif #endif
} }
Debug( LDAP_DEBUG_TRACE, "<= index_add( %ld, \"%s\" ) 0\n", e->e_id, Debug( LDAP_DEBUG_TRACE, "<= index_entry_%s( %ld, \"%s\" ) success\n",
e->e_ndn, 0 ); op == SLAP_INDEX_ADD_OP ? "add" : "del",
#endif e->e_id, e->e_dn );
return( 0 );
return LDAP_SUCCESS;
} }
#ifndef SLAPD_SCHEMA_NOT_COMPAT #ifndef SLAPD_SCHEMA_NOT_COMPAT
ID_BLOCK * ID_BLOCK *
index_read( index_read(
Backend *be, Backend *be,
char *type, char *type,
int indextype, int indextype,
char *val char *val
) )
{ {
DBCache *db; DBCache *db;
@ -102,7 +405,7 @@ index_read(
ldbm_datum_init( key ); ldbm_datum_init( key );
prefix = index2prefix( indextype ); prefix = slap_index2prefix( indextype );
Debug( LDAP_DEBUG_TRACE, "=> index_read(\"%c%s\"->\"%s\")\n", Debug( LDAP_DEBUG_TRACE, "=> index_read(\"%c%s\"->\"%s\")\n",
prefix, type, val ); prefix, type, val );
@ -188,7 +491,7 @@ change_value(
char *realval = val; char *realval = val;
char buf[BUFSIZ]; char buf[BUFSIZ];
char prefix = index2prefix( indextype ); char prefix = slap_index2prefix( indextype );
ldbm_datum_init( key ); ldbm_datum_init( key );
@ -226,18 +529,23 @@ change_value(
return( rc ); return( rc );
} }
#endif
#ifdef SLAPD_SCHEMA_NOT_COMPAT
static
#endif
int int
index_change_values( index_change_values(
Backend *be, Backend *be,
char *type, #ifdef SLAPD_SCHEMA_NOT_COMPAT
AttributeDescription *desc,
#else
char *desc,
#endif
struct berval **vals, struct berval **vals,
ID id, ID id,
unsigned int op unsigned int op
) )
{ {
#ifndef SLAPD_SCHEMA_NOT_COMPAT
char *val, *p, *code, *w; char *val, *p, *code, *w;
unsigned i, j, len; unsigned i, j, len;
int indexmask, syntax; int indexmask, syntax;
@ -252,6 +560,12 @@ index_change_values(
char *at_cn; /* Attribute canonical name */ char *at_cn; /* Attribute canonical name */
int mode; int mode;
#ifdef SLAPD_SCHEMA_NOT_COMPAT
char *type = desc->ad_cname->bv_val;
#else
char *type = desc;
#endif
if( vals == NULL ) { if( vals == NULL ) {
Debug( LDAP_DEBUG_TRACE, Debug( LDAP_DEBUG_TRACE,
"=> index_change_values( %s, NULL, %ld, op=%s )\n", "=> index_change_values( %s, NULL, %ld, op=%s )\n",
@ -278,7 +592,7 @@ index_change_values(
#ifndef SLAPD_SCHEMA_NOT_COMPAT #ifndef SLAPD_SCHEMA_NOT_COMPAT
attr_normalize(type); attr_normalize(type);
#endif #endif
attr_mask( be->be_private, type, &indexmask ); attr_mask( be->be_private, desc, &indexmask );
if ( indexmask == 0 ) { if ( indexmask == 0 ) {
return( 0 ); return( 0 );
@ -307,20 +621,19 @@ index_change_values(
return( -1 ); return( -1 );
} }
#ifdef SLAPD_SCHEMA_NOT_COMPAT
/* not yet implemented */
#else
/* /*
* presence index entry * presence index entry
*/ */
if ( indexmask & SLAP_INDEX_PRESENCE ) { if ( indexmask & SLAP_INDEX_PRESENT ) {
change_value( be, db, at_cn, SLAP_INDEX_PRESENCE, change_value( be, db, at_cn, SLAP_INDEX_PRESENT,
"*", id, idl_funct ); "*", id, idl_funct );
} }
#ifndef SLAPD_SCHEMA_NOT_COMPAT
if ( syntax & SYNTAX_BIN ) { if ( syntax & SYNTAX_BIN ) {
goto done; goto done;
} }
#endif
for ( i = 0; vals[i] != NULL; i++ ) { for ( i = 0; vals[i] != NULL; i++ ) {
Debug( LDAP_DEBUG_TRACE, Debug( LDAP_DEBUG_TRACE,
@ -340,7 +653,9 @@ index_change_values(
(void) memcpy( val, vals[i]->bv_val, len ); (void) memcpy( val, vals[i]->bv_val, len );
val[len] = '\0'; val[len] = '\0';
#ifndef SLAPD_SCHEMA_NOT_COMPAT
value_normalize( val, syntax ); value_normalize( val, syntax );
#endif
/* value_normalize could change the length of val */ /* value_normalize could change the length of val */
len = strlen( val ); len = strlen( val );
@ -414,35 +729,10 @@ index_change_values(
free( bigbuf ); free( bigbuf );
} }
} }
#endif
done:
ldbm_cache_close( be, db );
#endif
return( 0 );
}
#ifndef SLAPD_SCHEMA_NOT_COMPAT #ifndef SLAPD_SCHEMA_NOT_COMPAT
static int done:
index2prefix( int indextype ) #endif
{ ldbm_cache_close( be, db );
int prefix; return LDAP_SUCCESS;
switch ( indextype ) {
case SLAP_INDEX_EQUALITY:
prefix = EQ_PREFIX;
break;
case SLAP_INDEX_APPROX:
prefix = APPROX_PREFIX;
break;
case SLAP_INDEX_SUBSTR:
prefix = SUB_PREFIX;
break;
default:
prefix = UNKNOWN_PREFIX;
break;
}
return( prefix );
} }
#endif #endif

View file

@ -79,7 +79,9 @@ ldbm_back_initialize(
bi->bi_tool_entry_get = ldbm_tool_entry_get; bi->bi_tool_entry_get = ldbm_tool_entry_get;
bi->bi_tool_entry_put = ldbm_tool_entry_put; bi->bi_tool_entry_put = ldbm_tool_entry_put;
bi->bi_tool_index_attr = ldbm_tool_index_attr; bi->bi_tool_index_attr = ldbm_tool_index_attr;
#ifndef SLAPD_SCHEMA_NOT_COMPAT
bi->bi_tool_index_change = ldbm_tool_index_change; bi->bi_tool_index_change = ldbm_tool_index_change;
#endif
bi->bi_tool_sync = ldbm_tool_sync; bi->bi_tool_sync = ldbm_tool_sync;
#ifdef HAVE_CYRUS_SASL #ifdef HAVE_CYRUS_SASL
@ -132,7 +134,6 @@ ldbm_back_db_init(
) )
{ {
struct ldbminfo *li; struct ldbminfo *li;
char *argv[ 4 ];
/* allocate backend-database-specific stuff */ /* allocate backend-database-specific stuff */
li = (struct ldbminfo *) ch_calloc( 1, sizeof(struct ldbminfo) ); li = (struct ldbminfo *) ch_calloc( 1, sizeof(struct ldbminfo) );
@ -158,12 +159,6 @@ ldbm_back_db_init(
/* default database directory */ /* default database directory */
li->li_directory = ch_strdup( DEFAULT_DB_DIRECTORY ); li->li_directory = ch_strdup( DEFAULT_DB_DIRECTORY );
argv[ 0 ] = "objectclass";
argv[ 1 ] = "eq";
argv[ 2 ] = NULL;
attr_index_config( li, "ldbm objectclass initialization",
0, 2, argv, 1 );
/* initialize various mutex locks & condition variables */ /* initialize various mutex locks & condition variables */
ldap_pvt_thread_mutex_init( &li->li_root_mutex ); ldap_pvt_thread_mutex_init( &li->li_root_mutex );
ldap_pvt_thread_mutex_init( &li->li_add_mutex ); ldap_pvt_thread_mutex_init( &li->li_add_mutex );
@ -182,6 +177,17 @@ ldbm_back_db_open(
BackendDB *be BackendDB *be
) )
{ {
struct ldbminfo *li = (struct ldbminfo *) be->be_private;
char *argv[ 4 ];
/* allocate backend-database-specific stuff */
argv[ 0 ] = "objectclass";
argv[ 1 ] = "eq";
argv[ 2 ] = NULL;
attr_index_config( li, "ldbm objectclass initialization",
0, 2, argv, 1 );
return 0; return 0;
} }

View file

@ -0,0 +1,80 @@
/* index.c - routines for dealing with attribute indexes */
/* $OpenLDAP$ */
/*
* Copyright 1998-2000 The OpenLDAP Foundation, All Rights Reserved.
* COPYING RESTRICTIONS APPLY, see COPYRIGHT file
*/
#include "portable.h"
#include <stdio.h>
#include <ac/string.h>
#include <ac/socket.h>
#include "slap.h"
#include "back-ldbm.h"
/* read a key */
int
key_read(
Backend *be,
DBCache *db,
struct berval *k,
ID_BLOCK **idout
)
{
Datum key;
ID_BLOCK *idl;
Debug( LDAP_DEBUG_TRACE, "=> key_read\n", 0, 0, 0 );
ldbm_datum_init( key );
key.dptr = k->bv_val;
key.dsize = k->bv_len;
idl = idl_fetch( be, db, key );
Debug( LDAP_DEBUG_TRACE, "<= index_read %ld candidates\n",
idl ? ID_BLOCK_NIDS(idl) : 0, 0, 0 );
*idout = idl;
return LDAP_SUCCESS;
}
/* Add or remove stuff from index files */
int
key_change(
Backend *be,
DBCache *db,
struct berval *k,
ID id,
int op
)
{
int rc;
Datum key;
Debug( LDAP_DEBUG_TRACE, "=> key_change(%s,%lx)\n",
op == SLAP_INDEX_ADD_OP ? "ADD":"DELETE", (long) id, 0 );
ldbm_datum_init( key );
key.dptr = k->bv_val;
key.dsize = k->bv_len;
if (op == SLAP_INDEX_ADD_OP) {
/* Add values */
rc = idl_insert_key( be, db, key, id );
} else {
/* Delete values */
rc = idl_delete_key( be, db, key, id );
}
Debug( LDAP_DEBUG_TRACE, "<= key_change %d\n", rc, 0, 0 );
ldap_pvt_thread_yield();
return rc;
}

View file

@ -154,86 +154,14 @@ int ldbm_modify_internal(
} }
ldap_pvt_thread_mutex_unlock( &op->o_abandonmutex ); ldap_pvt_thread_mutex_unlock( &op->o_abandonmutex );
/* run through the attributes removing old indices */ /* delete indices for old attributes */
for ( ml = modlist; ml != NULL; ml = ml->sml_next ) { index_entry_del( be, e, save_attrs);
mod = &ml->sml_mod;
switch ( mod->sm_op ) { /* add indices for new attributes */
case LDAP_MOD_REPLACE: { index_entry_add( be, e, e->e_attrs);
/* Need to remove all values from indexes */
#ifdef SLAPD_SCHEMA_NOT_COMPAT
/* not yet implemented */
#else
Attribute *a = save_attrs
? attr_find( save_attrs, mod->sm_desc )
: NULL;
if( a != NULL ) {
(void) index_change_values( be,
mod->mod_type,
a->a_vals,
e->e_id,
SLAP_INDEX_DELETE_OP );
}
#endif
} break;
case LDAP_MOD_DELETE:
#ifdef SLAPD_SCHEMA_NOT_COMPAT
/* not yet implemented */
#else
/* remove deleted values */
(void) index_change_values( be,
mod->mod_type,
mod->mod_bvalues,
e->e_id,
SLAP_INDEX_DELETE_OP );
#endif
break;
}
}
attrs_free( save_attrs ); attrs_free( save_attrs );
/* run through the attributes adding new indices */
for ( ml = modlist; ml != NULL; ml = ml->sml_next ) {
mod = &ml->sml_mod;
switch ( mod->sm_op ) {
case LDAP_MOD_REPLACE:
case LDAP_MOD_ADD:
#ifdef SLAPD_SCHEMA_NOT_COMPAT
/* not yet implemented */
#else
(void) index_change_values( be,
mod->mod_type,
mod->mod_bvalues,
e->e_id,
SLAP_INDEX_ADD_OP );
#endif
break;
case LDAP_MOD_DELETE: {
/* Need to add all remaining values */
#ifdef SLAPD_SCHEMA_NOT_COMPAT
/* not yet implemented */
#else
Attribute *a = e->e_attrs
? attr_find( e->e_attrs, mod->sm_desc )
: NULL;
if( a != NULL ) {
(void) index_change_values( be,
mod->mod_type,
a->a_vals,
e->e_id,
SLAP_INDEX_ADD_OP );
}
#endif
} break;
}
}
return LDAP_SUCCESS; return LDAP_SUCCESS;
} }

View file

@ -33,8 +33,11 @@ Entry *deref_internal_r LDAP_P((
* attr.c * attr.c
*/ */
void attr_mask LDAP_P(( struct ldbminfo *li, const char *type, int *indexmask )); void attr_mask LDAP_P(( struct ldbminfo *li,
void attr_index_config LDAP_P(( struct ldbminfo *li, const char *desc,
slap_index *indexmask ));
int attr_index_config LDAP_P(( struct ldbminfo *li,
const char *fname, int lineno, const char *fname, int lineno,
int argc, char **argv, int init )); int argc, char **argv, int init ));
void attr_index_destroy LDAP_P(( Avlnode *tree )); void attr_index_destroy LDAP_P(( Avlnode *tree ));
@ -130,14 +133,57 @@ ID idl_nextid LDAP_P(( ID_BLOCK *idl, ID *cursor ));
/* /*
* index.c * index.c
*/ */
#ifdef SLAPD_SCHEMA_NOT_COMPAT
extern int
index_param LDAP_P((
Backend *be,
AttributeDescription *desc,
int ftype,
char **dbname,
slap_index *mask,
struct berval **prefix ));
int index_add_entry LDAP_P(( Backend *be, Entry *e )); extern int
index_values LDAP_P((
Backend *be,
AttributeDescription *desc,
struct berval **vals,
ID id,
int op ));
#endif
int index_entry LDAP_P(( Backend *be, int r, Entry *e, Attribute *ap ));
#define index_entry_add(be,e,ap) index_entry((be),SLAP_INDEX_ADD_OP,(e),(ap))
#define index_entry_del(be,e,ap) index_entry((be),SLAP_INDEX_DELETE_OP,(e),(ap))
#ifndef SLAPD_SCHEMA_NOT_COMPAT
int index_change_values LDAP_P((
Backend *be,
char *desc,
struct berval **vals,
ID id,
unsigned int op
));
ID_BLOCK * index_read LDAP_P(( Backend *be, ID_BLOCK * index_read LDAP_P(( Backend *be,
char *type, int indextype, char *val )); char *desc, int indextype, char *val ));
/* Possible operations supported (op) by index_change_values() */ #endif
int index_change_values LDAP_P(( Backend *be,
char *type, struct berval **vals, /*
ID id, unsigned int op )); * key.c
*/
extern int
key_change LDAP_P((
Backend *be,
DBCache *db,
struct berval *k,
ID id,
int op ));
extern int
key_read LDAP_P((
Backend *be,
DBCache *db,
struct berval *k,
ID_BLOCK **idout ));
/* /*
* passwd.c * passwd.c

View file

@ -160,7 +160,7 @@ ID ldbm_tool_entry_put(
Debug( LDAP_DEBUG_TRACE, "=> ldbm_tool_entry_put( %ld, \"%s\" )\n", Debug( LDAP_DEBUG_TRACE, "=> ldbm_tool_entry_put( %ld, \"%s\" )\n",
e->e_id, e->e_dn, 0 ); e->e_id, e->e_dn, 0 );
rc = index_add_entry( be, e ); rc = index_entry_add( be, e, e->e_attrs );
if( rc != 0 ) { if( rc != 0 ) {
return NOID; return NOID;
@ -202,18 +202,21 @@ int ldbm_tool_index_attr(
) )
{ {
static DBCache *db = NULL; static DBCache *db = NULL;
int indexmask; slap_index indexmask;
char * at_cn; #ifndef SLAPD_SCHEMA_NOT_COMPAT
char *desc;
#endif
char *at_cname;
assert( slapMode & SLAP_TOOL_MODE ); assert( slapMode & SLAP_TOOL_MODE );
#ifdef SLAPD_SCHEMA_NOT_COMPAT #ifdef SLAPD_SCHEMA_NOT_COMPAT
at_cn = desc->ad_cname->bv_val; at_cname = desc->ad_cname->bv_val;
#else #else
attr_normalize( type ); attr_normalize( type );
at_cn = at_canonical_name( type ); at_cname = desc = at_canonical_name( type );
if( at_cn == NULL ) { if( desc == NULL ) {
Debug( LDAP_DEBUG_ANY, Debug( LDAP_DEBUG_ANY,
"<= index_attr NULL (attribute type %s has no canonical name)\n", "<= index_attr NULL (attribute type %s has no canonical name)\n",
type, 0, 0 ); type, 0, 0 );
@ -221,14 +224,14 @@ int ldbm_tool_index_attr(
} }
#endif #endif
assert( at_cn != NULL ); assert( desc != NULL );
attr_mask( be->be_private, at_cn, &indexmask ); attr_mask( be->be_private, desc, &indexmask );
if ( (db = ldbm_cache_open( be, at_cn, LDBM_SUFFIX, LDBM_NEWDB )) if ( (db = ldbm_cache_open( be, at_cname, LDBM_SUFFIX, LDBM_NEWDB ))
== NULL ) == NULL )
{ {
Debug( LDAP_DEBUG_ANY, Debug( LDAP_DEBUG_ANY,
"<= index_attr NULL (could not open %s%s)\n", at_cn, "<= index_attr NULL (could not open %s%s)\n", at_cname,
LDBM_SUFFIX, 0 ); LDBM_SUFFIX, 0 );
return 0; return 0;
} }
@ -243,22 +246,22 @@ int ldbm_tool_index_change(
#ifdef SLAPD_SCHEMA_NOT_COMPAT #ifdef SLAPD_SCHEMA_NOT_COMPAT
AttributeDescription *desc, AttributeDescription *desc,
#else #else
char* type, char* desc,
#endif #endif
struct berval **bv, struct berval **bv,
ID id, ID id,
int op ) int op )
{ {
#ifdef SLAPD_SCHEMA_NOT_COMPAT
char *type = desc->ad_cname->bv_val;
#endif
assert( slapMode & SLAP_TOOL_MODE ); assert( slapMode & SLAP_TOOL_MODE );
#ifdef SLAPD_SCHEMA_NOT_COMPAT
index_values( be, desc, bv, id, op );
#else
index_change_values( be, index_change_values( be,
type, bv, id, op ); desc, bv, id, op );
return 0; return 0;
#endif
} }
int ldbm_tool_sync( BackendDB *be ) int ldbm_tool_sync( BackendDB *be )

View file

@ -110,8 +110,8 @@ str2entry( char *s )
maxvals = 0; maxvals = 0;
a = NULL; a = NULL;
} }
#endif
#endif
if ( strcasecmp( type, "dn" ) == 0 ) { if ( strcasecmp( type, "dn" ) == 0 ) {
free( type ); free( type );

View file

@ -229,8 +229,11 @@ test_ava_filter(
MatchingRule *mr; MatchingRule *mr;
switch ( type ) { switch ( type ) {
case LDAP_FILTER_EQUALITY:
case LDAP_FILTER_APPROX: case LDAP_FILTER_APPROX:
mr = a->a_desc->ad_type->sat_approx;
if( mr != NULL ) break;
case LDAP_FILTER_EQUALITY:
mr = a->a_desc->ad_type->sat_equality; mr = a->a_desc->ad_type->sat_equality;
break; break;

68
servers/slapd/index.c Normal file
View file

@ -0,0 +1,68 @@
/* index.c - index utilities */
/* $OpenLDAP$ */
/*
* Copyright 1998-2000 The OpenLDAP Foundation, All Rights Reserved.
* COPYING RESTRICTIONS APPLY, see COPYRIGHT file
*/
#include "portable.h"
#include <stdio.h>
#include "slap.h"
int
slap_index2prefix( int indextype )
{
int prefix;
switch ( indextype ) {
case SLAP_INDEX_EQUALITY:
prefix = SLAP_INDEX_EQUALITY_PREFIX;
break;
case SLAP_INDEX_APPROX:
prefix = SLAP_INDEX_APPROX_PREFIX;
break;
case SLAP_INDEX_SUBSTR:
prefix = SLAP_INDEX_SUBSTR_PREFIX;
break;
default:
prefix = SLAP_INDEX_UNKNOWN_PREFIX;
break;
}
return( prefix );
}
int slap_str2index( const char *str, slap_index *idx )
{
if ( strcasecmp( str, "pres" ) == 0 ) {
*idx = SLAP_INDEX_PRESENT;
} else if ( strcasecmp( str, "eq" ) == 0 ) {
*idx = SLAP_INDEX_EQUALITY;
} else if ( strcasecmp( str, "approx" ) == 0 ) {
*idx = SLAP_INDEX_APPROX;
} else if ( strcasecmp( str, "subinitial" ) == 0 ) {
*idx = SLAP_INDEX_SUBSTR_INITIAL;
} else if ( strcasecmp( str, "subany" ) == 0 ) {
*idx = SLAP_INDEX_SUBSTR_ANY;
} else if ( strcasecmp( str, "subfinal" ) == 0 ) {
*idx = SLAP_INDEX_SUBSTR_FINAL;
} else if ( strcasecmp( str, "substr" ) == 0 ||
strcasecmp( str, "sub" ) == 0 )
{
*idx = SLAP_INDEX_SUBSTR_DEFAULT;
} else if ( strcasecmp( str, "lang" ) == 0 ) {
*idx = SLAP_INDEX_LANG;
} else if ( strcasecmp( str, "autolang" ) == 0 ) {
*idx = SLAP_INDEX_AUTO_LANG;
} else if ( strcasecmp( str, "subtypes" ) == 0 ) {
*idx = SLAP_INDEX_SUBTYPES;
} else if ( strcasecmp( str, "autosubtypes" ) == 0 ) {
*idx = SLAP_INDEX_AUTO_SUBTYPES;
} else {
return LDAP_OTHER;
}
return LDAP_SUCCESS;
}

View file

@ -224,6 +224,10 @@ SOURCE=.\filterentry.c
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=.\index.c
# End Source File
# Begin Source File
SOURCE=.\init.c SOURCE=.\init.c
# End Source File # End Source File
# Begin Source File # Begin Source File
@ -296,6 +300,10 @@ SOURCE=.\schema_init.c
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=.\schema_prep.c
# End Source File
# Begin Source File
SOURCE=.\schemaparse.c SOURCE=.\schemaparse.c
# End Source File # End Source File
# Begin Source File # Begin Source File

View file

@ -267,6 +267,13 @@ LIBSLAPD_F (int) get_manageDSAit LDAP_P(( Operation *op ));
LIBSLAPD_F (int) read_config LDAP_P(( const char *fname )); LIBSLAPD_F (int) read_config LDAP_P(( const char *fname ));
/*
* index.c
*/
LIBSLAPD_F (int) slap_index2prefix LDAP_P(( int indextype ));
LIBSLAPD_F (int) slap_str2index LDAP_P(( const char *str, slap_index *idx ));
/* /*
* connection.c * connection.c
*/ */

View file

@ -15,6 +15,125 @@
#include "slap.h" #include "slap.h"
#include "ldap_pvt.h" #include "ldap_pvt.h"
#include "lutil_md5.h"
static int
octetStringMatch(
int *matchp,
unsigned use,
Syntax *syntax,
MatchingRule *mr,
struct berval *value,
void *assertedValue )
{
int match = value->bv_len - ((struct berval *) assertedValue)->bv_len;
if( match == 0 ) {
match = memcmp( value->bv_val,
((struct berval *) assertedValue)->bv_val,
value->bv_len );
}
*matchp = match;
return LDAP_SUCCESS;
}
/* Index generation function */
int octetStringIndexer(
unsigned use,
Syntax *syntax,
MatchingRule *mr,
struct berval *prefix,
struct berval **values,
struct berval ***keysp )
{
int i;
size_t slen, mlen;
struct berval **keys;
lutil_MD5_CTX MD5context;
unsigned char MD5digest[16];
struct berval digest;
digest.bv_val = MD5digest;
digest.bv_len = sizeof(MD5digest);
for( i=0; values[i] != NULL; i++ ) {
/* just count them */
}
assert( i > 0 );
keys = ch_malloc( sizeof( struct berval * ) * (i+1) );
slen = strlen( syntax->ssyn_oid );
mlen = strlen( mr->smr_oid );
for( i=0; values[i] != NULL; i++ ) {
lutil_MD5Init( &MD5context );
if( prefix != NULL && prefix->bv_len > 0 ) {
lutil_MD5Update( &MD5context,
prefix->bv_val, prefix->bv_len );
}
lutil_MD5Update( &MD5context,
syntax->ssyn_oid, slen );
lutil_MD5Update( &MD5context,
mr->smr_oid, mlen );
lutil_MD5Update( &MD5context,
values[i]->bv_val, values[i]->bv_len );
lutil_MD5Final( MD5digest, &MD5context );
keys[i] = ber_bvdup( &digest );
}
keys[i] = NULL;
*keysp = keys;
return LDAP_SUCCESS;
}
/* Index generation function */
int octetStringFilter(
unsigned use,
Syntax *syntax,
MatchingRule *mr,
struct berval *prefix,
void * assertValue,
struct berval ***keysp )
{
size_t slen, mlen;
struct berval **keys;
lutil_MD5_CTX MD5context;
unsigned char MD5digest[LUTIL_MD5_BYTES];
struct berval *value = (struct berval *) assertValue;
struct berval digest;
digest.bv_val = MD5digest;
digest.bv_len = sizeof(MD5digest);
slen = strlen( syntax->ssyn_oid );
mlen = strlen( mr->smr_oid );
keys = ch_malloc( sizeof( struct berval * ) * 2 );
lutil_MD5Init( &MD5context );
if( prefix != NULL && prefix->bv_len > 0 ) {
lutil_MD5Update( &MD5context,
prefix->bv_val, prefix->bv_len );
}
lutil_MD5Update( &MD5context,
syntax->ssyn_oid, slen );
lutil_MD5Update( &MD5context,
mr->smr_oid, mlen );
lutil_MD5Update( &MD5context,
value->bv_val, value->bv_len );
lutil_MD5Final( MD5digest, &MD5context );
keys[0] = ber_bvdup( &digest );
keys[1] = NULL;
*keysp = keys;
return LDAP_SUCCESS;
}
static int static int
dnValidate( dnValidate(
@ -666,6 +785,110 @@ done:
} }
#endif #endif
/* Index generation function */
int caseIgnoreIA5Indexer(
unsigned use,
Syntax *syntax,
MatchingRule *mr,
struct berval *prefix,
struct berval **values,
struct berval ***keysp )
{
int i;
size_t slen, mlen;
struct berval **keys;
lutil_MD5_CTX MD5context;
unsigned char MD5digest[16];
struct berval digest;
digest.bv_val = MD5digest;
digest.bv_len = sizeof(MD5digest);
for( i=0; values[i] != NULL; i++ ) {
/* just count them */
}
assert( i > 0 );
keys = ch_malloc( sizeof( struct berval * ) * (i+1) );
slen = strlen( syntax->ssyn_oid );
mlen = strlen( mr->smr_oid );
for( i=0; values[i] != NULL; i++ ) {
struct berval *value = ber_bvdup( values[i] );
ldap_pvt_str2upper( value->bv_val );
lutil_MD5Init( &MD5context );
if( prefix != NULL && prefix->bv_len > 0 ) {
lutil_MD5Update( &MD5context,
prefix->bv_val, prefix->bv_len );
}
lutil_MD5Update( &MD5context,
syntax->ssyn_oid, slen );
lutil_MD5Update( &MD5context,
mr->smr_oid, mlen );
lutil_MD5Update( &MD5context,
value->bv_val, value->bv_len );
lutil_MD5Final( MD5digest, &MD5context );
ber_bvfree( value );
keys[i] = ber_bvdup( &digest );
}
keys[i] = NULL;
*keysp = keys;
return LDAP_SUCCESS;
}
/* Index generation function */
int caseIgnoreIA5Filter(
unsigned use,
Syntax *syntax,
MatchingRule *mr,
struct berval *prefix,
void * assertValue,
struct berval ***keysp )
{
size_t slen, mlen;
struct berval **keys;
lutil_MD5_CTX MD5context;
unsigned char MD5digest[LUTIL_MD5_BYTES];
struct berval *value;
struct berval digest;
digest.bv_val = MD5digest;
digest.bv_len = sizeof(MD5digest);
slen = strlen( syntax->ssyn_oid );
mlen = strlen( mr->smr_oid );
value = ber_bvdup( (struct berval *) assertValue );
ldap_pvt_str2upper( value->bv_val );
keys = ch_malloc( sizeof( struct berval * ) * 2 );
lutil_MD5Init( &MD5context );
if( prefix != NULL && prefix->bv_len > 0 ) {
lutil_MD5Update( &MD5context,
prefix->bv_val, prefix->bv_len );
}
lutil_MD5Update( &MD5context,
syntax->ssyn_oid, slen );
lutil_MD5Update( &MD5context,
mr->smr_oid, mlen );
lutil_MD5Update( &MD5context,
value->bv_val, value->bv_len );
lutil_MD5Final( MD5digest, &MD5context );
keys[0] = ber_bvdup( &digest );
keys[1] = NULL;
ber_bvfree( value );
*keysp = keys;
return LDAP_SUCCESS;
}
static int static int
NumericStringNormalize( NumericStringNormalize(
Syntax *syntax, Syntax *syntax,
@ -856,8 +1079,10 @@ struct syntax_defs_rec syntax_defs[] = {
0, NULL, NULL, NULL}, 0, NULL, NULL, NULL},
{"( 1.3.6.1.4.1.4203.666.2.3 DESC 'OpenLDAP void' " X_HIDE ")" , {"( 1.3.6.1.4.1.4203.666.2.3 DESC 'OpenLDAP void' " X_HIDE ")" ,
SLAP_SYNTAX_HIDE, inValidate, NULL, NULL}, SLAP_SYNTAX_HIDE, inValidate, NULL, NULL},
#if 0 /* not needed */
{"( 1.3.6.1.4.1.4203.666.2.4 DESC 'OpenLDAP DN' " X_HIDE ")" , {"( 1.3.6.1.4.1.4203.666.2.4 DESC 'OpenLDAP DN' " X_HIDE ")" ,
SLAP_SYNTAX_HIDE, inValidate, NULL, NULL}, SLAP_SYNTAX_HIDE, inValidate, NULL, NULL},
#endif
{NULL, 0, NULL, NULL, NULL} {NULL, 0, NULL, NULL, NULL}
}; };
@ -931,21 +1156,33 @@ struct mrule_defs_rec {
#define OpenLDAPaciMatch NULL #define OpenLDAPaciMatch NULL
#define authPasswordMatch NULL #define authPasswordMatch NULL
/* unimplied indexer/filter routines */
#define dnIndexer NULL
#define dnFilter NULL
#define caseIgnoreIndexer caseIgnoreIA5Indexer
#define caseIgnoreFilter caseIgnoreIA5Filter
#define caseExactIndexer caseExactIA5Indexer
#define caseExactFilter caseExactIA5Filter
#define caseExactIA5Indexer caseIgnoreIA5Indexer
#define caseExactIA5Filter caseIgnoreIA5Filter
struct mrule_defs_rec mrule_defs[] = { struct mrule_defs_rec mrule_defs[] = {
{"( 2.5.13.0 NAME 'objectIdentifierMatch' " {"( 2.5.13.0 NAME 'objectIdentifierMatch' "
"SYNTAX 1.3.6.1.4.1.1466.115.121.1.38 )", "SYNTAX 1.3.6.1.4.1.1466.115.121.1.38 )",
SLAP_MR_EQUALITY | SLAP_MR_EXT, SLAP_MR_EQUALITY | SLAP_MR_EXT,
NULL, NULL, objectIdentifierMatch, NULL, NULL}, NULL, NULL, objectIdentifierMatch,
caseIgnoreIA5Indexer, caseIgnoreIA5Filter},
{"( 2.5.13.1 NAME 'distinguishedNameMatch' " {"( 2.5.13.1 NAME 'distinguishedNameMatch' "
"SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 )", "SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 )",
SLAP_MR_EQUALITY | SLAP_MR_EXT, SLAP_MR_EQUALITY | SLAP_MR_EXT,
NULL, NULL, dnMatch, NULL, NULL}, NULL, NULL, dnMatch, dnIndexer, dnFilter},
{"( 2.5.13.2 NAME 'caseIgnoreMatch' " {"( 2.5.13.2 NAME 'caseIgnoreMatch' "
"SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )", "SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )",
SLAP_MR_EQUALITY | SLAP_MR_EXT, SLAP_MR_EQUALITY | SLAP_MR_EXT,
NULL, NULL, caseIgnoreMatch, NULL, NULL}, NULL, NULL, caseIgnoreMatch, caseIgnoreIndexer, caseIgnoreFilter},
{"( 2.5.13.3 NAME 'caseIgnoreOrderingMatch' " {"( 2.5.13.3 NAME 'caseIgnoreOrderingMatch' "
"SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )", "SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )",
@ -961,7 +1198,7 @@ struct mrule_defs_rec mrule_defs[] = {
{"( 2.5.13.5 NAME 'caseExactMatch' " {"( 2.5.13.5 NAME 'caseExactMatch' "
"SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )", "SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )",
SLAP_MR_EQUALITY | SLAP_MR_EXT, SLAP_MR_EQUALITY | SLAP_MR_EXT,
NULL, NULL, caseExactMatch, NULL, NULL}, NULL, NULL, caseExactMatch, caseExactIndexer, caseExactFilter},
{"( 2.5.13.6 NAME 'caseExactOrderingMatch' " {"( 2.5.13.6 NAME 'caseExactOrderingMatch' "
"SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )", "SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )",
@ -1006,7 +1243,7 @@ struct mrule_defs_rec mrule_defs[] = {
{"( 2.5.13.17 NAME 'octetStringMatch' " {"( 2.5.13.17 NAME 'octetStringMatch' "
"SYNTAX 1.3.6.1.4.1.1466.115.121.1.40 )", "SYNTAX 1.3.6.1.4.1.1466.115.121.1.40 )",
SLAP_MR_EQUALITY | SLAP_MR_EXT, SLAP_MR_EQUALITY | SLAP_MR_EXT,
NULL, NULL, octetStringMatch, NULL, NULL}, NULL, NULL, octetStringMatch, octetStringIndexer, octetStringFilter},
{"( 2.5.13.20 NAME 'telephoneNumberMatch' " {"( 2.5.13.20 NAME 'telephoneNumberMatch' "
"SYNTAX 1.3.6.1.4.1.1466.115.121.1.50 )", "SYNTAX 1.3.6.1.4.1.1466.115.121.1.50 )",
@ -1056,12 +1293,12 @@ struct mrule_defs_rec mrule_defs[] = {
{"( 1.3.6.1.4.1.1466.109.114.1 NAME 'caseExactIA5Match' " {"( 1.3.6.1.4.1.1466.109.114.1 NAME 'caseExactIA5Match' "
"SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )", "SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )",
SLAP_MR_EQUALITY | SLAP_MR_EXT, SLAP_MR_EQUALITY | SLAP_MR_EXT,
NULL, NULL, caseExactIA5Match, NULL, NULL}, NULL, NULL, caseExactIA5Match, caseExactIA5Indexer, caseExactIA5Filter},
{"( 1.3.6.1.4.1.1466.109.114.2 NAME 'caseIgnoreIA5Match' " {"( 1.3.6.1.4.1.1466.109.114.2 NAME 'caseIgnoreIA5Match' "
"SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )", "SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )",
SLAP_MR_EQUALITY | SLAP_MR_EXT, SLAP_MR_EQUALITY | SLAP_MR_EXT,
NULL, NULL, caseIgnoreIA5Match, NULL, NULL}, NULL, NULL, caseIgnoreIA5Match, caseExactIA5Indexer, caseExactIA5Filter},
{"( 1.3.6.1.4.1.1466.109.114.3 NAME 'caseIgnoreIA5SubstringsMatch' " {"( 1.3.6.1.4.1.1466.109.114.3 NAME 'caseIgnoreIA5SubstringsMatch' "
"SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )", "SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )",

View file

@ -108,13 +108,43 @@ LIBSLAPD_F (int) slap_debug;
/* /*
* Index types * Index types
*/ */
#define SLAP_INDEX_PRESENCE 0x0001U #define SLAP_INDEX_TYPE 0x00FFUL
#define SLAP_INDEX_EQUALITY 0x0002U #define SLAP_INDEX_UNDEFINED 0x0001UL
#define SLAP_INDEX_APPROX 0x0004U #define SLAP_INDEX_PRESENT 0x0002UL
#define SLAP_INDEX_SUBSTR 0x0008U #define SLAP_INDEX_EQUALITY 0x0004UL
#define SLAP_INDEX_EXTENDED 0x0010U #define SLAP_INDEX_APPROX 0x0008UL
#define SLAP_INDEX_UNDEFINED 0x1000U #define SLAP_INDEX_SUBSTR 0x0010UL
#define SLAP_INDEX_FROMINIT 0x8000U /* psuedo type */ #define SLAP_INDEX_EXTENDED 0x0020UL
#define SLAP_INDEX_DEFAULT SLAP_INDEX_EQUALITY
#define IS_SLAP_INDEX(mask, type) (((mask) & (type)) == (type) )
#define SLAP_INDEX_SUBSTR_TYPE 0x0F00UL
#define SLAP_INDEX_SUBSTR_INITIAL ( SLAP_INDEX_SUBSTR | 0x0100UL )
#define SLAP_INDEX_SUBSTR_ANY ( SLAP_INDEX_SUBSTR | 0x0200UL )
#define SLAP_INDEX_SUBSTR_FINAL ( SLAP_INDEX_SUBSTR | 0x0400UL )
#define SLAP_INDEX_SUBSTR_DEFAULT ( SLAP_INDEX_SUBSTR \
| SLAP_INDEX_SUBSTR_INITIAL | SLAP_INDEX_SUBSTR_FINAL )
#define SLAP_INDEX_FLAGS 0xF000UL
#define SLAP_INDEX_SUBTYPES 0x1000UL /* use index with subtypes */
#define SLAP_INDEX_AUTO_SUBTYPES 0x2000UL /* use mask with subtypes */
#define SLAP_INDEX_LANG 0x4000UL /* use index with lang subtypes */
#define SLAP_INDEX_AUTO_LANG 0x8000UL /* use mask with lang subtypes */
typedef long slap_index;
/*
* there is a single index for each attribute. these prefixes ensure
* that there is no collision among keys.
*/
#define SLAP_INDEX_EQUALITY_PREFIX '=' /* prefix for equality keys */
#define SLAP_INDEX_APPROX_PREFIX '~' /* prefix for approx keys */
#define SLAP_INDEX_SUBSTR_PREFIX '*' /* prefix for substring keys */
#define SLAP_INDEX_CONT_PREFIX '.' /* prefix for continuation keys */
#define SLAP_INDEX_UNKNOWN_PREFIX '?' /* prefix for unknown keys */
/* /*
* represents schema information for a database * represents schema information for a database
@ -211,18 +241,18 @@ typedef int slap_mr_indexer_func LDAP_P((
unsigned use, unsigned use,
struct slap_syntax *syntax, /* syntax of stored value */ struct slap_syntax *syntax, /* syntax of stored value */
struct slap_matching_rule *mr, struct slap_matching_rule *mr,
struct berval *prefix,
struct berval **values, struct berval **values,
struct berval **keys )); struct berval ***keys ));
struct slap_filter; /* forward declaration */
/* Filter index function */ /* Filter index function */
typedef int slap_mr_filter_func LDAP_P(( typedef int slap_mr_filter_func LDAP_P((
unsigned use, unsigned use,
struct slap_syntax *syntax, /* syntax of stored value */ struct slap_syntax *syntax, /* syntax of stored value */
struct slap_matching_rule *mr, struct slap_matching_rule *mr,
struct slap_filter *filter, struct berval *prefix,
struct berval **keys )); void * assertValue,
struct berval ***keys ));
typedef struct slap_matching_rule { typedef struct slap_matching_rule {
LDAP_MATCHING_RULE smr_mrule; LDAP_MATCHING_RULE smr_mrule;
@ -266,6 +296,7 @@ typedef struct slap_attribute_type {
struct slap_attribute_type *sat_sup; struct slap_attribute_type *sat_sup;
struct slap_attribute_type **sat_subtypes; struct slap_attribute_type **sat_subtypes;
MatchingRule *sat_equality; MatchingRule *sat_equality;
MatchingRule *sat_approx;
MatchingRule *sat_ordering; MatchingRule *sat_ordering;
MatchingRule *sat_substr; MatchingRule *sat_substr;
Syntax *sat_syntax; Syntax *sat_syntax;
@ -326,6 +357,7 @@ typedef struct slap_attr_desc {
#define SLAP_DESC_BINARY 0x1U #define SLAP_DESC_BINARY 0x1U
} AttributeDescription; } AttributeDescription;
#define slap_ad_is_lang(ad) ( (ad)->ad_lang != NULL )
#define slap_ad_is_binary(ad) ( (int)((ad)->ad_flags & SLAP_DESC_BINARY) ? 1 : 0 ) #define slap_ad_is_binary(ad) ( (int)((ad)->ad_flags & SLAP_DESC_BINARY) ? 1 : 0 )
/* /*
@ -492,6 +524,7 @@ typedef struct slap_filter {
#define f_dn f_un.f_un_type /* used for DN indices */ #define f_dn f_un.f_un_type /* used for DN indices */
#define f_type f_un.f_un_type #define f_type f_un.f_un_type
#define f_desc f_type
#define f_ava f_un.f_un_ava #define f_ava f_un.f_un_ava
#define f_avtype f_un.f_un_ava.ava_type #define f_avtype f_un.f_un_ava.ava_type
#define f_avvalue f_un.f_un_ava.ava_value #define f_avvalue f_un.f_un_ava.ava_value

View file

@ -53,7 +53,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo # ADD BSC32 /nologo
LINK32=link.exe LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
# ADD LINK32 hs_regex.lib libdb.lib ws2_32.lib advapi32.lib odbc32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\Release" # ADD LINK32 advapi32.lib sasl.lib hs_regex.lib libdb.lib libsasl.lib ws2_32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\Release"
!ELSEIF "$(CFG)" == "slapd - Win32 Debug" !ELSEIF "$(CFG)" == "slapd - Win32 Debug"
@ -77,7 +77,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo # ADD BSC32 /nologo
LINK32=link.exe LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
# ADD LINK32 hs_regex.lib libdb.lib ws2_32.lib advapi32.lib odbc32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\Debug" # ADD LINK32 advapi32.lib hs_regex.lib libdb.lib libsasl.lib ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\Debug"
!ELSEIF "$(CFG)" == "slapd - Win32 Single Debug" !ELSEIF "$(CFG)" == "slapd - Win32 Single Debug"
@ -102,7 +102,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo # ADD BSC32 /nologo
LINK32=link.exe LINK32=link.exe
# ADD BASE LINK32 hs_regexd.lib libdbs.lib wsock32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept # ADD BASE LINK32 hs_regexd.lib libdbs.lib wsock32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
# ADD LINK32 hs_regex.lib libdb.lib ws2_32.lib odbc32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\SDebug" # ADD LINK32 hs_regex.lib libdb.lib libsasl.lib ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\SDebug"
!ELSEIF "$(CFG)" == "slapd - Win32 Single Release" !ELSEIF "$(CFG)" == "slapd - Win32 Single Release"
@ -127,7 +127,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo # ADD BSC32 /nologo
LINK32=link.exe LINK32=link.exe
# ADD BASE LINK32 hs_regex.lib libdb.lib wsock32.lib /nologo /subsystem:console /machine:I386 # ADD BASE LINK32 hs_regex.lib libdb.lib wsock32.lib /nologo /subsystem:console /machine:I386
# ADD LINK32 hs_regex.lib libdb.lib ws2_32.lib odbc32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\SRelease" # ADD LINK32 sasl.lib hs_regex.lib libdb.lib libsasl.lib ws2_32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\SRelease"
!ENDIF !ENDIF

View file

@ -57,7 +57,7 @@ SLAPD_OBJS = ../config.o ../ch_malloc.o ../backend.o ../charray.o \
../schemaparse.o ../ad.o ../at.o ../mr.o ../oc.o ../syntax.o \ ../schemaparse.o ../ad.o ../at.o ../mr.o ../oc.o ../syntax.o \
../acl.o ../phonetic.o ../attr.o ../value.o ../entry.o \ ../acl.o ../phonetic.o ../attr.o ../value.o ../entry.o \
../dn.o ../filter.o ../str2filter.o ../ava.o ../init.o \ ../dn.o ../filter.o ../str2filter.o ../ava.o ../init.o \
../controls.o ../kerberos.o ../passwd.o \ ../controls.o ../kerberos.o ../passwd.o ../index.o \
../extended.o ../starttls.o ../extended.o ../starttls.o
SLAPOBJS = $(SLAPD_OBJS) slapcommon.o mimic.o SLAPOBJS = $(SLAPD_OBJS) slapcommon.o mimic.o

View file

@ -54,7 +54,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo # ADD BSC32 /nologo
LINK32=link.exe LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
# ADD LINK32 libdb.lib hs_regex.lib ws2_32.lib odbc32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\..\Release" # ADD LINK32 libdb.lib libsasl.lib hs_regex.lib ws2_32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\..\Release"
!ELSEIF "$(CFG)" == "ldbmtest - Win32 Debug" !ELSEIF "$(CFG)" == "ldbmtest - Win32 Debug"
@ -78,7 +78,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo # ADD BSC32 /nologo
LINK32=link.exe LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
# ADD LINK32 libdb.lib hs_regex.lib ws2_32.lib odbc32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\..\Debug" # ADD LINK32 libdb.lib libsasl.lib hs_regex.lib ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\..\Debug"
!ELSEIF "$(CFG)" == "ldbmtest - Win32 Single Debug" !ELSEIF "$(CFG)" == "ldbmtest - Win32 Single Debug"
@ -102,7 +102,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo # ADD BSC32 /nologo
LINK32=link.exe LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
# ADD LINK32 libdb.lib hs_regex.lib ws2_32.lib odbc32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\..\SDebug" # ADD LINK32 libdb.lib libsasl.lib hs_regex.lib ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\..\SDebug"
!ELSEIF "$(CFG)" == "ldbmtest - Win32 Single Release" !ELSEIF "$(CFG)" == "ldbmtest - Win32 Single Release"
@ -126,7 +126,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo # ADD BSC32 /nologo
LINK32=link.exe LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
# ADD LINK32 libdbs.lib hs_regex.lib ws2_32.lib odbc32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\..\SRelease" # ADD LINK32 libdbs.lib libsasl.lib hs_regex.lib ws2_32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\..\SRelease"
!ENDIF !ENDIF

View file

@ -53,7 +53,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo # ADD BSC32 /nologo
LINK32=link.exe LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
# ADD LINK32 hs_regex.lib libdb.lib ws2_32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\..\Release" # ADD LINK32 libdb.lib hs_regex.lib libsasl.lib ws2_32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\..\Release"
!ELSEIF "$(CFG)" == "ldif - Win32 Debug" !ELSEIF "$(CFG)" == "ldif - Win32 Debug"
@ -77,7 +77,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo # ADD BSC32 /nologo
LINK32=link.exe LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
# ADD LINK32 hs_regex.lib libdb.lib ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\..\Debug" # ADD LINK32 libdb.lib hs_regex.lib libsasl.lib ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\..\Debug"
!ELSEIF "$(CFG)" == "ldif - Win32 Single Debug" !ELSEIF "$(CFG)" == "ldif - Win32 Single Debug"
@ -102,7 +102,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo # ADD BSC32 /nologo
LINK32=link.exe LINK32=link.exe
# ADD BASE LINK32 oldif32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\..\libraries\Debug" # ADD BASE LINK32 oldif32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\..\libraries\Debug"
# ADD LINK32 hs_regex.lib libdbs.lib ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\..\SDebug" # ADD LINK32 libdbs.lib hs_regex.lib libsasl.lib ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\..\SDebug"
!ELSEIF "$(CFG)" == "ldif - Win32 Single Release" !ELSEIF "$(CFG)" == "ldif - Win32 Single Release"
@ -127,7 +127,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo # ADD BSC32 /nologo
LINK32=link.exe LINK32=link.exe
# ADD BASE LINK32 oldif32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\..\libraries\Release" # ADD BASE LINK32 oldif32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\..\libraries\Release"
# ADD LINK32 hs_regex.lib libdbs.lib ws2_32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\..\SRelease" # ADD LINK32 libdbs.lib hs_regex.lib libsasl.lib ws2_32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\..\SRelease"
!ENDIF !ENDIF

View file

@ -53,7 +53,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo # ADD BSC32 /nologo
LINK32=link.exe LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
# ADD LINK32 hs_regex.lib libdb.lib ws2_32.lib odbc32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\..\Release" # ADD LINK32 libdb.lib sasl.lib hs_regex.lib libsasl.lib ws2_32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\..\Release"
!ELSEIF "$(CFG)" == "slapadd - Win32 Debug" !ELSEIF "$(CFG)" == "slapadd - Win32 Debug"
@ -77,7 +77,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo # ADD BSC32 /nologo
LINK32=link.exe LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
# ADD LINK32 hs_regex.lib libdb.lib ws2_32.lib odbc32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\..\Debug" # ADD LINK32 libdb.lib hs_regex.lib libsasl.lib ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\..\Debug"
!ELSEIF "$(CFG)" == "slapadd - Win32 Single Debug" !ELSEIF "$(CFG)" == "slapadd - Win32 Single Debug"
@ -102,7 +102,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo # ADD BSC32 /nologo
LINK32=link.exe LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib hs_regexd.lib libdbs.lib ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib hs_regexd.lib libdbs.lib ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
# ADD LINK32 hs_regex.lib libdb.lib ws2_32.lib odbc32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\..\SDebug" # ADD LINK32 libdb.lib hs_regex.lib libsasl.lib ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\..\SDebug"
!ELSEIF "$(CFG)" == "slapadd - Win32 Single Release" !ELSEIF "$(CFG)" == "slapadd - Win32 Single Release"
@ -127,7 +127,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo # ADD BSC32 /nologo
LINK32=link.exe LINK32=link.exe
# ADD BASE LINK32 hs_regex.lib libdb.lib ws2_32.lib /nologo /subsystem:console /machine:I386 # ADD BASE LINK32 hs_regex.lib libdb.lib ws2_32.lib /nologo /subsystem:console /machine:I386
# ADD LINK32 hs_regex.lib libdbs.lib ws2_32.lib odbc32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\..\SRelease" # ADD LINK32 libdbs.lib sasl.lib hs_regex.lib libsasl.lib ws2_32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\..\SRelease"
!ENDIF !ENDIF

View file

@ -53,7 +53,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo # ADD BSC32 /nologo
LINK32=link.exe LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
# ADD LINK32 hs_regex.lib libdb.lib ws2_32.lib odbc32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\..\Release" # ADD LINK32 libdb.lib sasl.lib hs_regex.lib libsasl.lib ws2_32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\..\Release"
!ELSEIF "$(CFG)" == "slapcat - Win32 Debug" !ELSEIF "$(CFG)" == "slapcat - Win32 Debug"
@ -77,7 +77,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo # ADD BSC32 /nologo
LINK32=link.exe LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
# ADD LINK32 hs_regex.lib libdb.lib ws2_32.lib odbc32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\..\Debug" # ADD LINK32 libdb.lib hs_regex.lib libsasl.lib ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\..\Debug"
!ELSEIF "$(CFG)" == "slapcat - Win32 Single Debug" !ELSEIF "$(CFG)" == "slapcat - Win32 Single Debug"
@ -102,7 +102,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo # ADD BSC32 /nologo
LINK32=link.exe LINK32=link.exe
# ADD BASE LINK32 oldbm32.lib libdb.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\..\libraries\Debug" # ADD BASE LINK32 oldbm32.lib libdb.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\..\libraries\Debug"
# ADD LINK32 hs_regex.lib libdb.lib ws2_32.lib odbc32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\..\SDebug" # ADD LINK32 libdb.lib hs_regex.lib libsasl.lib ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\..\SDebug"
!ELSEIF "$(CFG)" == "slapcat - Win32 Single Release" !ELSEIF "$(CFG)" == "slapcat - Win32 Single Release"
@ -126,7 +126,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo # ADD BSC32 /nologo
LINK32=link.exe LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib libdb.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\..\libraries\Release" # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib libdb.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\..\libraries\Release"
# ADD LINK32 hs_regex.lib libdbs.lib ws2_32.lib odbc32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\..\SRelease" # ADD LINK32 libdbs.lib sasl.lib hs_regex.lib libsasl.lib ws2_32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\..\SRelease"
!ENDIF !ENDIF

View file

@ -47,17 +47,12 @@ main( int argc, char **argv )
#ifdef SLAPD_SCHEMA_NOT_COMPAT #ifdef SLAPD_SCHEMA_NOT_COMPAT
type = argv[argc - 1]; type = argv[argc - 1];
if( strcasecmp( type, "dn" ) == 0 ) { rc = slap_str2ad( type, &desc, &text );
desc = NULL;
} else { if( rc != LDAP_SUCCESS ) {
rc = slap_str2ad( type, &desc, &text ); fprintf( stderr, "%s: unrecognized attribute type: %s\n",
progname, text );
if( rc != LDAP_SUCCESS ) { exit( EXIT_FAILURE );
fprintf( stderr, "%s: unrecognized attribute type: %s\n",
progname, text );
exit( EXIT_FAILURE );
}
} }
#else #else
desc = type = attr_normalize( argv[argc - 1] ); desc = type = attr_normalize( argv[argc - 1] );
@ -79,10 +74,7 @@ main( int argc, char **argv )
id != NOID; id != NOID;
id = be->be_entry_next( be ) ) id = be->be_entry_next( be ) )
{ {
struct berval **values;
Entry* e = be->be_entry_get( be, id ); Entry* e = be->be_entry_get( be, id );
struct berval bv;
struct berval *bvals[2];
if ( e == NULL ) { if ( e == NULL ) {
fprintf( stderr, fprintf( stderr,
@ -97,12 +89,13 @@ main( int argc, char **argv )
id, e->e_dn ); id, e->e_dn );
} }
#ifdef SLAPD_SCHEMA_NOT_COMPAT #ifndef SLAPD_SCHEMA_NOT_COMPAT
if( desc == NULL )
#else
if( strcasecmp( type, "dn" ) == 0 ) if( strcasecmp( type, "dn" ) == 0 )
#endif
{ {
struct berval **values;
struct berval bv;
struct berval *bvals[2];
bv.bv_val = e->e_ndn; bv.bv_val = e->e_ndn;
bv.bv_len = strlen( bv.bv_val ); bv.bv_len = strlen( bv.bv_val );
bvals[0] = &bv; bvals[0] = &bv;
@ -121,7 +114,9 @@ main( int argc, char **argv )
} }
} }
} else { } else
#endif
{
Attribute *attr; Attribute *attr;
#ifdef SLAPD_SCHEMA_NOT_COMPAT #ifdef SLAPD_SCHEMA_NOT_COMPAT

View file

@ -54,7 +54,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo # ADD BSC32 /nologo
LINK32=link.exe LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
# ADD LINK32 hs_regex.lib libdb.lib ws2_32.lib odbc32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\..\Release" # ADD LINK32 libdb.lib sasl.lib hs_regex.lib libsasl.lib ws2_32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\..\Release"
!ELSEIF "$(CFG)" == "slapindex - Win32 Debug" !ELSEIF "$(CFG)" == "slapindex - Win32 Debug"
@ -78,7 +78,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo # ADD BSC32 /nologo
LINK32=link.exe LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
# ADD LINK32 hs_regex.lib libdb.lib ws2_32.lib odbc32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\..\Debug" # ADD LINK32 libdb.lib hs_regex.lib libsasl.lib ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\..\Debug"
!ELSEIF "$(CFG)" == "slapindex - Win32 Single Debug" !ELSEIF "$(CFG)" == "slapindex - Win32 Single Debug"
@ -103,7 +103,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo # ADD BSC32 /nologo
LINK32=link.exe LINK32=link.exe
# ADD BASE LINK32 kernel32.lib shell32.lib hs_regexd.lib libdbs.lib ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept # ADD BASE LINK32 kernel32.lib shell32.lib hs_regexd.lib libdbs.lib ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
# ADD LINK32 hs_regex.lib libdb.lib ws2_32.lib odbc32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\..\SDebug" # ADD LINK32 libdb.lib hs_regex.lib libsasl.lib ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\..\SDebug"
!ELSEIF "$(CFG)" == "slapindex - Win32 Single Release" !ELSEIF "$(CFG)" == "slapindex - Win32 Single Release"
@ -128,7 +128,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo # ADD BSC32 /nologo
LINK32=link.exe LINK32=link.exe
# ADD BASE LINK32 hs_regex.lib libdb.lib ws2_32.lib /nologo /subsystem:console /machine:I386 # ADD BASE LINK32 hs_regex.lib libdb.lib ws2_32.lib /nologo /subsystem:console /machine:I386
# ADD LINK32 hs_regex.lib libdbs.lib ws2_32.lib odbc32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\SRelease" # ADD LINK32 libdbs.lib sasl.lib hs_regex.lib libsasl.lib ws2_32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\SRelease"
!ENDIF !ENDIF

View file

@ -21,8 +21,7 @@ suffix "o=University of Michigan, c=US"
directory ./test-db directory ./test-db
rootdn "cn=Manager, o=University of Michigan, c=US" rootdn "cn=Manager, o=University of Michigan, c=US"
rootpw secret rootpw secret
index cn,sn,uid pres,eq,approx index cn,sn,uid pres,eq
index default none
lastmod on lastmod on
defaultaccess none defaultaccess none

View file

@ -20,8 +20,6 @@ suffix "o=University of Michigan, c=US"
directory ./test-db directory ./test-db
rootdn "cn=Manager, o=University of Michigan, c=US" rootdn "cn=Manager, o=University of Michigan, c=US"
rootpw secret rootpw secret
index cn,sn,uid pres,eq,approx index cn,sn,uid pres,eq
index default none
lastmod on
dbnosync dbnosync
dbnolocking dbnolocking

View file

@ -23,8 +23,7 @@ suffix "o=University of Michigan, c=US"
directory ./test-db directory ./test-db
rootdn "cn=Manager, o=University of Michigan, c=US" rootdn "cn=Manager, o=University of Michigan, c=US"
rootpw secret rootpw secret
index cn,sn,uid pres,eq,approx index cn,sn,uid pres,eq
index default none
lastmod on lastmod on
defaultaccess none defaultaccess none

View file

@ -25,7 +25,5 @@ suffix "o=University of Mich, c=US"
directory ./test-repl directory ./test-repl
rootdn "cn=Manager, o=University of Mich, c=US" rootdn "cn=Manager, o=University of Mich, c=US"
rootpw secret rootpw secret
index cn,sn,uid pres,eq,approx index cn,sn,uid pres,eq
index default none
# index default pres,eq,approx
lastmod on lastmod on

View file

@ -23,9 +23,7 @@ suffix "o=University of Michigan, c=US"
directory ./test-db directory ./test-db
rootdn "cn=Manager, o=University of Michigan, c=US" rootdn "cn=Manager, o=University of Michigan, c=US"
rootpw secret rootpw secret
index cn,sn,uid pres,eq,approx index cn,sn,uid pres,eq
index default none
# index default pres,eq,approx
lastmod on lastmod on
replogfile ./test-db/slapd.replog replogfile ./test-db/slapd.replog

View file

@ -26,7 +26,5 @@ rootdn "cn=Replica, o=University of Michigan, c=US"
rootpw secret rootpw secret
updatedn "cn=Replica, o=University of Michigan, c=US" updatedn "cn=Replica, o=University of Michigan, c=US"
updateref "ldap://localhost:9009/o=University%20of%20Michigan,c=US" updateref "ldap://localhost:9009/o=University%20of%20Michigan,c=US"
index cn,sn,uid pres,eq,approx index cn,sn,uid pres,eq
index default none
# index default pres,eq,approx
lastmod on lastmod on